The Page class allows you to return or set the current active page in T/HIS. More...
The T/HIS JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
Detailed DescriptionThe Page class allows you to return or set the current active page in T/HIS. |
Page number to add graph(s) to.
Graph number to add to page. If this argument is 0 or not given, a new graph is created.
If the second argument is 0, this specifies which graph to copy properties from when creating new graphs.
If the second argument is 0, this specifies the number of new graphs to create and add to the specified page.
ReturnsTrue if the graph was added, false if failed. Return typeBoolean |
ExampleTo add graph 1 to page 2 Page.AddGraph(2,1);
|
Layout(Page number[integer], Layout[String or Integer], Num in X (optional)[integer], Num in Y (optional)[integer]) [static]DescriptionSets the layout of either all pages or a specified page. |
Page number for which to set layout. If this argument is 0 then layout will be set on all pages individually. If -1 then the layout will be set globally, as in the 'Graphs' panel.
Layout specifier. Options are: "wide" or 1 - Tile wide, "tall" or 2 - Tile tall, "1x1" or 3 - 1x1, "2x2" or 4 - 2x2, "3x3" or 5 - 3x3, "xy" or 6 - XxY.
Number of graphs in X-direction if user-defined XxY layout (6).
Number of graphs in Y-direction if user-defined XxY layout (6).
ReturnsTrue if the layout was set, false if failed. Return typeBoolean |
ExampleTo set the layout of page 1 to 'Tile tall'. Page.Layout(1,"tall");
|
Page number to remove the graph from.
Graph number to remove from page. If this argument is 0 or not given, the highest number graph on the page will be removed. If this argument is -1, all graphs will be removed.
If the second argument is 0, this specifies the lower end of the range for removing graphs. All graphs with numbers within the specified range will be removed from the page.
If the second argument is 0, this specifies the upper end of the range for removing graphs. All graphs with numbers within the specified range will be removed from the page. If this argument is not given then it will be set to 32 by default.
ReturnsTrue if the graph was removed, false if failed. Return typeBoolean |
ExampleTo remove any graph with number between 2 and 6 from page 3 Page.RemoveGraph(3,0,2,6);
|
ReturnActivePage() [static]DescriptionReturns the current active page in T/HIS. |
No arguments
Returnsinteger Return typeNumber |
ExampleTo return the current active page var p = Page.ReturnActivePage();
|
ReturnGraphs(Page number[integer]) [static]DescriptionReturns the graphs on the specified page as an array of Graph objects. |
Page number for which to return the graphs it contains.
ReturnsArray of Graph objects Return typeArray |
ExampleTo return the graphs on page 2. Page.ReturnGraphs(2);
|
SetActivePage(Page number[integer]) [static]DescriptionSets the current active page in T/HIS, returning -1 if the page does not exist or the page number if it does. |
Page number to set to active page
ReturnsTrue if the page was set, false if the page does not exist. Return typeBoolean |
ExampleTo set the current active page to 2 Page.SetActivePage(2);
|