Functions and constants relating to Windows
Details of functionsCreateWindow(model_list[Array of integers|integer]) [static]DescriptionCreates a new window containing one or more models contained in model_list |
Model number(s). Can be a single model number, an array of model numbers or the constant ALL
Returnsboolean Return typeBoolean |
Window numbers. Can be a single window number, an array of window numbers or the constant ALL
LEAVE (default) leaves orphaned models in the database or DELETE deletes orphaned models
Returnsboolean Return typeBoolean |
GetWindowFrame(window_id[integer]) [static]Description
Returns the current "frame" in window_id See the notes in GetWindowMaxFrame() on how frame number relates to state number |
Window number or ALL. Specifies the window(s) to have the frame number set
Returnsinteger Return typeNumber |
Example
// Get the current frame of window #1 var a = GetWindowFrame(1);
|
Window number
Returnsinteger Return typeNumber |
Example
// Get the highest frame of number in window #2 var a = GetWindowMaxFrame(2);
|
GetWindowModels(window_id[integer]) [static]Description
Returns the model number(s) in window_id Every active window in D3PLOT must have at least one model, but may have any number |
Window number
Returns |
Object with the following properties:
| Name | Type | Description |
| list | Array of integers | List of model numbers |
| nm | integer | the number of models in the window |
object
Example
// Get list of model numbers in window #1
var a = GetWindowModels(1);
for(i=0; i<a.nm; i++)
{
Message("Model " + a.list[i] + " in window 1");
}
|
Window number or ALL. Specifies the window(s) to have their status set
OFF or ON. OFF makes the selected window(s) inactive, ON makes window(s) active
Returnsboolean Return typeBoolean |
Example
// Turn off the activity flag for window #1 SetWindowActive(1, OFF); // Make all current windows active SetWindowActive(ALL, ON);
|
SetWindowFrame(window_id[integer], frame_number[integer]) [static]Description
Sets the current "frame" in the window(s) specified to frame_number. The effect is immediate and the window(s) will be redrawn if necessary to show the requested frame See the notes in GetWindowMaxFrame() on how frame number relates to state number |
Window number or ALL
The frame number to set. Should be a +ve integer value in the range 1 to max #frames in window. Values greater than max #frames are truncated to this
Returnsboolean Return typeBoolean |
Example
// Set window #1 to display frame #10 SetWindowFrame(1, 10); // Set all windows to display frame #3 SetWindowFrame(ALL, 3);
|