Routine Operations: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This page lists all of the routine operations available in Planimate as of 5.09m. The operations all link to pages with their name but most of these pages will not exist. Where an operation warrants further discussion, these links can be followed and the pages created.  
This page lists all of the routine operations available in Planimate as of 8.54.0. The operations all link to pages with their name but most of these pages will not exist. Where an operation warrants further discussion, these links can be followed and the pages created.


''This page is automatically created. Please do not edit it.'' __NOEDITSECTION__ __TOC__
''This page is automatically created using Planimate 12.0.0.


== Arithmetic ==
Please do not edit it.
'' __NOEDITSECTION__ __TOC__
== Arithmetic ==


=== Add ( + )  ===
=== Add ===


Add two values/rows/columns/tables  
Add two values/rows/columns/tables


  '''[[Add|$R = $1 + $2]]'''
  '''[[Add|$R = Add($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 15: Line 17:
  $2 = Value 2
  $2 = Value 2


=== Clear ===
=== Clear ===


Set the target value to its initialising value  
Set the target value to its initialising value


  '''[[Clear|$R = CLEAR]]'''
  '''[[Clear|$R = CLEAR]]'''
Line 23: Line 25:
  $R = Clear
  $R = Clear


=== Dec ( -= ) ===
=== Dec ( -= ) ===


Decrement first value/row/column/table by second value  
Decrement first value/row/column/table by second value


  '''[[Dec|$R -= $1]]'''
  '''[[Dec|$R -= $1]]'''
Line 32: Line 34:
  $1 = Decr. by
  $1 = Decr. by


=== Div ( / )  ===
=== Div ===


Divide values/rows/columns/tables  
Divide values/rows/columns/tables


  '''[[Div|$R = $1 / $2]]'''
  '''[[Div|$R = Div($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 42: Line 44:
  $2 = Value 2
  $2 = Value 2


=== Inc ( += ) ===
=== Inc ( += ) ===


Increment first value/row/column/table by second value  
Increment first value/row/column/table by second value


  '''[[Inc|$R += $1]]'''
  '''[[Inc|$R += $1]]'''
Line 51: Line 53:
  $1 = Incr. by
  $1 = Incr. by


=== InterpolateValue ===
=== InterpolateValue ===


Interpolates a value between value1 and value2 based on ratio (0.0 gives value1, 1.0 gives value2)  
Interpolates a value between value1 and value2 based on ratio (0.0 gives value1, 1.0 gives value2)


  '''[[InterpolateValue|$R = InterpolateValue($1,$2,$3)]]'''
  '''[[InterpolateValue|$R = InterpolateValue($1,$2,$3)]]'''
Line 62: Line 64:
  $3 = Ratio
  $3 = Ratio


=== Mul ( * )  ===
=== Mul ===


Multiply values/rows/columns/tables  
Multiply values/rows/columns/tables


  '''[[Mul|$R = $1 * $2]]'''
  '''[[Mul|$R = Mul($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 72: Line 74:
  $2 = Value 2
  $2 = Value 2


=== Scale ( *= )  ===
=== RemapValue ===


Scale first value/row/column/table by second value  
Remaps value through table, interpolating To Column values according to value's position in From Column. A row range can be specified, To Row of 0 uses the last row in the table.
 
'''[[RemapValue|$R = RemapValue($1,$2,$3,$4,$5,$6)]]'''
$R = Result
$1 = Map Table
$2 = Value
$3 = To Column
$4 = From Row
$5 = To Row
$6 = From Column
 
=== Scale ( *= ) ===
 
Scale first value/row/column/table by second value


  '''[[Scale|$R *= $1]]'''
  '''[[Scale|$R *= $1]]'''
Line 81: Line 97:
  $1 = Scale by
  $1 = Scale by


=== Set ( = ) ===
=== Set ( = ) ===


Assign a value/row/column/table to another of the same type and size  
Assign a value/row/column/table to another of the same type and size


  '''[[Set|$R = $1]]'''
  '''[[Set|$R = $1]]'''
Line 90: Line 106:
  $1 = Set To
  $1 = Set To


=== Sub ( - )  ===
=== Sub ===


Subtract two values/rows/columns/tables  
Subtract two values/rows/columns/tables


  '''[[Sub|$R = $1 - $2]]'''
  '''[[Sub|$R = Sub($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 100: Line 116:
  $2 = Value 2
  $2 = Value 2


== Control ==
== Control ==


=== BREAKLOOP ===
=== BREAKLOOP ===


Immediately exits an ITERATE loop  
Immediately exits an ITERATE loop


  '''[[BREAKLOOP|BREAKLOOP]]'''
  '''[[BREAKLOOP|BREAKLOOP]]'''
   
   


=== CASE ===
=== CASE ===


Tests a condition and if true, executes the code following until another CASE or DEFAULT is reached  
Tests a condition and if true, executes the code following until another CASE or DEFAULT is reached


  '''[[CASE|CASE ($F)]]'''
  '''[[CASE|CASE ($F)]]'''
Line 117: Line 133:
  $F = CASE
  $F = CASE


=== DEFAULT ===
=== CONTINUE ===
 
Immediately processes the next iteration in a loop/while, skipping the rest of the code
 
'''[[CONTINUE|CONTINUE]]'''
 
=== DEFAULT ===


Marks code that should be executed if no CASES match in a SELECT block  
Marks code that should be executed if no CASES match in a SELECT block


  '''[[DEFAULT|DEFAULT]]'''
  '''[[DEFAULT|DEFAULT]]'''
   
   


=== ELSE ===
=== ELSE ===


Enables an alternate block of code to execute if an IF test fails to be true  
Enables an alternate block of code to execute if an IF test fails to be true


  '''[[ELSE|ELSE]]'''
  '''[[ELSE|ELSE]]'''
   
   


=== ENDIF ===
=== ENDIF ===


Marks the end of an IF block  
Marks the end of an IF block


  '''[[ENDIF|ENDIF]]'''
  '''[[ENDIF|ENDIF]]'''
   
   


=== ENDLOOP ===
=== ENDLOOP ===


Marks the end of an ITERATE block  
Marks the end of an ITERATE block


  '''[[ENDLOOP|ENDLOOP]]'''
  '''[[ENDLOOP|ENDLOOP]]'''
   
   


=== ENDSELECT ===
=== ENDSELECT ===


Marks the end of a SELECT block  
Marks the end of a SELECT block


  '''[[ENDSELECT|ENDSELECT]]'''
  '''[[ENDSELECT|ENDSELECT]]'''
   
   


=== ENDWHILE ===
=== ENDWHILE ===


Marks the end of a WHILE block  
Marks the end of a WHILE block


  '''[[ENDWHILE|ENDWHILE]]'''
  '''[[ENDWHILE|ENDWHILE]]'''
   
   


=== IF ===
=== IF ===


Executes lines following only if the condition is true  
Executes lines following only if the condition is true


  '''[[IF|IF ($F)]]'''
  '''[[IF|IF ($F)]]'''
Line 167: Line 190:
  $F = IF
  $F = IF


=== ITERATE ===
=== ITERATE ===


Repeats a block of routine lines, incrementing an attribute over a range  
Repeats a block of routine lines, incrementing an attribute over a range


  '''[[ITERATE|ITERATE $R FROM $1 TO $2]]'''
  '''[[ITERATE|ITERATE ($R,$1,$2)]]'''
   
   
  $R = Index Using
  $R = Index Using
Line 177: Line 200:
  $2 = Last Value
  $2 = Last Value


=== ITERATEROWS ===
=== ITERATEROWS ===


Iterate Row Index over all the rows in the table  
Iterate Row Index over all the rows in the table


  '''[[ITERATEROWS|ITERATEROWS $R OVER $1]]'''
  '''[[ITERATEROWS|ITERATEROWS ($R,$1)]]'''
   
   
  $R = Row Index
  $R = Row Index
  $1 = Table
  $1 = Table    
 
=== RETURN ===
 
Returns from the routine
 
'''[[RETURN|RETURN]]'''


=== REVERSEITERATE ===
=== REVERSEITERATE ===


Iterate the result attribute over the given range in descending order  
Iterate the result attribute over the given range in descending order


  '''[[REVERSEITERATE|REVERSEITERATE $R FROM $1 TO $2]]'''
  '''[[REVERSEITERATE|REVERSEITERATE ($R,$1,$2)]]'''
   
   
  $R = Index Using
  $R = Index Using
Line 196: Line 226:
  $2 = Last Value
  $2 = Last Value


=== SELECT ===
=== SELECT ===


Starts a block where CASEs can be used to execute different code for conditions tested  
Starts a block where CASEs can be used to execute different code for conditions tested


  '''[[SELECT|SELECT]]'''
  '''[[SELECT|SELECT]]'''
   
   


=== WHILE ===
=== WHILE ===


Repeats a block of lines until the condition is false; the condition is tested first  
Repeats a block of lines until the condition is false; the condition is tested first


  '''[[WHILE|WHILE ($F)]]'''
  '''[[WHILE|WHILE ($F)]]'''
Line 211: Line 241:
  $F = WHILE
  $F = WHILE


== Display ==
== Display ==


=== Animate ===
=== Animate ===


Animate a model object to a new screen position  
Animate a model object to a new screen position


  '''[[Animate|Animate($1,$2,$3)]]'''
  '''[[Animate|Animate($1,$2,$3)]]'''
Line 223: Line 253:
  $3 = Y Pos
  $3 = Y Pos


=== ChooseColor ===
=== ChooseColor ===


Shows the color palette selector dialog
Enables selection of a colour


  '''[[ChooseColor|$R = ChooseColor($1)]]'''
  '''[[ChooseColor|$R = ChooseColor($1)]]'''
$R = Selected Colour
$1 = Initial Colour
=== ChoosePaletteColor ===
Shows the colour palette selector dialog to select a given palette colour
'''[[ChoosePaletteColor|$R = ChoosePaletteColor($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Selection Color
  $1 = Selection Color


=== ColorPaletteEntry ===
=== ColorPaletteEntry ===


Returns the RGB color for a given color index in the Planimate color palette  
Returns the RGB color for a given color index in the Planimate color palette


  '''[[ColorPaletteEntry|$R = ColorPaletteEntry($1)]]'''
  '''[[ColorPaletteEntry|$R = ColorPaletteEntry($1)]]'''
   
   
  $R = Result
  $R = Result      
  $1 = Palette Index
  $1 = Palette Index


=== FitPanelToArea ===
=== FitPanelToArea ===


Fits the panel to the area of its contents with a margin  
Fits the panel to the area of its contents with a margin


  '''[[FitPanelToArea|FitPanelToArea($1,$2)]]'''
  '''[[FitPanelToArea|FitPanelToArea($1,$2)]]'''
Line 250: Line 289:
  $2 = Margin
  $2 = Margin


=== ForceRepaint ===
=== ForceRepaint ===


Repaints all windows; use with care, it can cause slowdown  
Repaints all windows; use with care, it can cause slowdown


  '''[[ForceRepaint|ForceRepaint]]'''
  '''[[ForceRepaint|ForceRepaint]]'''
   
   


=== ForceRepaintPanel ===
=== ForceRepaintPanel ===


Repaints the specified panel  
Repaints the specified panel


  '''[[ForceRepaintPanel|ForceRepaintPanel($1)]]'''
  '''[[ForceRepaintPanel|ForceRepaintPanel($1)]]'''
Line 265: Line 304:
  $1 = Panel
  $1 = Panel


=== GetSystemColorRGB ===
=== GetPanelProperty ===
 
Read a property of a panel, specified using _panel_properties list
 
'''[[GetPanelProperty|$R = GetPanelProperty($1,$2)]]'''
$R = Result
$1 = Panel
$2 = Property Label
 
=== GetSystemColorRGB ===


Returns the RGB color for a given color in the Windows system color palette  
Returns the RGB color for a given color in the Windows system color palette


  '''[[GetSystemColorRGB|$R = GetSystemColorRGB($1)]]'''
  '''[[GetSystemColorRGB|$R = GetSystemColorRGB($1)]]'''
Line 274: Line 323:
  $1 = Value
  $1 = Value


=== GraphXOffset  ===
=== GetViewportScrollX ===


Read the offset of a graph view for a table on the given panel  
Get the x scroll of a viewport on a given panel


  '''[[GraphXOffset|$R = GraphXOffset($1,$2)]]'''
  '''[[GetViewportScrollX|$R = GetViewportScrollX($1,$2)]]'''
   
   
  $R = Target
  $R = Result
  $1 = Table
  $1 = Panel With Viewport 
  $2 = Panel
  $2 = Panel Inside Viewport


=== GraphXWidth  ===
=== GetViewportScrollY ===


Read the width of a graph view for a table on the given panel  
Get the y scroll of a viewport on a given panel


  '''[[GraphXWidth|$R = GraphXWidth($1,$2)]]'''
'''[[GetViewportScrollY|$R = GetViewportScrollY($1,$2)]]'''
$R = Result
$1 = Panel With Viewport 
$2 = Panel Inside Viewport
 
=== GetViewportZoom ===
 
Get the zoom factor of a viewport on a given panel
 
'''[[GetViewportZoom|$R = GetViewportZoom($1,$2)]]'''
$R = Result
$1 = Panel With Viewport 
$2 = Panel Inside Viewport
 
=== GraphXOffset ===
 
Read the offset of a graph view for a table on the given panel
 
'''[[GraphXOffset|$R = GraphXOffset($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== GraphXWidth ===
 
Read the width of a graph view for a table on the given panel
 
  '''[[GraphXWidth|$R = GraphXWidth($1,$2)]]'''
   
   
  $R = Target
  $R = Target
Line 294: Line 373:
  $2 = Panel
  $2 = Panel


=== HidePanel ===
=== HidePanel ===


Hides any popup for the given panel  
Hides any popup for the given panel


  '''[[HidePanel|HidePanel($1)]]'''
  '''[[HidePanel|HidePanel($1)]]'''
Line 302: Line 381:
  $1 = Target Panel
  $1 = Target Panel


=== HideTableEditor ===
=== HideTableEditor ===


Close any open table editor for the given table  
Close any open table editor for the given table


  '''[[HideTableEditor|HideTableEditor($1)]]'''
  '''[[HideTableEditor|HideTableEditor($1)]]'''
Line 310: Line 389:
  $1 = Table
  $1 = Table


=== MakeVisible ===
=== MakeVisible ===


Makes the specified panel the active panel on the main window  
Makes the specified panel the active panel on the main window


  '''[[MakeVisible|MakeVisible($1)]]'''
  '''[[MakeVisible|MakeVisible($1)]]'''
Line 318: Line 397:
  $1 = Target Subsystem
  $1 = Target Subsystem


=== PanelWindowLeft ===
=== PanelWindowLeft ===


Returns the left window co-ordinate of a popup panel  
Returns the left window co-ordinate of a popup panel


  '''[[PanelWindowLeft|$R = PanelWindowLeft($1)]]'''
  '''[[PanelWindowLeft|$R = PanelWindowLeft($1)]]'''
Line 327: Line 406:
  $1 = Panel
  $1 = Panel


=== PanelWindowTop ===
=== PanelWindowTop ===


Returns the top window co-ordinate of a popup panel  
Returns the top window co-ordinate of a popup panel


  '''[[PanelWindowTop|$R = PanelWindowTop($1)]]'''
  '''[[PanelWindowTop|$R = PanelWindowTop($1)]]'''
Line 336: Line 415:
  $1 = Panel
  $1 = Panel


=== PrintPanel ===
=== PrintPanel ===


Queues the nominated panel for printing; additional panels can be printed by intercepting the _Panel Printed broadcast  
Queues the nominated panel for printing; additional panels can be printed by intercepting the _Panel Printed broadcast


  '''[[PrintPanel|PrintPanel($1)]]'''
  '''[[PrintPanel|PrintPanel($1)]]'''
Line 344: Line 423:
  $1 = Target Subsystem
  $1 = Target Subsystem


=== RepaintObjects  ===
=== ReFitPopup ===
 
Resize an already open popup to panel's changed size
 
'''[[ReFitPopup|ReFitPopup($1)]]'''
$1 = Panel
 
=== RepaintObjects ===
 
Initiates a repaint of dynamic object icons and the animation layer only; faster than a full force repaint and intended for animation. 'Panel' can be used to specify a viewport etc, if zero the current panel is used. If 'SpeedRegulate' is non zero, checks are performed to prevent successive repaints occurring faster than about 60 frames a second.
 
'''[[RepaintObjects|RepaintObjects($1,$2)]]'''
$1 = Panel
  $2 = SpeedRegulate
 
=== RepaintView ===


Forces a repaint of dynamic objects only; faster than a full force repaint
Repaints contents of a view


  '''[[RepaintObjects|RepaintObjects]]'''
  '''[[RepaintView|RepaintView($1,$2,$3,$4)]]'''
   
   
$1 = Table
$2 = Panel
$3 = View Type
$4 = Index


=== SetActivityString ===
=== SetActivityString ===


Sets text in the status bar activity area  
Sets text in the status bar activity area


  '''[[SetActivityString|SetActivityString($1)]]'''
  '''[[SetActivityString|SetActivityString($1)]]'''
Line 359: Line 459:
  $1 = Activity Text
  $1 = Activity Text


=== SetColorPaletteEntry ===
=== SetColorPaletteEntry ===


Sets the RGB color for a given color in the Planimate color palette  
Sets the RGB color for a given color in the Planimate color palette


  '''[[SetColorPaletteEntry|SetColorPaletteEntry($1,$2)]]'''
  '''[[SetColorPaletteEntry|SetColorPaletteEntry($1,$2)]]'''
   
   
  $1 = Palette Index
  $1 = Palette Index
  $2 = RGB Value
  $2 = RGB Value  


=== SetGraphXOffset ===
=== SetGraphXOffset ===


Set the offset of a graph view for a table on the given panel  
Set the offset of a graph view for a table on the given panel


  '''[[SetGraphXOffset|SetGraphXOffset($1,$2,$3)]]'''
  '''[[SetGraphXOffset|SetGraphXOffset($1,$2,$3)]]'''
Line 378: Line 478:
  $3 = Value
  $3 = Value


=== SetGraphXWidth ===
=== SetGraphXWidth ===


Set the width of a graph view for a table on the given panel  
Set the width of a graph view for a table on the given panel


  '''[[SetGraphXWidth|SetGraphXWidth($1,$2,$3)]]'''
  '''[[SetGraphXWidth|SetGraphXWidth($1,$2,$3)]]'''
Line 388: Line 488:
  $3 = Value
  $3 = Value


=== SetPanelColor  ===
=== SetIconRemote ===


Sets the background color of a panel
Set icon for an item somewhere else in the model. Location can be a portal or object id containing the item. If its 0 the entire model is searched, this is potentially very slow. Icon Name should not include any extention, PL will search DBs for it.


  '''[[SetPanelColor|SetPanelColor($1,$2)]]'''
'''[[SetIconRemote|SetIconRemote($1,$2,$3)]]'''
$1 = Item ID
$2 = Location
$3 = Icon Name
 
=== SetObjectPos ===
 
Sets the position and scaling of a dynamic object in one operation. The position is the centre of the object and the scaling is a percentage which should normally be 100 for no scaling.
 
'''[[SetObjectPos|SetObjectPos($1,$2,$3,$4,$5)]]'''
$1 = Object
$2 = X Pos
$3 = Y Pos
$4 = X Scale
$5 = Y Scale
 
=== SetPanelColor ===
 
Sets the background color of a panel
 
  '''[[SetPanelColor|SetPanelColor($1,$2)]]'''
   
   
  $1 = Panel
  $1 = Panel
  $2 = Color
  $2 = Color


=== SetPanelTransparency ===
=== SetPanelProperty ===
 
Set a property of a panel, specified using _panel_properties list
 
'''[[SetPanelProperty|SetPanelProperty($1,$2,$3)]]'''
$1 = Panel
$2 = Property Label
$3 = Value
 
=== SetPanelSize ===
 
Sets the panel area size. Useful when the panel is not configured to automatically size.
 
'''[[SetPanelSize|SetPanelSize($1,$2,$3)]]'''
$1 = Panel
$2 = Width
$3 = Height
 
=== SetPanelTransparency ===


Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency  
Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency


  '''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
  '''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
Line 406: Line 548:
  $2 = Transparency
  $2 = Transparency


=== SetStatusItemAreaString ===
=== SetPortalIcon ===
 
Sets icon for portal's current state.
 
'''[[SetPortalIcon|SetPortalIcon($1,$2)]]'''
$1 = Portal ID
$2 = Icon Name
 
=== SetPortalTip ===
 
Sets tip text for Portal to Text
 
'''[[SetPortalTip|SetPortalTip($1,$2)]]'''
$1 = Portal ID
$2 = Text
 
=== SetStatusItemAreaString ===


Sets the text in the status bar area where item class names are displayed during editing  
Sets the text in the status bar area where item class names are displayed during editing


  '''[[SetStatusItemAreaString|SetStatusItemAreaString($1)]]'''
  '''[[SetStatusItemAreaString|SetStatusItemAreaString($1)]]'''
Line 414: Line 574:
  $1 = Item Area Text
  $1 = Item Area Text


=== SetViewportScroll ===
=== SetViewportScroll ===


Set the x and y scroll of a viewport on a given panel  
Set the x and y scroll of a viewport on a given panel


  '''[[SetViewportScroll|SetViewportScroll($R,$1,$2,$3)]]'''
  '''[[SetViewportScroll|SetViewportScroll($R,$1,$2,$3)]]'''
   
   
  $R = Panel With Viewport
  $R = Panel With Viewport
  $1 = Panel Inside Viewport
  $1 = Panel Inside Viewport
  $2 = X Offset
  $2 = X Offset
  $3 = Y Offset
  $3 = Y Offset


=== SetViewportTarget ===
=== SetViewportTarget ===


Set the target of a viewport. Current Panel identifies the viewport and can be zero of the containing panel only has 1 viewport. New Panel sets the new panel to display, 0 makes the viewport hidden in user mode.  
Changes the Target Panel that a given Viewport will show. Targets are specified using the model object label of its owning portal (_Model_Objects list). The viewport can be identified directly using a paint object label list (_Paint_Objects) or indirectly using the panel the viewport is on and its current target. The Current Target Panel is not required when using a paint label reference, or if the viewport's panel only has one viewport. If New Target Panel is 0, the viewport will be hidden in user mode.


  '''[[SetViewportTarget|SetViewportTarget($1,$2,$3)]]'''
  '''[[SetViewportTarget|SetViewportTarget($1,$2,$3)]]'''
   
   
  $1 = Panel With Viewport
  $1 = Viewport or its Panel
  $2 = Current Panel Inside Viewport
  $2 = Current Target (or 0)
  $3 = New Panel Inside Viewport
  $3 = New Target Panel


=== SetViewportZoom ===
=== SetViewportZoom ===


Set the zoom factor of a viewport on a given panel  
Set the zoom factor of a viewport on a given panel


  '''[[SetViewportZoom|SetViewportZoom($R,$1,$2)]]'''
  '''[[SetViewportZoom|SetViewportZoom($R,$1,$2)]]'''
   
   
  $R = Panel With Viewport
  $R = Panel With Viewport
  $1 = Panel Inside Viewport
  $1 = Panel Inside Viewport
  $2 = Zoom Value
  $2 = Zoom Value


=== ShowPopupPanel  ===
=== SetWindowTitle ===


Opens the given panel in a separate window at the specified window co-ordinates  
Sets the title of the main window
 
'''[[SetWindowTitle|SetWindowTitle($1)]]'''
$1 = Title Text
 
=== ShowAboutBox ===
 
Shows the Planimate about box
 
'''[[ShowAboutBox|ShowAboutBox()]]'''
 
=== ShowPopupPanel ===
 
Opens the given panel in a separate window at the specified window co-ordinates


  '''[[ShowPopupPanel|ShowPopupPanel($1,$2,$3)]]'''
  '''[[ShowPopupPanel|ShowPopupPanel($1,$2,$3)]]'''
Line 455: Line 630:
  $3 = Y Position
  $3 = Y Position


=== ShowTableEditor ===
=== ShowTableEditor ===


Open table editor for the given table  
Open table editor for the given table


  '''[[ShowTableEditor|ShowTableEditor($1)]]'''
  '''[[ShowTableEditor|ShowTableEditor($1)]]'''
Line 463: Line 638:
  $1 = Table
  $1 = Table


=== SwapPopupPanel ===
=== SwapPopupPanel ===


Swaps which panels are visible in a popup panel without closing/reopening it  
Swaps which panels are visible in a popup panel without closing/reopening it


  '''[[SwapPopupPanel|SwapPopupPanel($1,$2)]]'''
  '''[[SwapPopupPanel|SwapPopupPanel($1,$2)]]'''
Line 472: Line 647:
  $2 = Replace With
  $2 = Replace With


== Label  ==
== File ==


=== AddLabelDialog  ===
=== AcquireFileLock ===


Show a dialog so the user can add a label to the given label list
Returns zero if file lock acquired, otherwise if target is text its text is set to the lock failure reason


  '''[[AddLabelDialog|AddLabelDialog($R)]]'''
  '''[[AcquireFileLock|$R = AcquireFileLock($1,$2)]]'''
   
   
  $R = Result
  $R = Result
$1 = File
$2 = New Lock Text


=== AddSubLabel  ===
=== CopyFile ===


Makes the new sublabel for the parent label $1 (if it doesn't exist) and returns its index as a sublabel
Copies file


  '''[[AddSubLabel|AddSubLabel($R,$1)]]'''
  '''[[CopyFile|$R = CopyFile($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label
  $1 = From
$2 = To


=== ClearLabelList  ===
=== CreateFolder ===


Removes all labels from a label list
Create folder, if create path set then upper levels created as well


  '''[[ClearLabelList|ClearLabelList($1)]]'''
  '''[[CreateFolder|$R = CreateFolder($1,$2)]]'''
   
   
  $1 = Clear Label List
$R = Result
  $1 = File
$2 = Create Path


=== CreateLabelList  ===
=== DeleteFile ===


Creates a label list with the given name and formats the result attribute to reference it
Deletes file


  '''[[CreateLabelList|CreateLabelList($R,$1)]]'''
  '''[[DeleteFile|$R = DeleteFile($1)]]'''
   
   
  $R = Format Result
  $R = Result
  $1 = List Name
  $1 = File


=== CreateLabelListFromCol  ===
=== DeleteFolder ===


Uses the provided column to provide text for creating a new label list
Deletes empty folder, if subfolders set then empty subfolders also deleted


  '''[[CreateLabelListFromCol|CreateLabelListFromColumn($R,$1)]]'''
  '''[[DeleteFolder|$R = DeleteFolder($1,$2)]]'''
   
   
  $R = Target List
  $R = Result
  $1 = Source Column
  $1 = File
$2 = Subfolders


=== CreatePanelPortalLabel  ===
=== ExtractFileExtention ===


Creates a panel label for the subsystem of the given portal object label  
Extracts the file extention from a path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.


  '''[[CreatePanelPortalLabel|$R = CreatePanelPortalLabel($1)]]'''
  '''[[ExtractFileExtention|$R = ExtractFileExtention($1)]]'''
   
   
  $R = New Panel Label
  $R = Result 
  $1 = Portal Object Label
  $1 = Path/File


=== CreateSubLabelList  ===
=== ExtractFileName ===


Creates an empty sub label list of an existing label list and formats an attribute to reference it
Extracts the file name from a full path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.


  '''[[CreateSubLabelList|CreateSubLabelList($R,$1,$2)]]'''
  '''[[ExtractFileName|$R = ExtractFileName($1)]]'''
   
   
  $R = Format Result
  $R = Result  
  $1 = List Name
  $1 = Path/File
$2 = Parent List
 
=== ExtractPathName ===


=== CreateSubsystemObjectLabel  ===
Extracts the file name from a full path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.


  '''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
  '''[[ExtractPathName|$R = ExtractPathName($1)]]'''
   
   
  $R = New Object Label
  $R = Result 
$1 = Path/File


=== DeleteLabel  ===
=== FileColumns ===


Deletes the given label from its labellist
Number of columns in file or -1. Supports TAB or comma delimited data.


  '''[[DeleteLabel|DeleteLabel($1)]]'''
  '''[[FileColumns|$R = FileColumns($1,$2)]]'''
   
   
  $1 = Label
$R = Result
  $1 = File
$2 = Comma Delimit


=== LabelCount  ===
=== FileLines ===


Returns how many labels in the given label list
Number of lines in file or -1


  '''[[LabelCount|$R = LabelCount($1)]]'''
  '''[[FileLines|$R = FileLines($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label Count
  $1 = File


=== MaxLabelIndex  ===
=== FilesInFolder ===


Returns the highest allocated label index in the given label list  
Reads a list of files in the path/folder and puts them into the target label list. The path can include a wildcard file name like c:\Data\*.txt


  '''[[MaxLabelIndex|$R = MaxLabelIndex()]]'''
  '''[[FilesInFolder|$R = FilesInFolder($1)]]'''
   
   
  $R = Result
  $R = Target List
$1 = Path/Wildcard 


=== MinLabelIndex  ===
=== FilesInHierarchy ===


Returns the lowest allocated label index in the given label list  
Retrieves the files in all folders starting at Path/File, placing the path names into the target label list.


  '''[[MinLabelIndex|$R = MinLabelIndex()]]'''
  '''[[FilesInHierarchy|$R = FilesInHierarchy($1)]]'''
   
   
  $R = Result
  $R = Target List
$1 = Path/File


=== NextLabelIndex  ===
=== FileSize ===


The next allocated label index for the list or -1 if none
Returns size of file or -1 if not found


  '''[[NextLabelIndex|$R = NextLabelIndex($1)]]'''
  '''[[FileSize|$R = FileSize($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label Index
  $1 = File


=== PrevLabelIndex  ===
=== FolderExists ===


The previous allocated label index for the list or -1 if none
Returns non zero if the specified directory folder exists.


  '''[[PrevLabelIndex|$R = PrevLabelIndex($1)]]'''
  '''[[FolderExists|$R = FolderExists($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label Index
  $1 = Path


=== ReIndexLabelList  ===
=== PlaySound ===


Re-indexes all members in a label list so they have ascending and continuous index values
Play windows sound file. Will extract WAV files from DB if required.


  '''[[ReIndexLabelList|ReIndexLabelList($1)]]'''
  '''[[PlaySound|PlaySound($1,$2)]]'''
   
   
  $1 = Re-index Label List
  $1 = Sound File
$2 = Wait Finish


=== ReIndexLabels  ===
=== ReadFromFile ===


Remaps labels in the given list using 2 columns of matching from and to values
Reads the reference from file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.


  '''[[ReIndexLabels|ReIndexLabels($1,$2,$3)]]'''
  '''[[ReadFromFile|$R = ReadFromFile($1,$2,$3,$4,$5,$6,$7)]]'''
   
   
  $1 = Re-index List
$R = Result
  $2 = From Values (Col)
  $1 = File
  $3 = To Values (Col)
  $2 = Data
  $3 = Options
$4 = File Row
$5 = File Column
$6 = Row Limit
$7 = Column Limit


=== RemoveSubLabel  ===
=== ReadViewFromFile ===


Removes the sublabel as a member of the sublabel list  
Reads file, following format of table view. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.


  '''[[RemoveSubLabel|RemoveSubLabel($1)]]'''
  '''[[ReadViewFromFile|$R = ReadViewFromFile($1,$2,$3,$4,$5)]]'''
   
   
  $1 = Label
$R = Result
  $1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options


=== TestLabelIndex  ===
=== ReleaseFileLock ===


Tests whether an index has been used in a label list
Returns zero if file lock is released (it must be yours to release) otherwise if target is text its text is set to the lock failure reason


  '''[[TestLabelIndex|$R = TestLabelIndex($1,$2)]]'''
  '''[[ReleaseFileLock|$R = ReleaseFileLock($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Index Value
  $1 = File
$2 = Label List
 
== Label String  ==


=== AppendToLabel  ===
=== RenameFile ===


Append text to an existing label
Renames file


  '''[[AppendToLabel|AppendToLabel($R,$1)]]'''
  '''[[RenameFile|$R = RenameFile($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = From
$2 = To


=== CreatePasswordHash  ===
=== RunCommand ===


Uses the 3 text sources to create an unpredictable hash string
Runs a new process or opens a file via the shell


  '''[[CreatePasswordHash|$R = CreatePasswordHash($1,$2,$3)]]'''
  '''[[RunCommand|$R = RunCommand($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Text-1
  $1 = Command
  $2 = Text-2
  $2 = Use shell
  $3 = Text-3
  $3 = Minimised
$4 = Wait Complete
$5 = Keep Front


=== CropToCharacters  ===
=== SaveImage ===


Crop a label to a subset of its text
Saves the panel image to a file or to the clipboard if the file name is empty or “-”. A memory save creates/updates an icon in the icon cache that paint button states and object icons can use.


  '''[[CropToCharacters|CropToCharacters($R,$1,$2)]]'''
  '''[[SaveImage|$R = SaveImage($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = From Char
  $1 = File
  $2 = To Char
  $2 = Panel
$3 = In-Memory


=== ExtractFileExtention  ===
=== WriteToFile ===


Create a label in the target label list which is the file extention of the path/file text
Writes the reference to file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.


  '''[[ExtractFileExtention|ExtractFileExtention($R,$1)]]'''
  '''[[WriteToFile|$R = WriteToFile($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Path/File
  $1 = File
$2 = Data
$3 = Options


=== ExtractFileName  ===
=== WriteViewToFile ===


Create a label in the target label list which is the file name from a full path/file text
Writes table view to file. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.


  '''[[ExtractFileName|ExtractFileName($R,$1)]]'''
  '''[[WriteViewToFile|$R = WriteViewToFile($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Path/File
  $1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options
 
== Label ==


=== ExtractIntoFormat  ===
=== AddLabelDialog ===


Extracts a substring from a formatted value/label and interprets it in the format of the target. If the target is a label list, it gets added as a label if its not already in that list.
Show a dialog so the user can add a label to the given label list


  '''[[ExtractIntoFormat|$R = ExtractIntoFormat($1,$2,$3)]]'''
  '''[[AddLabelDialog|AddLabelDialog($R)]]'''
   
   
  $R = Result
  $R = Result
$1 = Label
$2 = From Char
$3 = To Char


=== ExtractPathName  ===
=== AddSubLabel ===


Create a label in the target label list which is the file name from a full path/file text
Makes the new sublabel for the parent label $1 (if it doesn't exist) and returns its index as a sublabel


  '''[[ExtractPathName|ExtractPathName($R,$1)]]'''
  '''[[AddSubLabel|AddSubLabel($R,$1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Path/File
  $1 = Label


=== FilesInFolder  ===
=== ClearLabelList ===


Returns how many files matching a wildcard in the given folder
Removes all labels from a label list


  '''[[FilesInFolder|$R = FilesInFolder($1)]]'''
  '''[[ClearLabelList|ClearLabelList($1)]]'''
   
   
  $R = Target List
  $1 = Clear Label List
$1 = Path/File


=== FilesInHierarchy  ===
=== CreateLabelList ===


Retrieve how many files in a file folder (including subfolders)
Creates a label list with the given name and formats the result attribute to reference it


  '''[[FilesInHierarchy|$R = FilesInHierarchy($1)]]'''
  '''[[CreateLabelList|CreateLabelList($R,$1)]]'''
   
   
  $R = Target List
  $R = Format Result
  $1 = Path/File
  $1 = List Name


=== FormatIntoLabel  ===
=== CreateLabelListFromColumn ===


Create a new label with the formatted text of the source
Uses the provided column to provide text for creating a new label list


  '''[[FormatIntoLabel|FormatIntoLabel($R,$1)]]'''
  '''[[CreateLabelListFromColumn|CreateLabelListFromColumn($R,$1)]]'''
   
   
  $R = Result
  $R = Target List 
  $1 = Source
  $1 = Source Column


=== FormatIntoLabelIndex  ===
=== CreatePanelPortalLabel ===


Creates a label from the text of source and using the provided index
Creates a panel label for the subsystem of the given portal object label


  '''[[FormatIntoLabelIndex|$R = FormatIntoLabelIndex($1,$2)]]'''
  '''[[CreatePanelPortalLabel|$R = CreatePanelPortalLabel($1)]]'''
   
   
  $R = Result
  $R = New Panel Label   
  $1 = Source
  $1 = Portal Object Label
$2 = Index


=== FormatNameIntoLabel  ===
=== CreateSubLabelList ===


Creates a label from the name of the given object
Creates an empty sub label list of an existing label list and formats an attribute to reference it


  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
  '''[[CreateSubLabelList|CreateSubLabelList($R,$1,$2)]]'''
   
   
  $R = Result
  $R = Format Result
  $1 = Source
  $1 = List Name
$2 = Parent List


=== FormattedLabelIndex  ===
=== CreateSubsystemObjectLabel ===


Determines if the source text is a label and returns its index if it is
Creates an object label for the portal owning the panel of this routine


  '''[[FormattedLabelIndex|$R = FormattedLabelIndex($1)]]'''
  '''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
   
   
  $R = Result
  $R = New Object Label
$1 = Source


=== FormattedWidth  ===
=== DeleteLabel ===


Returns how many characters the referenced data has when it is formatted for display
Deletes the given label from its labellist


  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
  '''[[DeleteLabel|DeleteLabel($1)]]'''
   
   
$R = Target
  $1 = Label
  $1 = Width Of


=== FormatTitleIntoLabel  ===
=== GetLabelListProperty ===


Creates a label from the title text of the given object
Retrieves a property of a label list


  '''[[FormatTitleIntoLabel|$R = FormatTitleIntoLabel($1)]]'''
  '''[[GetLabelListProperty|$R = GetLabelListProperty($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = LabelList
$2 = Property


=== GetAppDataName  ===
=== LabelCount ===


Get a full documents and settings/Application Data path/file including a subfolder and a filename. Sets s.LastAccessedDataFilePath and returns non zero if the folder was created/verified writeable.
Returns how many labels in the given label list


  '''[[GetAppDataName|$R = GetAppDataName($1,$2)]]'''
  '''[[LabelCount|$R = LabelCount($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Folder
  $1 = Label Count
$2 = Filename


=== GetCharacter  ===
=== MaxLabelIndex ===


Extracts a character from the formatted value provided and returns the ascii code
Returns the highest allocated label index in the given label list


  '''[[GetCharacter|$R = GetCharacter($1,$2)]]'''
  '''[[MaxLabelIndex|$R = MaxLabelIndex()]]'''
   
   
  $R = Target
  $R = Result
$1 = String
$2 = Character


=== GetMyDocumentsName  ===
=== MinLabelIndex ===


Get a full My Documents path/file including a subfolder and a filename. Sets s.LastAccessedDataFilePath and returns non zero if the folder was created/verified writeable.
Returns the lowest allocated label index in the given label list


  '''[[GetMyDocumentsName|$R = GetMyDocumentsName($1,$2)]]'''
  '''[[MinLabelIndex|$R = MinLabelIndex()]]'''
   
   
  $R = Result
  $R = Result
$1 = Folder
$2 = Filename


=== GetProgramName  ===
=== NextLabelIndex ===


Get the folder containing the running Planimate EXE and append a filename. Sets s.LastAccessedDataFilePath.
The next allocated label index for the list or -1 if none


  '''[[GetProgramName|GetProgramName($1)]]'''
  '''[[NextLabelIndex|$R = NextLabelIndex($1)]]'''
   
   
  $1 = Filename
$R = Result
  $1 = Label Index


=== RemoveFileExtention  ===
=== PrevLabelIndex ===


Crop label to remove trailing dot and text
The previous allocated label index for the list or -1 if none


  '''[[RemoveFileExtention|RemoveFileExtention($R)]]'''
  '''[[PrevLabelIndex|$R = PrevLabelIndex($1)]]'''
   
   
  $R = Result
  $R = Result
$1 = Label Index


=== RenameLabel  ===
=== RedirectLabelList ===


Change the text of a label  
Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.


  '''[[RenameLabel|RenameLabel($R,$1)]]'''
  '''[[RedirectLabelList|RedirectLabelList($1,$2)]]'''
   
   
  $R = Result
  $1 = From Name
  $1 = Source
  $2 = To Name


=== SetFreeTextTitle  ===
=== ReIndexLabelList ===


Sets title of free text editor dialog
Re-indexes all members in a label list so they have ascending and continuous index values


  '''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
  '''[[ReIndexLabelList|ReIndexLabelList($1)]]'''
   
   
  $1 = Title Text
  $1 = Re-index Label List
 
=== ReIndexLabels ===


== Logical  ==
Remaps labels in the given list using 2 columns of matching from and to values


=== BitAND ===
'''[[ReIndexLabels|ReIndexLabels($1,$2,$3)]]'''
$1 = Re-index List   
$2 = From Values (Col)
$3 = To Values (Col)  


Treat values as integers and bitwise AND them (limited to 14 bits of precision)
=== RemoveSubLabel ===


  '''[[BitAND|$R = BitAND($1,$2)]]'''
Removes the sublabel as a member of the sublabel list
   
 
  $R = Result
  '''[[RemoveSubLabel|RemoveSubLabel($1)]]'''
$1 = Value 1
   
$2 = Value 2
  $1 = Label


=== BitOR  ===
=== SetLabelListProperty ===


Treat values as integers and bitwise OR them (limited to 14 bits of precision)
Sets a property of a label list


  '''[[BitOR|$R = BitOR($1,$2)]]'''
  '''[[SetLabelListProperty|SetLabelListProperty($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = LabelList
  $1 = Value 1
  $2 = Property
  $2 = Value 2
  $3 = Value


=== BitXOR  ===
=== TestLabelIndex ===


Treat values as integers and bitwise XORs them (limited to 14 bits of precision)
Tests whether an index has been used in a label list


  '''[[BitXOR|$R = BitXOR($1,$2)]]'''
  '''[[TestLabelIndex|$R = TestLabelIndex($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Index Value
  $2 = Value 2
  $2 = Label List
 
== Label String ==


=== Condition  ===
=== AppendToLabel ===


Evaluate a condition specified in a dialog
Append text to an existing label. Result must be a label list formatted attribute. If its value is 0 then a new label is added and result gets assigned to the index, otherwise the label indicated by the index is changed.


  '''[[Condition|$R = Condition($F)]]'''
  '''[[AppendToLabel|$R = AppendToLabel($1)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set using
  $1 = Source


=== EQ ( == )  ===
=== CreateLabelAlias ===


Determines if 2 values are numerically close to each other
Creates a label alias from 'Text' and adds it to the 'Target Label' which must be a label from a label list. Returns non zero if there was a problem creating the alias because 'Text' is already assigned to another label index.


  '''[[EQ|$R = $1 == $2]]'''
  '''[[CreateLabelAlias|$R = CreateLabelAlias($1,$2)]]'''
   
   
  $R = Result
  $R = Error Result
  $1 = Value 1
  $1 = Text
  $2 = Value 2
  $2 = Target Label


=== GE ( >= )  ===
=== CreateMD5Hash ===


Determines if the first value is greater than or equal to the second
Uses the 3 text sources to create an unpredictable hash string


  '''[[GE|$R = $1 >= $2]]'''
  '''[[CreateMD5Hash|$R = CreateMD5Hash($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Text
  $2 = Value 2
$2 = Salt 1
  $3 = Salt 2


=== GT ( > )  ===
=== CropToCharacters ===


Determines if the first value is significantly greater than the second value
Crop a label to a subset of its text


  '''[[GT|$R = $1 > $2]]'''
  '''[[CropToCharacters|CropToCharacters($R,$1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = From Char
  $2 = Value 2
  $2 = To Char


=== LE ( <= )  ===
=== ExtractIntoFormat ===


Determines if the first value is less than or equal to the second
Extracts a substring from a formatted value/label and interprets it in the format of the target. If the target is a label list, it gets added as a label if its not already in that list.


  '''[[LE|$R = $1 <= $2]]'''
  '''[[ExtractIntoFormat|$R = ExtractIntoFormat($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Label
  $2 = Value 2
  $2 = From Char
$3 = To Char


=== LT ( < )  ===
=== FileSHA ===


Determines if the first value is significantly less than the second value
Creates 64 character checksum for file using SHA256. If text_file is 1 then the file is expected to be text and CR characters, if present, are ignored.


  '''[[LT|$R = $1 < $2]]'''
  '''[[FileSHA|$R = FileSHA($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = File
  $2 = Value 2
  $2 = TextFile


=== NEQ ( != )  ===
=== FormatIntoLabel ===


Determines if 2 values are not numerically close to each otherclose to each other
Create a new label with the formatted text of the source


  '''[[NEQ|$R = $1 != $2]]'''
  '''[[FormatIntoLabel|FormatIntoLabel($R,$1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Source
$2 = Value 2


== Message  ==
=== FormatIntoLabelIndex ===


=== Broadcast  ===
Creates a label from the text of source and using the provided index


Sends a broadcast to the entire model, optionally including the item's attributes
  '''[[FormatIntoLabelIndex|$R = FormatIntoLabelIndex($1,$2)]]'''
 
  '''[[Broadcast|Broadcast($1,$2)]]'''
   
   
  $1 = Broadcast Index
$R = Result
  $2 = With Item Info
  $1 = Source
  $2 = Index


=== BroadcastScoped  ===
=== FormatNameIntoLabel ===


Sends a broadcast to a specified dynamic panel and all under it, optionally including the item's attributes
Creates a label from the name of the given object


  '''[[BroadcastScoped|BroadcastScoped($1,$2,$3)]]'''
  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
   
   
  $1 = Broadcast Index
  $R = Result
  $2 =  With Item Info
  $1 = Source
$3 = Send To Subsystem


=== BroadcastToPanel  ===
=== FormattedLabelIndex ===


Sends a broadcast to a specified dynamic panel, optionally including the item's attributes
Determines if the source text is a label and returns its index if it is


  '''[[BroadcastToPanel|BroadcastToPanel($1,$2,$3)]]'''
  '''[[FormattedLabelIndex|$R = FormattedLabelIndex($1)]]'''
   
   
  $1 = Broadcast Index
  $R = Result
  $2 =  With Item Info
  $1 = Source
$3 = Send To Subsystem


=== ImmediateMessage  ===
=== FormattedWidth ===


Send a message whilst the item waits at the change object
Returns how many characters the referenced data has when it is formatted for display


  '''[[ImmediateMessage|ImmediateMessage($1)]]'''
  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
   
   
  $1 = Message Target
$R = Target
  $1 = Width Of


=== ImmediateMessageNamed  ===
=== FormatTitleIntoLabel ===


Send a message to a specified portal with a specific name whilst the item waits at the change object  
Creates a label from the title text of the given object


  '''[[ImmediateMessageNamed|ImmediateMessageNamed($1,$2)]]'''
  '''[[FormatTitleIntoLabel|$R = FormatTitleIntoLabel($1)]]'''
   
   
  $1 = Message Target
  $R = Result
  $2 = Message Name
  $1 = Source


=== ReleaseWaitingItem  ===
=== GetAppDataName ===


Used to signal a waiting dispatcher on the target panel that a given item should be released
Get a full Users/username/AppData/Roaming path/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.


  '''[[ReleaseWaitingItem|$R = ReleaseWaitingItem($1,$2)]]'''
  '''[[GetAppDataName|$R = GetAppDataName($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Item Index
  $1 = Folder
  $2 = Scope Panel
  $2 = Filename


=== ReverseItemDirection  ===
=== GetCharacter ===


Searches spatial links for the item and if found, reverses the direction of the item
Extracts a character from the formatted value provided and returns the ascii code


  '''[[ReverseItemDirection|$R = ReverseItemDirection($1,$2)]]'''
  '''[[GetCharacter|$R = GetCharacter($1,$2)]]'''
   
   
  $R = Result
  $R = Target 
  $1 = Item Index
  $1 = String
  $2 = Scope Panel
  $2 = Character


== Numeric  ==
=== GetMyDocumentsName ===


=== abs  ===
Get a full Users/username/Documents path/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.


Magnitude of a value, without the sign
  '''[[GetMyDocumentsName|$R = GetMyDocumentsName($1,$2)]]'''
 
  '''[[Abs|$R = abs($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Folder
$2 = Filename


=== max  ===
=== GetProgramName ===


Determines the greater of 2 values
Get the folder containing the running Planimate EXE and append a filename. If Result is text, it is set to the path, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero.


  '''[[Max|$R = max($1,$2)]]'''
  '''[[GetProgramName|$R = GetProgramName($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Filename
$2 = Value 2


=== min  ===
=== GetSharedAppDataName ===


Determines the lesser of 2 values
Get a full ProgramData/AppData/Roaming/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.


  '''[[Min|$R = min($1,$2)]]'''
  '''[[GetSharedAppDataName|$R = GetSharedAppDataName($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Folder
  $2 = Value 2
  $2 = Filename


=== mod  ===
=== LogMessage ===


Modulus of $1 over base $2
Writes text to the debug logger window and the planimat.dbg file if either enabled. Text can be a text expression including attributes and labels as well as quoted text, combined with the & character.


  '''[[Mod|$R = mod($1,$2)]]'''
  '''[[LogMessage|LogMessage($1)]]'''
   
   
  $R = Result
  $1 = Text
$1 = Value 1
$2 = Value 2


=== random  ===
=== RemapName ===


Random value between 0 and 1
Uses the model ini file remapping to remap text, typically used for filenames. Multiple components can be combined with | separating them.


  '''[[Random|$R = random($F)]]'''
  '''[[RemapName|$R = RemapName($1)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Source Text


=== round  ===
=== RemoveFileExtention ===


Integer closest to the value
Crop label to remove trailing dot and text


  '''[[Round|$R = round($1)]]'''
  '''[[RemoveFileExtention|RemoveFileExtention($R)]]'''
   
   
  $R = Result
  $R = Result
$1 = Round Value


=== RoundToN  ===
=== RenameLabel ===


Round value to the specified number of digits of precision
Change the text of a label. Result must be a label list formatted attribute. If its value is 0 then a new label is added and result gets assigned to the index, otherwise the label indicated by the index is changed.


  '''[[RoundToN|$R = RoundToN($1,$2)]]'''
  '''[[RenameLabel|$R = RenameLabel($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Round Value
  $1 = Source
$2 = Sig. Digits


=== trunc  ===
=== RenameObject ===


Integer equal or lower than the value
Sets the display name of an object. The name may be adjusted if it is not unique on the panel for that kind of object.


  '''[[Trunc|$R = trunc($1)]]'''
  '''[[RenameObject|RenameObject($1,$2)]]'''
   
   
  $R = Result
  $1 = Object
  $1 = Truncate
  $2 = New Name


== Paint  ==
=== SetFreeTextTitle ===


=== CopyPaintObject  ===
Sets title of free text editor dialog


Enables a paint object to be copied, optionally keeping it inherited from the given master
'''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
$1 = Title Text


'''[[CopyPaintObject|$R = CopyPaintObject($1,$2,$3)]]'''
== Logical ==
$R = New Paint Label
$1 = Original Paint Label
$2 = Destination Panel
$3 = Inherit The Copy


=== CopyPaintProperties  ===
=== BitAND ===


Copies the graphical properties between paint objects
Treat values as integers and bitwise AND them (limited to 14 bits of precision)


  '''[[CopyPaintProperties|CopyPaintProperties($1,$2)]]'''
  '''[[BitAND|$R = BitAND($1,$2)]]'''
   
   
  $1 = Paint Object To Update
$R = Result
  $2 = Original Paint Object
  $1 = Value 1
  $2 = Value 2


=== DeleteAllPaintObjects  ===
=== BitOR ===


Delete all paint objects on the given panel
Treat values as integers and bitwise OR them (limited to 14 bits of precision)


  '''[[DeleteAllPaintObjects|DeleteAllPaintObject($1)]]'''
  '''[[BitOR|$R = BitOR($1,$2)]]'''
   
   
  $1 = Target Panel
  $R = Result
$1 = Value 1
$2 = Value 2


=== DeleteInheritedPaintObjects  ===
=== BitXOR ===


Removes all paint objects which inherit from a given panel
Treat values as integers and bitwise XORs them (limited to 14 bits of precision)


  '''[[DeleteInheritedPaintObjects|DeleteInheritedPaintObjects($1,$2)]]'''
  '''[[BitXOR|$R = BitXOR($1,$2)]]'''
   
   
  $1 = Target Pane
$R = Result
  $2 = Un Inherit Panel
  $1 = Value 1
  $2 = Value 2


=== DeletePaintObject  ===
=== EQ ( == ) ===


Deletes a paint object
Determines if 2 values are numerically close to each other


  '''[[DeletePaintObject|DeletePaintObject($1,$2)]]'''
  '''[[EQ|$R = $1 == $2]]'''
   
   
  $1 = Paint Label
$R = Result
  $2 = With Inherited
  $1 = Value 1
  $2 = Value 2


=== GetPaintProperty  ===
=== GE ( >= ) ===


Read a property of a paint object
Determines if the first value is greater than or equal to the second


  '''[[GetPaintProperty|$R = GetPaintProperty($1,$2)]]'''
  '''[[GE|$R = $1 >= $2]]'''
   
   
  $R = Result
  $R = Result
  $1 = Paint Object Label
  $1 = Value 1
  $2 = Property Label
  $2 = Value 2


=== InheritPaintObjects  ===
=== GT ( > ) ===


Enables a panel to be populated with paint objects from another panel
Determines if the first value is significantly greater than the second value


  '''[[InheritPaintObjects|InheritPaintObjects($1,$2)]]'''
  '''[[GT|$R = $1 > $2]]'''
   
   
  $1 = Target Panel
$R = Result
  $2 = Inherit From Panel
  $1 = Value 1
  $2 = Value 2


=== InterpolateColor  ===
=== LE ( <= ) ===


Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)
Determines if the first value is less than or equal to the second


  '''[[InterpolateColor|$R = InterpolateColor($1,$2,$3)]]'''
  '''[[LE|$R = $1 <= $2]]'''
   
   
  $R = Result
  $R = Result
  $1 = Color1
  $1 = Value 1
  $2 = Color2
  $2 = Value 2
$3 = Ratio


=== SetNoteVisible  ===
=== LT ( < ) ===


Shows or hides an RTF note
Determines if the first value is significantly less than the second value


  '''[[SetNoteVisible|SetNoteVisible($1,$2)]]'''
  '''[[LT|$R = $1 < $2]]'''
   
   
  $1 = Paint Object Label
$R = Result
  $2 = Visibility
  $1 = Value 1
  $2 = Value 2


=== SetPaintImage  ===
=== NEQ ( != ) ===


Sets the image of a paint object
Determines if 2 values are not numerically close to each otherclose to each other


  '''[[SetPaintImage|SetPaintImage($1,$2)]]'''
  '''[[NEQ|$R = $1 != $2]]'''
   
   
  $1 = Paint Object Label
$R = Result
  $2 = Set Image To
  $1 = Value 1
  $2 = Value 2
 
== Message ==


=== SetPaintPosition  ===
=== Broadcast ===


Moves a paint object to a new position
Sends a broadcast to the entire model. Options can be 0 or a combination of values from the Broadcast Options label list.


  '''[[SetPaintPosition|SetPaintPosition($1,$2,$3)]]'''
  '''[[Broadcast|Broadcast($1,$2)]]'''
   
   
  $1 = Paint Object Label
  $1 = Broadcast Index
  $2 = X Pos (lower left)
  $2 = Broadcast Options
$3 = Y Pos (lower left)


=== SetPaintProperty  ===
=== BroadcastLocal ===


Set a property of a paint object directly
Sends the broadcast scoped to the portal containing the object sending it, with item attributes. The broadcast is initiated immediately.


  '''[[SetPaintProperty|SetPaintProperty($1,$2,$3)]]'''
  '''[[BroadcastLocal|BroadcastLocal($1)]]'''
   
   
  $1 = Paint Object Label
  $1 = Broadcast
$2 = Property Label
$3 = Property Value


=== SetPaintText  ===
=== BroadcastScoped ===


Sets the text of a paint object
Sends a broadcast to a specified dynamic panel and all under it. Options can be 0 or a combination of values from the Broadcast Options label list.


  '''[[SetPaintText|SetPaintText($1,$2,$3)]]'''
  '''[[BroadcastScoped|BroadcastScoped($1,$2,$3)]]'''
   
   
  $1 = Paint Object Label
  $1 = Broadcast Index
  $2 = Set Text/File To
  $2 = Broadcast Options
  $3 = For All States
  $3 = Send To Subsystem


=== SetPaintTip  ===
=== BroadcastToPanel ===


Sets the tool tip text of a paint object
Sends a broadcast to a specified dynamic panel. Options can be 0 or a combination of values from the Broadcast Options label list.


  '''[[SetPaintTip|SetPaintTip($1,$2,$3)]]'''
  '''[[BroadcastToPanel|BroadcastToPanel($1,$2,$3)]]'''
   
   
  $1 = Paint Object Label
  $1 = Broadcast Index
  $2 = Set Tip To
  $2 = Broadcast Options
  $3 = For All States
  $3 = Send To Subsystem


== Route  ==
=== ImmediateMessage ===


=== AssignRoute  ===
Send a message whilst the item waits at the change object


Sets an item's track route from a route table
  '''[[ImmediateMessage|ImmediateMessage($1)]]'''
 
  '''[[AssignRoute|AssignRoute($1)]]'''
   
   
  $1 = Timetable Source
  $1 = Message Target


<br>
=== ImmediateMessageNamed ===


=== ClearRoute  ===
Send a message to a specified portal with a specific name whilst the item waits at the change object


Clear an item's routing database
  '''[[ImmediateMessageNamed|ImmediateMessageNamed($1,$2)]]'''
 
  '''[[ClearRoute|ClearRoute()]]'''
   
   
$1 = Message Target
$2 = Message Name 


<br>
=== ReleaseWaitingItem ===


=== EnableTrackCheckNext  ===
Used to signal a waiting dispatcher on the target panel that a given item should be released


Used during lookahead, this enables a modeller to signal objects downstream of a lookahead that the current lookahead is for track capacity purposes and wont be taken immediately. It automatically resets when lookahead unwinds behind the routine.
  '''[[ReleaseWaitingItem|$R = ReleaseWaitingItem($1,$2)]]'''
 
  '''[[EnableTrackCheckNext|EnableTrackCheckNext()]]'''
   
   
$R = Result
$1 = Item Index
$2 = Scope Panel


=== FillRouteSteps  ===
=== ReverseItemDirection ===


Fills in all intermediate portals and loops in an item's track route
Searches spatial links for the item and if found, reverses the direction of the item


  '''[[FillRouteSteps|FillRouteSteps($1)]]'''
  '''[[ReverseItemDirection|$R = ReverseItemDirection($1,$2)]]'''
   
   
  $1 = Include Loops (1=yes)
$R = Result
  $1 = Item Index
$2 = Scope Panel
 
== Numeric ==


=== InsertRouteStep  ===
=== abs ===


Insert a track route step into an item's internal routing database
Magnitude of a value, without the sign


  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
  '''[[abs|$R = abs($1)]]'''
   
   
  $1 = Route Step
  $R = Result
  $2 = Route Location
  $1 = Value 1
 
<br>


=== ReadRoute  ===
=== Convolve ===


Reads an item's track route into a table
Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.”


  '''[[ReadRoute|ReadRoute($R)]]'''
  '''[[Convolve|Convolve($R,$1,$2)]]'''
   
   
  $R = Timetable Target
  $R = Result
 
$1 = Column 1
<br>
$2 = Column 2


=== RegisterBlockedTrain  ===
=== fmod ===


Register the item (train) into the track blocked list
Floating point modulus of $1 over base $2


  '''[[RegisterBlockedTrain|RegisterBlockedTrain()]]'''
  '''[[fmod|$R = fmod($1,$2)]]'''
   
   
$R = Result
$1 = Value 1
$2 = Value 2


=== RoadsInTrackSection  ===
=== max ===


Returns how many roads a given track section has been configured for
Determines the greater of 2 values


  '''[[RoadsInTrackSection|$R = RoadsInTrackSection($1)]]'''
  '''[[max|$R = max($1,$2)]]'''
   
   
  $R = Target
  $R = Result
  $1 = Section
  $1 = Value 1
$2 = Value 2


=== SetActAsJunction  ===
=== min ===


Enables the Act As Junction flag to be set or cleared for a given portal on a track network
Determines the lesser of 2 values


  '''[[SetActAsJunction|SetActAsJunction($1,$2)]]'''
  '''[[min|$R = min($1,$2)]]'''
   
   
  $1 = Portal On Track
$R = Result
  $2 = Act As Junction
  $1 = Value 1
  $2 = Value 2


=== SetOncomingCheck  ===
=== mod ===


Enables the Oncoming Train Check flag to be set or cleared for a given portal on a track network
Integer modulus of $1 over base $2


  '''[[SetOncomingCheck|SetOncomingCheck($1,$2)]]'''
  '''[[mod|$R = mod($1,$2)]]'''
   
   
  $1 = Portal On Track
$R = Result
  $2 = Oncoming Check
  $1 = Value 1
  $2 = Value 2


=== TrackSectionType  ===
=== Normalise ===


Returns the type of a track section (_section_types label list)
Rescales data in column so they add up to 1


  '''[[TrackSectionType|$R = TrackSectionType($1)]]'''
  '''[[Normalise|Normalise($1)]]'''
   
   
$R = Target
  $1 = Column
  $1 = Section


=== UnblockTrain  ===
=== random ===


Attempt unblock of specific train id or all blocked trains if id is 0  
Random value between 0 and 1
<pre>[[UnblockTrain|UnblockTrain($1)]]


$1 Item ID
'''[[random|$R = random($F)]]'''
 
</pre>
$R = Result
<br>
  $F = Set to
 
== Row/Column ==


=== Average  ===
=== round ===


Determines the average of values in a row or column
Integer closest to the value


  '''[[Average|$R = Average($1,$2,$3)]]'''
  '''[[round|$R = round($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Average of
  $1 = Round Value
$2 = From
$3 = To


=== MaxIndex  ===
=== RoundToN ===


Determines the index of the highest value in a row or column
Round value to the specified number of digits of precision


  '''[[MaxIndex|$R = MaxIndex($1,$2,$3)]]'''
  '''[[RoundToN|$R = RoundToN($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Max of
  $1 = Round Value
  $2 = From
  $2 = Sig. Digits
$3 = To


=== MinIndex  ===
=== trunc ===


Determines the index of the lowest value in a row or column
Integer equal or lower than the value


  '''[[MinIndex|$R = MinIndex($1,$2,$3)]]'''
  '''[[trunc|$R = trunc($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Min of
  $1 = Truncate
$2 = From
 
$3 = To
== Paint ==


=== StdDev  ===
=== BlendColors ===


Determines the Standard Deviation of values in a row or column
Returns the resulting colour (always opaque) you would get if a black surface was painted with Color1 then Color2.


  '''[[StdDev|$R = StdDev($1,$2,$3)]]'''
  '''[[BlendColors|$R = BlendColors($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = StdDev of
  $1 = Color1
  $2 = From
  $2 = Color2
$3 = To


=== Sum  ===
=== CopyPaintObject ===


Determines the sum of values in a row or column
Enables a paint object to be copied


  '''[[Sum|$R = Sum($1,$2,$3)]]'''
  '''[[CopyPaintObject|$R = CopyPaintObject($1,$2)]]'''
   
   
  $R = Result
  $R = New Paint Label     
  $1 = Sum of
  $1 = Original Paint Label
  $2 = From
  $2 = Destination Panel 
$3 = To


=== SumSquared  ===
=== CopyPaintProperties ===


Determines the sum of squares of values in a row or column
Copies the graphical properties between paint objects


  '''[[SumSquared|$R = SumSquared($1,$2,$3)]]'''
  '''[[CopyPaintProperties|CopyPaintProperties($1,$2)]]'''
   
   
$R = Result
  $1 = Paint Object To Update
  $1 = Sum/Sqr of
  $2 = Original Paint Object
  $2 = From
$3 = To
 
== Scientific  ==


=== arccos  ===
=== CreateTiles ===


Inverse cosine function, returns radians
Creates a tileset from an image. (0,0) is the center of image. Existing tileset file is deleted. Returns 0 on success.


  '''[[Arccos|$R = arccos($1)]]'''
  '''[[CreateTiles|$R = CreateTiles($1,$2,$3,$4)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Image File
$2 = Tile Set
$3 = MaxZoom
$4 = Margin Colour


=== arcsin  ===
=== DeleteAllPaintObjects ===


Inverse sine function, returns radians
Delete all paint objects on the given panel


  '''[[Arcsin|$R = arcsin($1)]]'''
  '''[[DeleteAllPaintObjects|DeleteAllPaintObject($1)]]'''
   
   
$R = Result
  $1 = Target Panel
  $1 = Value


=== arctan  ===
=== DeleteInheritedPaintObjects ===


Inverse tan function, returns radians
Removes all paint objects which inherit from a given panel


  '''[[Arctan|$R = arctan($1)]]'''
  '''[[DeleteInheritedPaintObjects|DeleteInheritedPaintObjects($1,$2)]]'''
   
   
  $R = Result
  $1 = Target Pane   
  $1 = Value
  $2 = Un Inherit Panel


=== atan2  ===
=== DeletePaintObject ===


Determines angle (in radians) given x and y displacement
Deletes a paint object


  '''[[Atan2|$R = atan2($1,$2)]]'''
  '''[[DeletePaintObject|DeletePaintObject($1,$2)]]'''
   
   
$R = Result
  $1 = Paint Label 
  $1 = Numerator (Y)
  $2 = With Inherited
  $2 = Denominator (X)


=== cos  ===
=== FitPaint ===


Cosine function, value in radians
Fits a paint object to its contents.


  '''[[Cos|$R = cos($1)]]'''
  '''[[FitPaint|FitPaint($1)]]'''
   
   
$R = Result
  $1 = Paint ID
  $1 = Value


=== DegToRad  ===
=== GetPaintProperty ===


Converts degrees to radians
Read a property of a paint object


  '''[[DegToRad|$R = DegToRad($1)]]'''
  '''[[GetPaintProperty|$R = GetPaintProperty($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Paint Object Label
$2 = Property Label   


=== exp  ===
=== InheritPaintObjects ===


Calculates $1 to the power of E
Enables a panel to be populated with paint objects from another panel


  '''[[Exp|$R = exp($1)]]'''
  '''[[InheritPaintObjects|InheritPaintObjects($1,$2)]]'''
   
   
  $R = Result
  $1 = Target Panel     
  $1 = Value
  $2 = Inherit From Panel


=== hypot  ===
=== InterpolateColor ===


Hypotenuse of right angled triangle with given sides
Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)


  '''[[Hypot|$R = hypot($1,$2)]]'''
  '''[[InterpolateColor|$R = InterpolateColor($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = X Value
  $1 = Color1
  $2 = Y Value
  $2 = Color2
$3 = Ratio


=== log10  ===
=== LinkPaintObjects ===


Calculates the decimal logarithm of the value
Associate a paint object to a parent so it tracks movement of the parent. Parent and linked are paint objects. Edge values determine which edge/corner is used (1..9, 1=topleft, 2=top, 3=topright etc). Options: 1 auto-delete linked paint object when parent becomes hidden.


  '''[[Log10|$R = log10($1)]]'''
  '''[[LinkPaintObjects|LinkPaintObjects($1,$2,$3,$4,$5,$6,$7)]]'''
   
   
  $R = Result
  $1 = Parent
  $1 = Value
$2 = Linked
$3 = Parent Edge
$4 = Linked Edge
$5 = Offset X
  $6 = Offset Y
$7 = Options


=== logN  ===
=== LongLatToXY ===


Calculates the natural logarithm of the value
Using the Map paint object, Longitude/Latitude co-ordinates are translated to panel X/Y points. Table must contain columns _Long, _Lat, _X and _Y


  '''[[LogN|$R = logN($1)]]'''
  '''[[LongLatToXY|LongLatToXY($1,$2)]]'''
   
   
  $R = Result
  $1 = Paint Map Label
  $1 = Value
  $2 = Table


=== pow  ===
=== MakeRangeVisible ===


Calculates $1 to the power of $2
Adjusts the map co-ordinates to make the range of co-ordinates visible regardless of the map view's aspect ratio


  '''[[Pow|$R = pow($1,$2)]]'''
  '''[[MakeRangeVisible|MakeRangeVisible($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $1 = Paint Map Label
  $1 = Value
$2 = Long From
  $2 = Power
$3 = Lat From
  $4 = Long To
  $5 = Lat To


=== RadToDeg  ===
=== PositionPaintObject ===


Converts radians to degrees
Move a paint object given a parent's position. Parent and Paint are paint objects. Edge values determine which edge/corner is used (1..9, 1=topleft, 2=top, 3=topright etc). Parent=0 uses panel edge.


  '''[[RadToDeg|$R = RadToDeg($1)]]'''
  '''[[PositionPaintObject|PositionPaintObject($1,$2,$3,$4,$5,$6)]]'''
   
   
  $R = Result
  $1 = Parent
  $1 = Value
$2 = Paint
 
  $3 = Parent Edge
=== sin  ===
$4 = Paint Edge
$5 = Offset X
$6 = Offset Y
 
=== RepaintPaintObject ===


Sine function, value in radians
Repaint a single paint object. Useful if the object's contents have changed but it hasn't moved or changed size. Clear colour can be used to erase under the paint object when anti-aliasing causes blending noise to linger.


  '''[[Sin|$R = sin($1)]]'''
  '''[[RepaintPaintObject|RepaintPaintObject($1,$2)]]'''
   
   
  $R = Result
  $1 = Paint Label 
  $1 = Value
  $2 = Clear Color


=== sqr  ===
=== ScaleColor ===


Value multiplied by itself
Scales the R/G/B components of a colour by Scale and adds Offset to each. Scale and Offset are normally 0..255. The alpha is unchanged.


  '''[[Sqr|$R = sqr($1)]]'''
  '''[[ScaleColor|$R = ScaleColor($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Color
$2 = Scale
$3 = Offset


=== sqrt  ===
=== SetLongLatXY ===


Square root of value
Sets paint map to show the given co-ordinate as close as possible to the panel (x,y) point.


  '''[[Sqrt|$R = sqrt($1)]]'''
  '''[[SetLongLatXY|SetLongLatXY($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $1 = Paint Map Label
  $1 = Value
$2 = Longitude
$3 = Latitude
  $4 = X
$5 = Y


=== tan  ===
=== SetNoteVisible ===


Tan function, value in radians
Shows or hides an RTF note


  '''[[Tan|$R = tan($1)]]'''
  '''[[SetNoteVisible|SetNoteVisible($1,$2)]]'''
   
   
  $R = Result
  $1 = Paint Object Label
  $1 = Value
  $2 = Visibility       
 
== Spatial Link  ==


=== AddBendPoint  ===
=== SetPaintImage ===


Adds a bend point to a spatial link between the two objects specified
Sets the image of a paint object


  '''[[AddBendPoint|AddBendPoint($R,$1,$2,$3)]]'''
  '''[[SetPaintImage|SetPaintImage($1,$2,$3)]]'''
   
   
$R = From Object
  $1 = Paint Object Label
  $1 = To Object
  $2 = Set Image To
  $2 = X Position
  $3 = All States
  $3 = Y Position


=== AddDirectionalLink  ===
=== SetPaintProperty ===


Adds a spatial link between objects which can only be traversed in the forward direction
Set a property of a paint object directly


  '''[[AddDirectionalLink|AddDirectionalLink($1,$2)]]'''
  '''[[SetPaintProperty|SetPaintProperty($1,$2,$3)]]'''
   
   
  $1 = From Object
  $1 = Paint Object Label
  $2 = To Object
  $2 = Property Label   
$3 = Property Value   


=== AddSpatialLink  ===
=== SetPaintText ===


Add a spatial link between the two objects labels specified
Sets the text of a paint object


  '''[[AddSpatialLink|AddSpatialLink($1,$2)]]'''
  '''[[SetPaintText|SetPaintText($1,$2,$3)]]'''
   
   
  $1 = From Object
  $1 = Paint Object Label
  $2 = To Object
  $2 = Set Text/File To
$3 = For All States   


=== ClearSpatialCache  ===
=== SetPaintTip ===


Instructs Planimate to update spatial link information after links are created or objects are moved
Sets the tool tip text of a paint object


  '''[[ClearSpatialCache|ClearSpatialCache()]]'''
  '''[[SetPaintTip|SetPaintTip($1,$2,$3)]]'''
   
   
$1 = Paint Object Label
$2 = Set Tip To 
$3 = For All States   


=== CopySpatialLink  ===
=== SetPaintXY ===


Creates a spatial link between objects, copying an existing link's properties
Moves a paint object so a given edge/corner is at (X,Y). Edge=1..9 (1=topleft, 2=topcenter, 5=center, 7=bottomleft etc.)


  '''[[CopySpatialLink|CopySpatialLink($1,$2,$3)]]'''
  '''[[SetPaintXY|SetPaintXY($1,$2,$3,$4)]]'''
   
   
  $1 = From Object
  $1 = Paint Object Label
  $2 = To Object
  $2 = X Pos
  $3 = Copy Link
  $3 = Y Pos
$4 = Edge


=== DeletePanelSpatialLinks  ===
=== SetTransparency ===


Deletes all spatial links on a given panel
Sets the transparency (alpha) value of a colour


  '''[[DeletePanelSpatialLinks|DeletePanelSpatialLinks($1)]]'''
  '''[[SetTransparency|$R = SetTransparency($1,$2)]]'''
   
   
  $1 = Panel
$R = Result
  $1 = Color
$2 = Transparency


=== RemoveSpatialLink  ===
=== XYToLongLat ===


Removes any spatial links from and to the specified object labels (directional)
Using the Map paint object, screen X/Y points are translated to Longitude/Latitude co-ordinates. Table must contain columns _Long, _Lat, _X and _Y


  '''[[RemoveSpatialLink|RemoveSpatialLink($1,$2)]]'''
  '''[[XYToLongLat|XYToLongLat($1,$2)]]'''
   
   
  $1 = From Object
  $1 = Paint Map Label
  $2 = To Object
  $2 = Table
 
== Pipe ==


=== SetItemTransitTarget  ===
=== AddPipe ===


Sets the destination an item will look for once it enters a spatial link
Creates a pipe between From and To if one doesn't exist and allocates an object label for the new pipe, which is returned. If Copy Pipe is a valid pipe object label then its properties are copied.


  '''[[SetItemTransitTarget|SetItemTransitTarget($1)]]'''
  '''[[AddPipe|$R = AddPipe($1,$2,$3)]]'''
   
   
  $1 = To Target
$R = New Pipe
  $1 = From
$2 = To
$3 = Copy Pipe


=== SetItemTransitTime  ===
=== RemovePipe ===


Sets the time an item will take to reach its destination once it enters a spatial link
Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.


  '''[[SetItemTransitTime|SetItemTransitTime($1)]]'''
  '''[[RemovePipe|RemovePipe($1,$2)]]'''
   
   
  $1 = To Time
  $1 = From
$2 = To
 
== Route ==


=== SetLinkColor  ===
=== AddStaticRoute ===


Sets the color of a spatial link between 2 given objects
Adds a new static route with given name and ID. The route steps start at the starting_cell, working down for step_count. Fill_steps determines if steps are filled after adding the route. If a route with the ID already exists, it is replaced. If ID is 0, a new ID gets allocated. Returns the ID of the route that gets created/modified (>0) or <0 on failure. Do not replace a static route which is being used by any items.


  '''[[SetLinkColor|SetLinkColor($1,$2,$3)]]'''
  '''[[AddStaticRoute|$R = AddStaticRoute($1,$2,$3,$4,$5)]]'''
   
   
  $1 = From Object
$R = Result
  $2 = To Object
  $1 = Name
  $3 = Color
  $2 = Route ID
  $3 = Starting Cell
$4 = Step Count
$5 = Fill Steps


=== SetLinkCost  ===
=== AddTrack ===


Sets the link cost of a spatial link (normally computed from the link's distance)
Creates a track between From and To if one doesn't exist and an object label is created and returned for the new track section.


  '''[[SetLinkCost|SetLinkCost($1,$2,$3)]]'''
  '''[[AddTrack|$R = AddTrack($1,$2,$3)]]'''
   
   
  $1 = From Object
$R = New Track
  $2 = To Object
  $1 = From
  $3 = Cost
  $2 = To
  $3 = Track Type


=== SetSpatialLinkWidth  ===
=== AssignRoute ===


Sets the width of a spatial link between two objects
Sets an item's track route from a route table


  '''[[SetSpatialLinkWidth|SetSpatialLinkWidth($1,$2,$3)]]'''
  '''[[AssignRoute|AssignRoute($1)]]'''
   
   
  $1 = From Object
  $1 = Timetable Source
$2 = To Object
$3 = Width
 
== Special  ==


=== ---| Only During Move |---  ===
=== AssignRouteFrom ===


Enables the modeller to specifically mark that the following routine lines do not execute during lookahead
Sets an item's track route from locations specified by cells working down from start, stopping when either count is reached or a zero cell. Returns 0 if no error.


  '''[[---| Only During Move |---||----- Following Only During Move -----|]]'''
  '''[[AssignRouteFrom|$R = AssignRouteFrom($1,$2)]]'''
   
   
$R = Result
$1 = Starting Cell
$2 = Step Count


=== BREAKPOINTIF  ===
=== CancelLoopEntryDelay ===


If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state
Cancels a loop entry delay which is initiated for any item that may dwell at a location and is normally cancelled only if the item leaves the location immediately. This enables just a loop exit delay to occur without an associated loop entry delay.


  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
  '''[[CancelLoopEntryDelay|CancelLoopEntryDelay()]]'''
   
   
$1 = Enable Break


=== CallDLL  ===
=== ClearRoute ===


Enables a Planimate compatible DLL to be called
Clear an item's routing database


  '''[[CallDLL|$R = CallDLL($F)]]'''
  '''[[ClearRoute|ClearRoute()]]'''
   
   
$R = Result
$F = Set to


=== CallRoutine  ===
=== ClearTrailList ===


Calls a subroutine
Clears a train's history of sections it has traversed


  '''[[CallRoutine|CallRoutine($F)]]'''
  '''[[ClearTrailList|ClearTrailList()]]'''
   
   
$F = Call


=== Comment (//)  ===
=== CreateRoute ===


A comment line
Creates a route of all steps between the two locations. Returns non zero and sets s.TrackFillRouteError on error.


  '''[[Comment|Comment]]'''
  '''[[CreateRoute|$R = CreateRoute($1,$2)]]'''
   
   
$R = Result
$1 = From
$2 = To


=== CopyFont  ===
=== EnableTrackCheckNext ===


Copies the font properties between cells and columns
Used during lookahead, this enables a modeller to signal objects downstream of a lookahead that the current lookahead is for track capacity purposes and wont be taken immediately. It automatically resets when lookahead unwinds behind the routine.


  '''[[CopyFont|CopyFont($R,$1)]]'''
  '''[[EnableTrackCheckNext|EnableTrackCheckNext()]]'''
   
   
$R = Format Result
$1 = Format From


=== CopyFormat  ===
=== FillRouteSteps ===


Copies the format/unit type/label reference between cells, columns and attributes
Fills in all intermediate portals in an item's track route. Returns non zero on error in which case s.FillRouteError is set to a description


  '''[[CopyFormat|CopyFormat($R,$1)]]'''
  '''[[FillRouteSteps|$R = FillRouteSteps()]]'''
   
   
  $R = Format Result
  $R = Result
$1 = Format From


=== DescribeRoutineData  ===
=== GenerateTrackTable ===


Describe the data accessed by a change object routine
Updates the Track Network Details table for the panel inside portal Location. This can change the rows in the track table. Result is non zero if an error occured.


  '''[[DescribeRoutineData|DescribeRoutineData($1,$2,$3)]]'''
  '''[[GenerateTrackTable|$R = GenerateTrackTable($1)]]'''
   
   
  $1 = Routine Panel
  $R = Result
  $2 = Object Name
  $1 = Location
$3 = Output Filename


=== EncodeRGB  ===
=== HoldSectionRoad ===


Encodes red, green and blue components (0..255) into a single value used to specify any color
Places the road of a track section into waiting for an item state, preventing any other item using it. If Item ID is >= 0 it is used for the item ID otherwise the current item is used. Item Object is used to locate the item if Item ID is set.


  '''[[EncodeRGB|$R = EncodeRGB($1,$2,$3)]]'''
  '''[[HoldSectionRoad|HoldSectionRoad($1,$2,$3,$4)]]'''
   
   
  $R = Result
  $1 = SectionID
  $1 = Red Value
  $2 = Road#
  $2 = Green Value
  $3 = Item ID
  $3 = Blue Value
  $4 = Item Object


=== FormatForList  ===
=== InsertRouteStep ===


Formats the result object to reference a label list with the given name
Insert a track route step into an item's internal routing database


  '''[[FormatForList|FormatForList($R,$1)]]'''
  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
   
   
  $R = Format Result
  $1 = Route Step
  $1 = List Name
  $2 = Route Location


=== GetFormat  ===
=== ListBlockedTrains ===


Returns the value format of the data
Clears table and adds a row for each blocked train. Columns are filled in this order: Item ID, Blocked Time, Blocked Location


  '''[[GetFormat|$R = GetFormat($1)]]'''
  '''[[ListBlockedTrains|ListBlockedTrains($1)]]'''
   
   
$R = Result
  $1 = Table
  $1 = Data To Test


=== GetFormatListName  ===
=== PolyPathFinder ===


Creates a new label with the name of the label list the target is formatted to. If no list, no change to the target is made
Generates a series of steps for movement from start to end. PolyPoints columns 1 and 2 are used for x/y (these can be long/lat). Rows are created in WayPoints with x/y in the first 2 columns and any matching polygon row in column 3. Start and End are brought into the polygon if not already, extra waypoints are created as needed. Returns > 0 on success. UsingLongLat should be set if world co-ordinates are being used instead of pixels.


  '''[[GetFormatListName|GetFormatListName($R,$1)]]'''
  '''[[PolyPathFinder|$R = PolyPathFinder($1,$2,$3,$4,$5,$6,$7)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Data To Test
  $1 = StartX
$2 = StartY
$3 = EndX
$4 = EndY
$5 = PolyPoints
$6 = WayPoints
$7 = UsingLongLat


=== ListRoutineCode  ===
=== ReadRoute ===


Write a change object routine code to a file
Reads an item's track route into a table


  '''[[ListRoutineCode|ListRoutineCode($1,$2,$3)]]'''
  '''[[ReadRoute|ReadRoute($R)]]'''
   
   
  $1 = Routine Panel
  $R = Timetable Target
$2 = Object Name
$3 = Output Filename


=== LoadDataSet  ===
=== RegisterBlockedTrain ===


Initiates loading of a given data set from a file name specified by a label
Register the item (train) into the track blocked list


  '''[[LoadDataSet|LoadDataSet($1,$2)]]'''
  '''[[RegisterBlockedTrain|RegisterBlockedTrain()]]'''
   
   
$1 = Data Set #
$2 = File Name


=== LoadDataSet2  ===
=== RemoveStaticRoute ===


Load a version 2 dataset
Removes any static route with the given ID. Do not remove a static route which is being used by any items.


  '''[[LoadDataSet2|$R = LoadDataSet2($1,$2,$3)]]'''
  '''[[RemoveStaticRoute|RemoveStaticRoute($1)]]'''
   
   
$R = Result
  $1 = Route ID
  $1 = Definition Table
$2 = File Name
$3 = Pass Phrase


=== ObjectType  ===
=== RemoveTrack ===


Returns the type of the object that the object label refers to
Removes any track between portals From and To. If From is a track label then it is used and To is ignored.


  '''[[ObjectType|$R = ObjectType($1)]]'''
  '''[[RemoveTrack|RemoveTrack($1,$2)]]'''
   
   
  $R = Result
  $1 = From
  $1 = Object
  $2 = To


=== SaveDataSet  ===
=== ResetLoopDelayTime ===


Initiates saving of a given data set to a file name specified as a label
Resets the loop entry time for an item, useful for enabling some time to be spent in a track location without a loop exit delay being triggered. This does not affect any loop entry delay under way, it will complete at its scheduled time.


  '''[[SaveDataSet|SaveDataSet($1,$2)]]'''
  '''[[ResetLoopDelayTime|ResetLoopDelayTime()]]'''
   
   
$1 = Data Set #
$2 = File Name


=== SaveDataSet2  ===
=== RoadsInTrackSection ===


Save a version 2 dataset
Returns how many roads a given track section has been configured for


  '''[[SaveDataSet2|$R = SaveDataSet2($1,$2,$3)]]'''
  '''[[RoadsInTrackSection|$R = RoadsInTrackSection($1)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Definition Table
  $1 = Section
$2 = File Name
$3 = Pass Phrase


=== SetFormat  ===
=== SectionRoadAvail ===


Sets format of $1 to mode $2, with $3 being the label list name if its a label format
Returns where a track section road is available for an item/train to use


  '''[[SetFormat|SetFormat($1,$2,$3)]]'''
  '''[[SectionRoadAvail|$R = SectionRoadAvail($1,$2)]]'''
   
   
  $1 = Data To Set
  $R = Result
  $2 = Format
  $1 = SectionID
  $3 = List Name
  $2 = Road#


=== SetLastDataFile  ===
=== SectionRoadTrain ===


Sets the last data filename, optionally visible in the titlebar
Returns item ID of train in a track section road or -1 if no item


  '''[[SetLastDataFile|SetLastDataFile($1)]]'''
  '''[[SectionRoadTrain|$R = SectionRoadTrain($1,$2)]]'''
   
   
  $1 = Name
$R = Result
  $1 = SectionID
$2 = Road#


=== StartScheduledEntries  ===
=== SetPreviousTailData ===


Signals that scheduled entries should start (if options deferred them starting when the model was run)  
Enables taildata to be set for a road/length multiserver that a train has just left. This is useful when taildata information is not known until the front of the train leaves the road/multiserver. WhichData is 1..4 (TailData1..TailData4).


  '''[[StartScheduledEntries|StartScheduledEntries]]'''
  '''[[SetPreviousTailData|SetPreviousTailData($1,$2)]]'''
   
   
$1 = WhichData
$2 = Value


== Table  ==
=== SetRoadCheckFilter ===
 
=== AdvancedSort  ===


Performs a sort on a table using another table to define the sort criteria
This will use road #'s specified by the column starting at a given cell to determine roads to test in lookahead on a track. It stops on a zero cell.


  '''[[AdvancedSort|AdvancedSort($R,$1)]]'''
  '''[[SetRoadCheckFilter|SetRoadCheckFilter($1)]]'''
   
   
$R = Target
  $1 = Start Cell
  $1 = Sort Info


=== AllocateTableRowMemory  ===
=== SetRoadColor ===


Enables memory to be reserved for a table which is expected to grow to a large number of rows
Sets color of road in track section


  '''[[AllocateTableRowMemory|AllocateTableRowMemory($R,$1)]]'''
  '''[[SetRoadColor|SetRoadColor($1,$2,$3)]]'''
   
   
  $R = Target Table
  $1 = SectionID
  $1 = Allocate Rows
$2 = Road#
  $3 = Color   


=== AppendCol  ===
=== TrackSectionType ===


Append a column to a table
Returns the type of a track section (_section_types label list)


  '''[[AppendCol|AppendColumn($R)]]'''
  '''[[TrackSectionType|$R = TrackSectionType($1)]]'''
   
   
  $R = Target
  $R = Target
$1 = Section


=== AppendRow  ===
=== UnblockTrain ===


Append a row to the table
Attempt unblock of specific train id or all blocked trains if id is 0


  '''[[AppendRow|AppendRow($R)]]'''
  '''[[UnblockTrain|UnblockTrain($1)]]'''
   
   
  $R = Target
  $1 = Item ID


=== BlockMove  ===
=== UpdateLoopEntryDelay ===


Block copy a range of cells to another table
Sets the loop entry delay to a new value. This can be performed when a train enters a location. The delay is measured from when the original loop delay started. If no loop delay is active, the operation does nothing.


  '''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
  '''[[UpdateLoopEntryDelay|UpdateLoopEntryDelay($1)]]'''
   
   
$R = Result
  $1 = Loop Delay
  $1 = Source
$2 = # of Rows
$3 = # of Cols
 
=== CopyToClipboard  ===
 
Copy table to clipboard using its clipboard settings and the option modifiers


'''[[CopyToClipboard|CopyToClipboard($R,$1)]]'''
== Row/Column ==
$R = From Table
$1 = Options


=== CreateSortIndex  ===
=== Average ===


Creates an ordered list of row numbers if the given column was sorted alphabetically
Determines the average of values in a row or column


  '''[[CreateSortIndex|CreateSortIndex($R,$1)]]'''
  '''[[Average|$R = Average($1,$2,$3)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Column To Sort
  $1 = Average of
$2 = From
$3 = To


=== DeleteCol  ===
=== MaxIndex ===


Delete a range of columns from a table
Determines the index of the highest value in a row or column


  '''[[DeleteCol|DeleteColumn($R,$1,$2)]]'''
  '''[[MaxIndex|$R = MaxIndex($1,$2,$3)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = First Col
  $1 = Max of
  $2 = Col Count
  $2 = From
$3 = To


=== DeleteRow  ===
=== MinIndex ===


Delete a number of rows starting at a given row in a table
Determines the index of the lowest value in a row or column


  '''[[DeleteRow|DeleteRow($R,$1,$2)]]'''
  '''[[MinIndex|$R = MinIndex($1,$2,$3)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = First Row
  $1 = Min of
  $2 = Row Count
  $2 = From
$3 = To


=== EnableColumnEditing  ===
=== StdDev ===


Controls whether a given table column can be edited
Determines the Standard Deviation of values in a row or column


  '''[[EnableColumnEditing|EnableColumnEditing($R,$1)]]'''
  '''[[StdDev|$R = StdDev($1,$2,$3)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Edit Control
  $1 = StdDev of
$2 = From
$3 = To


=== GetColumnProperty  ===
=== Sum ===


Read a property of a table column  
Determines the sum of values in a row or column


  '''[[GetColumnProperty|$R = GetColumnProperty($1,$2)]]'''
  '''[[Sum|$R = Sum($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Table Column
  $1 = Sum of
  $2 = Property Label
  $2 = From
$3 = To


=== InsertCol  ===
=== SumSquared ===


Insert columns into a table with the option of copying formatting from another column  
Determines the sum of squares of values in a row or column


  '''[[InsertCol|InsertColumn($R,$1,$2,$3)]]'''
  '''[[SumSquared|$R = SumSquared($1,$2,$3)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Insert Pos.
  $1 = Sum/Sqr of
  $2 = Col Count
  $2 = From
  $3 = Copy Format
  $3 = To
 
== Scientific ==


=== InsertRow  ===
=== arccos ===


Insert a number of rows at a given row in a table
Inverse cosine function, returns radians


  '''[[InsertRow|InsertRow($R,$1,$2)]]'''
  '''[[arccos|$R = arccos($1)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Insert Pos.
  $1 = Value
$2 = Row Count


=== OutOfScopeWrite  ===
=== arcsin ===


Enable writing to item table reference $1 even if it is not in scope
Inverse sine function, returns radians


  '''[[OutOfScopeWrite|OutOfScopeWrite($1)]]'''
  '''[[arcsin|$R = arcsin($1)]]'''
   
   
  $1 = Item Table Ref
$R = Result
  $1 = Value


=== PasteFromClipboard  ===
=== arctan ===


Paste the clipboard into the table using its clipboard options and the modifiers
Inverse tan function, returns radians


  '''[[PasteFromClipboard|PasteFromClipboard($R,$1)]]'''
  '''[[arctan|$R = arctan($1)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Configure
  $1 = Value


=== PurgeDuplicateRows  ===
=== atan2 ===


Removes any identical rows from the given table
Determines angle (in radians) given x and y displacement


  '''[[PurgeDuplicateRows|PurgeDuplicateRows($R)]]'''
  '''[[atan2|$R = atan2($1,$2)]]'''
   
   
  $R = Target
  $R = Result
 
$1 = Numerator (Y)
<br>
$2 = Denominator (X)


=== Search  ===
=== cos ===


Search table until a condition is true
Cosine function, value in radians


  '''[[Search|$R = Search($F)]]'''
  '''[[cos|$R = cos($1)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Value


=== SetCellFreeText  ===
=== DegToRad ===


Sets the free text (not bound by label text rules) for a table cell
Converts degrees to radians


  '''[[SetCellFreeText|SetCellFreeText($R,$1)]]'''
  '''[[DegToRad|$R = DegToRad($1)]]'''
   
   
  $R = Target Cell
  $R = Result
  $1 = Source Cell
  $1 = Value


=== SetColAlignment  ===
=== exp ===


Enables a column's text alignment to be changed
Calculates $1 to the power of E


  '''[[SetColAlignment|SetColumnAlignment($R,$1)]]'''
  '''[[exp|$R = exp($1)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Align Mode
  $1 = Value


=== SetColSecondTitle  ===
=== hypot ===


Sets the text of the second title row for the given column
Hypotenuse of right angled triangle with given sides


  '''[[SetColSecondTitle|SetColumnSecondTitle($R,$1)]]'''
  '''[[hypot|$R = hypot($1,$2)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Title Text
  $1 = X Value
$2 = Y Value


=== SetColTitle  ===
=== log10 ===


Set the title text of a table column
Calculates the decimal logarithm of the value


  '''[[SetColTitle|SetColumnTitle($R,$1)]]'''
  '''[[log10|$R = log10($1)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Title Text
  $1 = Value


=== SetColTupleName  ===
=== logN ===


Sets the name used to internally identify a column
Calculates the natural logarithm of the value


  '''[[SetColTupleName|SetColumnTupleName($R,$1)]]'''
  '''[[logN|$R = logN($1)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Tuple Text
  $1 = Value


=== SetColumnProperty  ===
=== pow ===


Set a property of a table column
Calculates $1 to the power of $2


  '''[[SetColumnProperty|SetColumnProperty($1,$2,$3)]]'''
  '''[[pow|$R = pow($1,$2)]]'''
   
   
  $1 = Table Column
  $R = Result
  $2 = Property Label
  $1 = Value
  $3 = Property Value
  $2 = Power


=== SetColWidth  ===
=== RadToDeg ===


Sets the formatting width of a table column
Converts radians to degrees


  '''[[SetColWidth|SetColWidth($R,$1)]]'''
  '''[[RadToDeg|$R = RadToDeg($1)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Column Width
  $1 = Value


=== SetTableRowHeight  ===
=== sin ===


Sets the height of table rows
Sine function, value in radians


  '''[[SetTableRowHeight|SetTableRowHeight($1,$2)]]'''
  '''[[sin|$R = sin($1)]]'''
   
   
  $1 = Target Table
  $R = Result
  $2 = Row Height
  $1 = Value


=== SetTableTitle  ===
=== sqr ===


Set the title text of the table from the label
Value multiplied by itself


  '''[[SetTableTitle|SetTableTitle($R,$1)]]'''
  '''[[sqr|$R = sqr($1)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Title Text
  $1 = Value


=== ShiftCol  ===
=== sqrt ===


Shift the columns in a table
Square root of value


  '''[[ShiftCol|ShiftColumn($R,$1,$2)]]'''
  '''[[sqrt|$R = sqrt($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = Value
$2 = Shift &lt;+ -&gt;


=== ShiftRow  ===
=== tan ===


Shift the rows in a table
Tan function, value in radians


  '''[[ShiftRow|ShiftRow($R,$1,$2)]]'''
  '''[[tan|$R = tan($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = Value
$2 = Shift ^+ -v
 
== Spatial Link ==


=== Sort  ===
=== AddBendPoint ===


Sort table by up to 3 columns
Adds a bend point to a spatial link between the two objects specified


  '''[[Sort|Sort($R,$1,$2,$3)]]'''
  '''[[AddBendPoint|AddBendPoint($R,$1,$2,$3)]]'''
   
   
  $R = Target
  $R = From Object
  $1 = Primary Col.
  $1 = To Object
  $2 = Second Col.
  $2 = X Position
  $3 = Third Col.
  $3 = Y Position


=== TableReferenceSet  ===
=== AddDirectionalLink ===


Returns non zero if the reference resolves to a table
Adds a spatial link between objects which can only be traversed in the forward direction


  '''[[TableReferenceSet|$R = TableReferenceSet($1)]]'''
  '''[[AddDirectionalLink|$R = AddDirectionalLink($1,$2)]]'''
   
   
  $R = Result
  $R = Link ID
  $1 = Item Table Ref
  $1 = From Object
$2 = To Object


=== TableSortDialog  ===
=== AddLink ===


Enables the user to set up and perform a sort using the table sort dialog
Add a spatial link between the two objects labels specified


  '''[[TableSortDialog|TableSortDialog($R)]]'''
  '''[[AddLink|$R = AddLink($1,$2)]]'''
   
   
  $R = Target
  $R = Link ID
 
$1 = From Object
== Table View ==
  $2 = To Object


=== GetFilteredRows  ===
=== ClearLinkCache ===


Retrieves the filter mapping of view rows to actual rows into the list table
Instructs Planimate to update spatial link information after links are created or objects are moved


  '''[[GetFilteredRows|GetFilteredRows($1,$2,$3)]]'''
  '''[[ClearLinkCache|ClearLinkCache()]]'''
   
   
$1 = Filter List
$2 = Table
$3 = Panel


=== GetTableView  ===
=== CopyLink ===


Read columns of a table view into another table
Creates a spatial link between objects, copying an existing link's properties


  '''[[GetTableView|GetTableView($1,$2,$3)]]'''
  '''[[CopyLink|$R = CopyLink($1,$2,$3)]]'''
   
   
  $1 = View Table
$R = Link ID
  $2 = View Panel
  $1 = From Object
  $3 = Config Table
  $2 = To Object
  $3 = Copy Link


=== ImportIntoView  ===
=== DeletePanelLinks ===


Imports the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success
Deletes all spatial links on a given panel


  '''[[ImportIntoView|$R = ImportIntoView($1,$2,$3,$4,$5,$6,$7)]]'''
  '''[[DeletePanelLinks|DeletePanelLinks($1)]]'''
   
   
$R = Error Result
  $1 = Panel
  $1 = Table
$2 = Panel
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read


=== ReFilterTableView  ===
=== GetBendPoints ===


Reapply any active filters to the current data in the table
Reads bend points into table Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.


  '''[[ReFilterTableView|ReFilterTableView($1,$2)]]'''
  '''[[GetBendPoints|GetBendPoints($1,$2,$3)]]'''
   
   
  $1 = Table
  $1 = Bend Table
  $2 = Panel
  $2 = Panel
$3 = Link Type


=== SetTableView  ===
=== GetNextLinkObject ===


Set columns that a table view will display
Returns the next portal object index that an item will travel to on a spatial link given the item starting at 'from' and target 'to'. Returns 0 if none.


  '''[[SetTableView|SetTableView($1,$2,$3)]]'''
  '''[[GetNextLinkObject|$R = GetNextLinkObject($1,$2)]]'''
   
   
  $1 = View Table
  $R = Location
  $2 = View Panel
  $1 = From Portal
  $3 = Config Table
  $2 = To Portal


=== SetTableViewColScroll  ===
=== LinkDistance ===


Sets the column scroll of a view for a table on a given panel
Determine the spatial link travel distance between 2 portals.


  '''[[SetTableViewColScroll|SetTableViewColScroll($1,$2,$3)]]'''
  '''[[LinkDistance|$R = LinkDistance($1,$2)]]'''
   
   
  $1 = Table
  $R = Distance
  $2 = Panel
  $1 = From
  $3 = Value
  $2 = To


=== SetTableViewRowScroll  ===
=== QueryLinkItems ===


Sets the row scroll of a view for a table on a given panel
Sets table to rows describing every item on the link. Required columns are  ItemID, TotalTime, Ratio, Direction and Stopped. Ratio corresponds to the position on the link, 0 being the start of the link and 1 being the end. Direction is 0 for forward and 1 for reverse.


  '''[[SetTableViewRowScroll|SetTableViewRowScroll($1,$2,$3)]]'''
  '''[[QueryLinkItems|QueryLinkItems($1,$2)]]'''
   
   
  $1 = Table
  $1 = Table
  $2 = Panel
  $2 = Link
$3 = Value


=== TableViewColScroll  ===
=== RemoveLink ===


Reads the column scroll of a view for a table on a given panel
Removes any spatial links from and to the specified object labels (directional)


  '''[[TableViewColScroll|$R = TableViewColScroll($1,$2)]]'''
  '''[[RemoveLink|RemoveLink($1,$2)]]'''
   
   
$R = Target
  $1 = From Object
  $1 = Table
  $2 = To Object
  $2 = Panel


=== TableViewRows  ===
=== SetBendPoints ===


Reads the number of rows in a table view. If a filter is set, this may differ from the number of rows in the table
Deletes all bend points and recreates them from the Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.


  '''[[TableViewRows|$R = TableViewRows($1,$2)]]'''
  '''[[SetBendPoints|SetBendPoints($1,$2,$3)]]'''
   
   
$R = Target
  $1 = Bend Table
  $1 = Table
  $2 = Panel
  $2 = Panel
$3 = Link Type


=== TableViewRowScroll  ===
=== SetItemLinkTarget ===


Reads the row scroll of a view for a table on a given panel
Sets the destination an item will look for once it enters a spatial link. Time sets the travel time to use (or SetItemLinkTime can be used after this). Road sets the road for multi-toad links, 1..n or 0 to leave unchanged.


  '''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
  '''[[SetItemLinkTarget|SetItemLinkTarget($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = Target Object
  $1 = Table
  $2 = Total Time
  $2 = Panel
  $3 = Road


=== TableViewVisibleCols  ===
=== SetItemLinkTime ===


Reads the number of visible columns in a table view
Sets the time an item will take to reach its destination once it enters a spatial link


  '''[[TableViewVisibleCols|$R = TableViewVisibleCols($1,$2)]]'''
  '''[[SetItemLinkTime|SetItemLinkTime($1)]]'''
   
   
$R = Target
  $1 = To Time
  $1 = Table
$2 = Panel


=== TableViewVisibleRows  ===
=== SetLinkColor ===


Reads the number of visible rows in a table view
Sets the color of a spatial link between 2 given objects


  '''[[TableViewVisibleRows|$R = TableViewVisibleRows($1,$2)]]'''
  '''[[SetLinkColor|SetLinkColor($1,$2,$3,$4)]]'''
   
   
  $R = Target
  $1 = From Object
  $1 = Table
$2 = To Object
  $2 = Panel
  $3 = Color   
  $4 = Road


== Time  ==
=== SetLinkCost ===


=== DayOfMonth  ===
Sets the link cost of a spatial link (normally computed from the link's distance)


Returns the day of the month, starting at 1
  '''[[SetLinkCost|SetLinkCost($1,$2,$3)]]'''
 
  '''[[DayOfMonth|$R = DayOfMonth($1)]]'''
   
   
  $R = Result
  $1 = From Object
  $1 = Time
$2 = To Object
  $3 = Cost     


=== DayOfWeek  ===
=== SetLinkRoads ===


Returns the day of the week, starting at 1 for Sunday
Sets the number of roads and road spacing for a spatial link.


  '''[[DayOfWeek|$R = DayOfWeek($1)]]'''
  '''[[SetLinkRoads|SetLinkRoads($1,$2,$3,$4)]]'''
   
   
  $R = Result
  $1 = From Object
  $1 = Time
$2 = To Object
  $3 = Roads
$4 = Spacing


=== DaysInDateMonth  ===
=== SetLinkWidth ===


Returns how many days in the month of the absolute time
Sets the width of a spatial link between two objects


  '''[[DaysInDateMonth|$R = DaysInDateMonth($1)]]'''
  '''[[SetLinkWidth|SetLinkWidth($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = From Object
  $1 = Time
$2 = To Object
  $3 = Width   


=== FormDate  ===
=== UpdateLinkItems ===


Computes the absolute time representing midnight on the given date
Updates the spatial link items according to the settings in the table. Columns are  ItemID, TotalTime, Ratio, Direction and Stopped. Ratio corresponds to the position on the link, 0 being the start of the link and 1 being the end. Direction is 0 for forward and 1 for reverse. Stopped enables just that item to be suspended on the link. If ItemID is -1 the row is ignored. If Ratio is -1, the items position is retained. If TotalTime is -1, the current total time for the item is retained.


  '''[[FormDate|$R = FormDate($1,$2,$3)]]'''
  '''[[UpdateLinkItems|UpdateLinkItems($1,$2)]]'''
   
   
$R = Result
  $1 = Table
  $1 = Date
  $2 = Link
  $2 = Month
 
$3 = Year
== Special ==


=== HourOfDay  ===
=== ---| Only During Move |--- ===


Returns the hour into the current day of the time, starting at 0
Enables the modeller to specifically mark that the following routine lines do not execute during lookahead


  '''[[HourOfDay|$R = HourOfDay($1)]]'''
  '''[[---| Only During Move |---||----- Following Only During Move -----|]]'''
   
   
$R = Result
$1 = Time


=== HourOfDay+1  ===
=== Beep ===


Returns the hour into the current day of the time, starting at 1 instead of 0
Plays a tone through the sound card, Frequency in Hz, Duration in milliseconds


  '''[[HourOfDay+1|$R = HourOfDay_1($1)]]'''
  '''[[Beep|Beep($1,$2)]]'''
   
   
  $R = Result
  $1 = Frequency
  $1 = Time
  $2 = Duration


=== IncrementByMonths  ===
=== BREAKPOINTIF ===


Increments the date by one or more months, attempting to keep the same day of month
If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state


  '''[[IncrementByMonths|IncrementByMonths($R,$1)]]'''
  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
   
   
$R = Result
  $1 = Enable Break
  $1 = # of months


=== MonthOfYear  ===
=== BrowseKey ===


Returns the month of the year, starting at 1 for January
Give user chance to browse for another key. Returns non zero if a different key was selected which is acceptable.


  '''[[MonthOfYear|$R = MonthOfYear($1)]]'''
  '''[[BrowseKey|$R = BrowseKey()]]'''
   
   
  $R = Result
  $R = Result
$1 = Time


=== TimeOfDay  ===
=== CallRoutine ===


Returns the number of seconds into the current day of the time
Calls a subroutine


  '''[[TimeOfDay|$R = TImeOfDay($1)]]'''
  '''[[CallRoutine|CallRoutine($F)]]'''
   
   
  $R = Result
  $F = Call
$1 = Time


=== WeekOfYear  ===
=== CLRDelete ===


Returns the week of the year, starting at 1
Deletes a managed object created by New().


  '''[[WeekOfYear|$R = WeekOfYear($1)]]'''
  '''[[CLRDelete|CLRDelete($1)]]'''
   
   
$R = Result
  $1 = Handle
  $1 = Time


=== YearOfDate  ===
=== CLRGetProperty ===


Returns the year of the given calendar time
Enables reading a dynamically named property of a managed class.


  '''[[YearOfDate|$R = YearOfDate($1)]]'''
  '''[[CLRGetProperty|$R = CLRGetProperty($1,$2)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Time
  $1 = Handle
 
  $2 = Name
== Tuple ==


=== DecodeMultiLabelToTuple  ===
=== CLRNew ===


Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label
Creates a new instance of a managed object. Requires result be an Instance formatted attribute.


  '''[[DecodeMultiLabelToTuple|DecodeMultiLabelToItem($R)]]'''
  '''[[CLRNew|$R = CLRNew($1)]]'''
   
   
  $R = Target
  $R = Target
$1 = DLLClass


=== EncodeItemToMultiLabel  ===
=== CLRSetOwner ===


Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label
Sets owning window of a class, can specify a paint object or 0 to use current panel.


  '''[[EncodeItemToMultiLabel|EncodeItemToMultiLabel($R)]]'''
  '''[[CLRSetOwner|CLRSetOwner($1,$2)]]'''
   
   
  $R = Target
  $1 = Handle
$2 = PaintID


=== MatchedCopyRow  ===
=== CLRSetProperty ===


Copy rows between tables where the column names match
Enables setting a dynamically named property of a managed class


  '''[[MatchedCopyRow|MatchedCopyRow($R,$1)]]'''
  '''[[CLRSetProperty|CLRSetProperty($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = Handle
  $1 = Set To
$2 = Name
  $3 = Value


=== TupleAppendFromCarried  ===
=== Comment (//) ===


Append a row to the table and for it, set table columns from a carried item's attributes with the same name
A comment line


  '''[[TupleAppendFromCarried|TupleAppendFromCarried($R,$1)]]'''
  '''[[Comment|Comment]]'''
   
   
$R = Table
$1 = Carried Index


=== TupleAppendFromItem  ===
=== CopyFont ===


Append a row into the table and for it, set table columns from item attributes with the same name
Copies the font properties between cells and columns


  '''[[TupleAppendFromItem|TupleAppendFromItem($R)]]'''
  '''[[CopyFont|CopyFont($R,$1)]]'''
   
   
  $R = Table
  $R = Format Result
$1 = Format From


=== TupleCarriedToRow  ===
=== CopyFormat ===


For the specified row, set table columns from a carried item's attributes with the same name
Copies the format/unit type/label reference between cells, columns and attributes


  '''[[TupleCarriedToRow|TupleCarriedToRow($R,$1)]]'''
  '''[[CopyFormat|CopyFormat($R,$1)]]'''
   
   
  $R = Row
  $R = Format Result
  $1 = Carried Index
  $1 = Format From


=== TupleDecrementToRow  ===
=== CopyPortal ===


For the specified row, decrement cells with the values of item attributes with matching names
Makes a copy of a portal and places it on Panel. If the name text is not “-” or an empty string, the new portal uses that name.


  '''[[TupleDecrementToRow|TupleDecrementFromRow($R)]]'''
  '''[[CopyPortal|$R = CopyPortal($1,$2,$3,$4,$5)]]'''
   
   
  $R = Row
  $R = New Portal
$1 = Original Portal
$2 = New Panel
$3 = X
$4 = Y
$5 = New Name


=== TupleExtractToCarried  ===
=== DescribeRoutineData ===


For the specified row, set a carried item's attributes from table columns with the same name then delete the row
Describe the data accessed by a change object routine


  '''[[TupleExtractToCarried|TupleExtractToCarried($R,$1)]]'''
  '''[[DescribeRoutineData|DescribeRoutineData($1,$2,$3)]]'''
   
   
  $R = Row
  $1 = Routine Panel
  $1 = Carried Index
$2 = Object Name
  $3 = Output Filename


=== TupleExtractToItem  ===
=== DragGanttBlock ===


For the specified row, set item attributes from table columns with the same name then delete the row
Initiates dragging a gantt block. Should be invoked as result of gantt block click (set option to process event immediately). Returns non zero if block was moved and corresponding rows in table changed. Table data may need resorting if block moved beyond other block on same row. Drag Type can be as returned from the click broadcast, 1 = left edge, 2 = right edge, 3 = center (move only).


  '''[[TupleExtractToItem|TupleExtractToItem($R)]]'''
  '''[[DragGanttBlock|$R = DragGanttBlock($1,$2,$3,$4,$5,$6,$7,$8)]]'''
   
   
  $R = Row
  $R = Result
$1 = Table
$2 = Panel
$3 = Drag Type
$4 = Start Row
$5 = End Row
$6 = Min Time
$7 = Max Time
$8 = Increment


=== TupleIncrementToRow  ===
=== EncodeARGB ===


For the specified row, increment cells with the values of item attributes with matching names
Encodes alpha, red, green and blue components (0..255) into a single 4 byte value used to specify any color/transparency in Planimate.


  '''[[TupleIncrementToRow|TupleIncrementToRow($R)]]'''
  '''[[EncodeARGB|$R = EncodeARGB($1,$2,$3,$4)]]'''
   
   
  $R = Row
  $R = Result
$1 = Alpha Value
$2 = Red Value
$3 = Green Value
$4 = Blue Value


=== TupleInsertFromCarried  ===
=== EncodeRGB ===


Insert a row into the table and for it, set table columns from a carried item's attributes with the same name
Encodes red, green and blue components (0..255) into a single 4 byte value used to specify any color in Planimate. The top byte of the value (alpha) is set to 255.


  '''[[TupleInsertFromCarried|TupleInsertFromCarried($R,$1)]]'''
  '''[[EncodeRGB|$R = EncodeRGB($1,$2,$3)]]'''
   
   
  $R = Row
  $R = Result
  $1 = Carried Index
  $1 = Red Value
$2 = Green Value
$3 = Blue Value


=== TupleInsertFromItem  ===
=== FollowItemRemote ===


Insert a row into the table and for it, set table columns from item attributes with the same name
Searches spatial links for the item and if found, sets the 'followitem property.


  '''[[TupleInsertFromItem|TupleInsertFromItem($R)]]'''
  '''[[FollowItemRemote|$R = FollowItemRemote($1,$2,$3)]]'''
   
   
  $R = Row
  $R = Result
$1 = Item Index
$2 = Scope Panel
$3 = Follow State


=== TupleItemToRow  ===
=== FormatForList ===


For the specified row, set table columns from item attributes with the same name  
Formats the result object to reference a label list with the given name


  '''[[TupleItemToRow|TupleItemToRow($R)]]'''
  '''[[FormatForList|FormatForList($R,$1)]]'''
   
   
  $R = Row
  $R = Format Result
$1 = List Name


=== TupleRowToCarried  ===
=== GanttPopup ===


For the specified row, set a carried item's attributes from table columns with the same name
Pops up the default gantt popup window as if a gantt block was clicked. This is useful when processing a gantt click broadcast. (x/y) are panel co-ordinates as read from the mouse. Returns non zero on success or zero if there wasn't a gantt block under the co-ordinates supplied.


  '''[[TupleRowToCarried|TupleRowToCarried($R,$1)]]'''
  '''[[GanttPopup|$R = GanttPopup($1,$2,$3,$4)]]'''
   
   
  $R = Row
  $R = Result
  $1 = Carried Index
  $1 = Table
$2 = Panel
$3 = X
$4 = Y


=== TupleRowToItem  ===
=== GetFormat ===


For the specified row, set item attributes from table columns with the same name
Returns the value format of the data


  '''[[TupleRowToItem|TupleRowToItem($R)]]'''
  '''[[GetFormat|$R = GetFormat($1)]]'''
   
   
  $R = Row
  $R = Result
$1 = Data To Test


== UI  ==
=== GetFormatListName ===


=== AddListToMenu  ===
Creates a new label with the name of the label list the target is formatted to. If no list, no change to the target is made


Appends a new menu to the modeller custom menu bar
  '''[[GetFormatListName|GetFormatListName($R,$1)]]'''
 
  '''[[AddListToMenu|AddListToMenu($1,$2)]]'''
   
   
  $1 = Menu Name
  $R = Result
  $2 = Item List
  $1 = Data To Test


=== BrowseFile  ===
=== InfoPanelRemote ===


Browse for a file. Returns non zero if one chosen. $1 sets an initial file, $2 enables a save-style dialog. Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.  
Searches spatial links for the item and if found, sets the s.ItemShowInfoPanel property.


  '''[[BrowseFile|$R = BrowseFile($1,$2)]]'''
  '''[[InfoPanelRemote|$R = InfoPanelRemote($1,$2,$3)]]'''
   
   
  $R = File Chosen
  $R = Result
  $1 = File Spec
  $1 = Item Info
  $2 = Save Mode
  $2 = Scope Panel
$3 = Show State


=== ClearCustomMenubar  ===
=== ListRoutineCode ===


Removes all menu items from the modeller custom menu bar
Write a change object routine code to a file


  '''[[ClearCustomMenubar|ClearCustomMenubar]]'''
  '''[[ListRoutineCode|ListRoutineCode($1,$2,$3)]]'''
   
   
$1 = Routine Panel
$2 = Object Name
$3 = Output Filename


=== Dialog  ===
=== LoadDataSet2 ===


Show a dialog box for the user to interact with
Load a version 2 dataset


  '''[[Dialog|$R = Dialog($F)]]'''
  '''[[LoadDataSet2|$R = LoadDataSet2($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $F = Dialog
  $1 = Definition Table
$2 = File Name
$3 = Pass Phrase
 
=== LoadedAssemblies ===
 
Display Loaded Assemblies dialog for debugging.
 
'''[[LoadedAssemblies|LoadedAssemblies()]]'''
 
=== LoadModel ===
 
Stops current run and loads another model. For PBA, the PBA is reloaded regardless of name.
 
'''[[LoadModel|LoadModel($1)]]'''
$1 = Model Name


=== HandlePopupMenu  ===
=== ObjectType ===


Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled
Returns the type of the object that the object label refers to


  '''[[HandlePopupMenu|$R = HandlePopupMenu($1)]]'''
  '''[[ObjectType|$R = ObjectType($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Table
  $1 = Object


=== InitiateFieldEdit  ===
=== OpenRoutineWindow ===


Starts editing attribute/cell views on a panel, as if the user clicked on the first one
Opens/closes the current routine window depending on command.


  '''[[InitiateFieldEdit|InitiateFieldEdit($1)]]'''
  '''[[OpenRoutineWindow|OpenRoutineWindow($1)]]'''
   
   
  $1 = Target Panel
  $1 = Command


=== SetMenuBar  ===
=== QueryNetwork ===


Interprets columns in table as depth/name/index and builds a custom menu bar
Sets table to rows describing every link on Panel between portals (track,spatial,pipe). 4 columns are required; From, To, Type and ID. From and To are the object Ids of the portals at the end points. Type is the type of link and is formatted to the “_link_type” label list. ID is the object id of the link.


  '''[[SetMenuBar|SetMenuBar($1)]]'''
  '''[[QueryNetwork|QueryNetwork($1,$2)]]'''
   
   
  $1 = Table
  $1 = Table
$2 = Panel
=== RealTimeCallBack ===
This will schedule a _Real Time Tick broadcast at a given real interval, in milliseconds. Note that any previous event is cancelled when this is re-invoked. Interval can be between 10 and 5000ms.
'''[[RealTimeCallBack|RealTimeCallBack($1,$2)]]'''
$1 = Interval (ms)
$2 = Scope Panel


[[Category:Routine]] [[Category:Data]]
=== RemovePortal ===
 
Deletes the portal and its contents from the model
 
'''[[RemovePortal|RemovePortal($1)]]'''
$1 = Portal ID
 
=== SaveDataSet2 ===
 
Save a version 2 dataset
 
'''[[SaveDataSet2|$R = SaveDataSet2($1,$2,$3)]]'''
$R = Result
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase
 
=== SetDirectory ===
 
Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure
 
'''[[SetDirectory|$R = SetDirectory($1)]]'''
$R = Result
$1 = Path
 
=== SetFormat ===
 
Sets format of $1 to mode $2, with $3 being the label list name if its a label format
 
'''[[SetFormat|SetFormat($1,$2,$3)]]'''
$1 = Data To Set
$2 = Format
$3 = List Name
 
=== SetLastDatasetFile ===
 
Sets the last dataset filename, optionally visible in the titlebar. A relative filename will have a full path created as would be used in a file operation with the name.
 
'''[[SetLastDatasetFile|SetLastDatasetFile($1)]]'''
$1 = Name
 
=== ShowHelp ===
 
Open a HTML help window. Help File can be empty for default.
 
'''[[ShowHelp|ShowHelp($1,$2)]]'''
$1 = Help File
$2 = Section
 
=== SignFile ===
 
Digitally signs a file.
 
'''[[SignFile|$R = SignFile($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = File Name
$2 = Cert
$3 = Password
$4 = Subject
$5 = Time Server
 
=== StartScheduledEntries ===
 
Signals that scheduled entries should start (if options deferred them starting when the model was run)
 
'''[[StartScheduledEntries|StartScheduledEntries]]'''
 
=== UserKeyBrowse ===
 
Presents a dialog enabling the user to either paste an application license or browse to a license file. On success in either case the license text is returned. You can specify a default filename and browse directory.
 
'''[[UserKeyBrowse|$R = UserKeyBrowse($1,$2,$3)]]'''
$R = License Text
$1 = FileName
$2 = BrowseFolder
$3 = AppName
 
=== UserKeyLoadFile ===
 
Attempts to load a user license key from a file, returns zero on success.
 
'''[[UserKeyLoadFile|$R = UserKeyLoadFile($1,$2,$3)]]'''
$R = Target
$1 = File Name
$2 = Password
$3 = PublicKey
 
=== UserKeyLoadText ===
 
Attempts to load a user license key from the supplied text, returns zero on success.
 
'''[[UserKeyLoadText|$R = UserKeyLoadText($1,$2,$3)]]'''
$R = Target
$1 = Key Text
$2 = Password
$3 = PublicKey
 
=== UserKeyLookup ===
 
Looks up a setting in a loaded key file. Returns -1 on error or empty string if LHS is text.
 
'''[[UserKeyLookup|$R = UserKeyLookup($1)]]'''
$R = Value
$1 = Name
 
=== WatchListAdd ===
 
Add portal, routine or item attribute to watch list for debugging
 
'''[[WatchListAdd|WatchListAdd($1)]]'''
$1 = Attribute
 
=== WatchListRemove ===
 
Remove portal, routine or item attribute from watch list
 
'''[[WatchListRemove|WatchListRemove($1)]]'''
$1 = Attribute
 
== String ==
 
=== GetNoteRTF ===
 
Retrieves RTF text of note
 
'''[[GetNoteRTF|$R = GetNoteRTF($1)]]'''
$R = String
$1 = Paint ID
 
=== GetNoteText ===
 
Retrieves plain text of note
 
'''[[GetNoteText|$R = GetNoteText($1)]]'''
$R = String
$1 = Paint ID
 
=== SetNoteRTF ===
 
Sets RTF text of note
 
'''[[SetNoteRTF|SetNoteRTF($1,$2)]]'''
$1 = Paint ID
$2 = Text
 
=== SetNoteText ===
 
Sets plain text of note
 
'''[[SetNoteText|SetNoteText($1,$2)]]'''
$1 = Paint ID
$2 = Text
 
=== SetText ( $= ) ===
 
Set a free text attribute or table cell to another text attribute, literal text or a the formatted text of a value
 
'''[[SetText|$R $= $1]]'''
$R = Result
$1 = Set To
 
== Table ==
 
=== AddTable ===
 
Adds table to panel, returning data object label. If a table with that name already exists, 0 is returned.
 
'''[[AddTable|$R = AddTable($1,$2)]]'''
$R = Result
$1 = Panel
$2 = Name
 
=== AdvancedSort ===
 
Performs a sort on a table using another table to define the sort criteria, the sort info table should have  columns for column, asc/desc,num/alpha and optionally filter if you intend to use row filtering. ColumnAsText interprets and matches entries in column 1 textually instead of numerically.
 
'''[[AdvancedSort|AdvancedSort($R,$1,$2,$3)]]'''
$R = Target 
$1 = Sort Info
$2 = Filter
$3 = ColumnAsText
 
=== AllocateTableRowMemory ===
 
Enables memory to be reserved for a table which is expected to grow to a large number of rows
 
'''[[AllocateTableRowMemory|AllocateTableRowMemory($R,$1)]]'''
$R = Target Table
$1 = Allocate Rows
 
=== AppendColumn ===
 
Append a column to a table
 
'''[[AppendColumn|AppendColumn($R,$1)]]'''
$R = Target
$1 = Col Count
 
=== AppendRow ===
 
Append a row to the table
 
'''[[AppendRow|AppendRow($R,$1)]]'''
$R = Target
$1 = Row Count
 
=== BinarySearch ===
 
Perform a binary search over the range First Index to Last Index. Assumes the data compared is sorted ascending and the comparison is for equality. Multiple comparisons can be combined only with AND. Returns 1 + last index or 0 if Zero On Fail is set.
 
'''[[BinarySearch|$R = BinarySearch($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== BlockMove ===
 
Block copy a range of cells to another table
 
'''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
$R = Result
$1 = Source
$2 = # of Rows
$3 = # of Cols
 
=== CheckTableSorted ===
 
Determines if a table is sorted by the sort criteria. Return 0 if OK or the first unsorted row number. This can be more efficient than calling Sort which is very slow if the table is already sorted.
 
'''[[CheckTableSorted|$R = CheckTableSorted($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = Table
$2 = Column 1
$3 = Column 2
$4 = Column 3
$5 = Column 4
 
=== CompareTables ===
 
Compares rows in tables, returns row number of first difference. Only numerical values are compared, not Text strings.
 
'''[[CompareTables|$R = CompareTables($1,$2)]]'''
$R = Result
$1 = Table 1
$2 = Table 2
 
=== CopyTable ===
 
Replaces all data columns in the target table so it is a copy of Original.
 
'''[[CopyTable|$R = CopyTable($1)]]'''
$R = Target
$1 = Original Table
 
=== CopyToClipboard ===
 
Copy table to clipboard using its clipboard settings and the option modifiers
 
'''[[CopyToClipboard|CopyToClipboard($R,$1)]]'''
$R = From Table
$1 = Options
 
=== CountIFMatch ===
 
Counts rows where Match Column matches Match Key
 
'''[[CountIFMatch|$R = CountIFMatch($1,$2)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
 
=== CreateSortIndex ===
 
Creates an ordered list of row numbers if the given column was sorted alphabetically
 
'''[[CreateSortIndex|CreateSortIndex($R,$1)]]'''
$R = Target Column
$1 = Column To Sort
 
=== DeleteColumn ===
 
Delete a range of columns from a table
 
'''[[DeleteColumn|DeleteColumn($R,$1,$2)]]'''
$R = Target Table
$1 = First Col
$2 = Col Count
 
=== DeleteRow ===
 
Delete a number of rows starting at a given row in a table
 
'''[[DeleteRow|DeleteRow($R,$1,$2)]]'''
$R = Target Table
$1 = First Row
$2 = Row Count
 
=== EnableColumnEditing ===
 
Controls whether a given table column can be edited
 
'''[[EnableColumnEditing|EnableColumnEditing($R,$1)]]'''
$R = Target Column
$1 = Edit Control
 
=== FindColumnLabel ===
 
Searches columns in table $1 for one with a label which matches formatted $2 and returns the index or 0 if none found
 
'''[[FindColumnLabel|$R = FindColumnLabel($1,$2)]]'''
$R = Result
$1 = Table
$2 = Find String
 
=== FindColumnTitle ===
 
Searches columns in table $1 for one with a title which matches formatted $2 and returns the index or 0 if none found
 
'''[[FindColumnTitle|$R = FindColumnTitle($1,$2)]]'''
$R = Result
$1 = Table
$2 = Find String
 
=== FindDuplicates ===
 
Finds duplicated rows in Table, storing the duplicate row number pairs in the first two columns of table Duplicates. Existing rows in Duplicates are removed. Only values are compared, not text.
 
'''[[FindDuplicates|FindDuplicates($R,$1)]]'''
$R = Duplicates
$1 = Table
 
=== GenerateUnique ===
 
First column of the target table is set to a unique subset of the passed column. Text or numbers are supported, with the target column being reformatted if required. If the target does not contain a column, it is created. The output column is sorted using natural ordering.
 
'''[[GenerateUnique|$R = GenerateUnique($1)]]'''
$R = Result
$1 = Column
 
=== GetCellBackgroundColor ===
 
Returns ARGB or index value for a cell's background color. Will be null index (255) if not set for the cell
 
'''[[GetCellBackgroundColor|$R = GetCellBackgroundColor($1)]]'''
$R = Result
$1 = Table Cell
 
=== GetCellTextColor ===
 
Returns ARGB or index value for a cell's text color. Will be null index (255) if not set for the cell
 
'''[[GetCellTextColor|$R = GetCellTextColor($1)]]'''
$R = Result
$1 = Table Cell
 
=== GetColSecondTitle ===
 
Sets the target to a label of the second title row for the given column
 
'''[[GetColSecondTitle|GetColumnSecondTitle($R,$1)]]'''
$R = Result
$1 = Column
 
=== GetColumnProperty ===
 
Read a property of a table column
 
'''[[GetColumnProperty|$R = GetColumnProperty($1,$2)]]'''
$R = Result
$1 = Table Column
$2 = Property Label   
 
=== GetColumnTip ===
 
Sets the target (text or label) to the tip text for the given column
 
'''[[GetColumnTip|GetColumnTip($R,$1)]]'''
$R = Result
$1 = Column
 
=== ImportFromClipboard ===
 
Performs import of table data/structure from clipboard as available in the table editor
 
'''[[ImportFromClipboard|$R = ImportFromClipboard($1,$2)]]'''
$R = Result
$1 = Target Table
$2 = Configure 
 
=== InsertColumn ===
 
Insert columns into a table with the option of copying formatting from another column
 
'''[[InsertColumn|InsertColumn($R,$1,$2,$3)]]'''
$R = Target Table
$1 = Insert Pos.
$2 = Col Count
$3 = Copy Format
 
=== InsertRow ===
 
Insert a number of rows at a given row in a table
 
'''[[InsertRow|InsertRow($R,$1,$2)]]'''
$R = Target Table
$1 = Insert Pos.
$2 = Row Count
 
=== MatchMultipleKeys ===
 
Searches table from the top for the first instance where the given columns have the given values. Returns row number or 0 if no match. Column 3 may be zero for a 2 column search.
 
'''[[MatchMultipleKeys|$R = MatchMultipleKeys($1,$2,$3,$4,$5,$6,$7,$8)]]'''
$R = Result
$1 = Table
$2 = Start Row
$3 = Column 1
$4 = Match 1
$5 = Column 2
$6 = Match 2
$7 = Column 3
$8 = Match 3
 
=== MaxIndexIFMatch ===
 
Returns first row with maximum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
 
'''[[MaxIndexIFMatch|$R = MaxIndexIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== MinIndexIFMatch ===
 
Returns first row with minimum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
 
'''[[MinIndexIFMatch|$R = MinIndexIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== OutOfScopeWrite ===
 
Enable writing to item table reference $1 even if it is not in scope
 
'''[[OutOfScopeWrite|OutOfScopeWrite($1)]]'''
$1 = Item Table Ref
 
=== PositionLastRow ===
 
Intended for use after a single row has been appended to an already-sorted table, this will efficiently move that last row to the position to maintain the sort. Table must already be sorted by the sort criteria.
 
'''[[PositionLastRow|PositionLastRow($R,$1,$2,$3,$4)]]'''
$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4
 
=== PurgeDuplicateRows ===
 
Removes any identical rows from the given table. Text formatted columns are not compared and should not be present in the table in cases of 100k or more rows for performance reasons.
 
'''[[PurgeDuplicateRows|PurgeDuplicateRows($R)]]'''
$R = Target
 
=== ReverseSearch ===
 
Decrement the result attribute from first to last until the condition is true. If the search fails, returns last_index-1 or 0 if the Zero On Fail option is non zero.
 
'''[[ReverseSearch|$R = ReverseSearch($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== Search ===
 
Increment the result attribute from first to last until the condition is true. If the search fails, returns 1+last_index or 0 if the Zero On Fail option is non zero.
 
'''[[Search|$R = Search($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== SetCellBackgroundColor ===
 
Sets the background color for the cell.
 
'''[[SetCellBackgroundColor|SetCellBackgroundColor($1,$2)]]'''
$1 = Table Cell
$2 = Color Value
 
=== SetCellFreeText ===
 
Sets the free text (not bound by label text rules) for a table cell
 
'''[[SetCellFreeText|SetCellFreeText($R,$1)]]'''
$R = Target Cell
$1 = Source Cell
 
=== SetCellTextColor ===
 
Sets the text color for the cell
 
'''[[SetCellTextColor|SetCellTextColor($1,$2)]]'''
$1 = Table Cell
$2 = Color Value
 
=== SetColAlignment ===
 
Enables a column's text alignment to be changed
 
'''[[SetColAlignment|SetColumnAlignment($R,$1)]]'''
$R = Target Column
$1 = Align Mode 
 
=== SetColSecondTitle ===
 
Sets the text of the second title row for the given column
 
'''[[SetColSecondTitle|SetColumnSecondTitle($R,$1)]]'''
$R = Target Column
$1 = Title Text
 
=== SetColTitle ===
 
Set the title text of a table column
 
'''[[SetColTitle|SetColumnTitle($R,$1)]]'''
$R = Target Column
$1 = Title Text
 
=== SetColTupleName ===
 
Sets the name used to internally identify a column
 
'''[[SetColTupleName|SetColumnTupleName($R,$1)]]'''
$R = Target Column
$1 = Tuple Text
 
=== SetColumnProperty ===
 
Set a property of a table column
 
'''[[SetColumnProperty|SetColumnProperty($1,$2,$3)]]'''
$1 = Table Column
$2 = Property Label   
$3 = Property Value   
 
=== SetColumnTip ===
 
Sets the tool tip of a table column
 
'''[[SetColumnTip|SetColumnTip($R,$1)]]'''
$R = Column
$1 = Tip Text
 
=== SetColWidth ===
 
Sets the formatting width of a table column
 
'''[[SetColWidth|SetColWidth($R,$1)]]'''
$R = Target Column
$1 = Column Width
 
=== SetTableRowHeight ===
 
Sets the height of table rows
 
'''[[SetTableRowHeight|SetTableRowHeight($1,$2)]]'''
$1 = Target Table
$2 = Row Height
 
=== SetTableTitle ===
 
Set the title text of the table from the label
 
'''[[SetTableTitle|SetTableTitle($R,$1)]]'''
$R = Target Table
$1 = Title Text
 
=== ShiftCol ===
 
Shift the columns in a table
 
'''[[ShiftCol|ShiftColumn($R,$1,$2)]]'''
$R = Result
$1 = Source
$2 = Shift <+ ->
 
=== ShiftRow ===
 
Shift the rows in a table
 
'''[[ShiftRow|ShiftRow($R,$1,$2)]]'''
$R = Result
$1 = Source
$2 = Shift ^+ -v
 
=== Sort ===
 
Sort table by up to 4 columns. If the column index is -ve, it reverses the sort order for that column.
 
'''[[Sort|Sort($R,$1,$2,$3,$4)]]'''
$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4
 
=== SumIFMatch ===
 
Sums values in Data Column for rows where Match Column matches Match Key
 
'''[[SumIFMatch|$R = SumIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== TableReferenceSet ===
 
Returns non zero if the reference resolves to a table
 
'''[[TableReferenceSet|$R = TableReferenceSet($1)]]'''
$R = Result
$1 = Item Table Ref
 
=== TableSortDialog ===
 
Enables the user to set up and perform a sort using the table sort dialog
 
'''[[TableSortDialog|TableSortDialog($R)]]'''
$R = Target
 
=== UpdateColumnRefs ===
 
Re-initialises column labels for references to a table
 
'''[[UpdateColumnRefs|UpdateColumnRefs($1)]]'''
$1 = Table
 
== Table View ==
 
=== ClearFilter ===
 
Clear filter settings for a table view
 
'''[[ClearFilter|ClearFilter($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== CopyAllFromView ===
 
Copies the entire contents of a table view. Any current selection is ignored and left intact.
 
'''[[CopyAllFromView|CopyAllFromView($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Col Labels
 
=== CopyFromView ===
 
Copies the current cell or selection from a specified table view just as if CTRL-C was pressed
 
'''[[CopyFromView|CopyFromView($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== DeleteView ===
 
Deletes view during run. Data is the table, attribute the view is for. Panel is where the view is located.
 
'''[[DeleteView|DeleteView($1,$2,$3,$4)]]'''
$1 = Data
$2 = Panel
$3 = View Type
$4 = Index
 
=== GetColumnFilter ===
 
Gets any active column filter for a table view
 
'''[[GetColumnFilter|$R = GetColumnFilter($1,$2)]]'''
$R = Text/Label
$1 = Column
$2 = Panel
 
=== GetFilteredRows ===
 
Retrieves the filter mapping of view rows to actual rows into the list table
 
'''[[GetFilteredRows|GetFilteredRows($1,$2,$3)]]'''
$1 = Filter List
$2 = Table
$3 = Panel
 
=== GetTableView ===
 
Read columns of a table view into another table
 
'''[[GetTableView|GetTableView($1,$2,$3)]]'''
$1 = View Table
$2 = View Panel
$3 = Config Table
 
=== GetViewProperty ===
 
Retrieves a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.
 
'''[[GetViewProperty|$R = GetViewProperty($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = Property
$4 = View Type
$5 = Index
 
=== NearestPoint ===
 
Returns the row of the closest point on a Log Driven Display. If Overlay is non zero, only that overlay is checked. Max Distance sets the largest distance that will be considered in the matching. With no match, the function returns 0.
 
'''[[NearestPoint|$R = NearestPoint($1,$2,$3,$4,$5,$6)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y
$5 = Overlay
$6 = Max Distance
 
=== PasteIntoView ===
 
Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success
 
'''[[PasteIntoView|$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)]]'''
$R = Error Result
$1 = Table
$2 = Panel
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read
 
=== ReFilterTableView ===
 
Reapply any active filters to the current data in the table
 
'''[[ReFilterTableView|ReFilterTableView($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== SetCellColor ===
 
Set text and background colours for cells, supporting doing entire columns, rows or tables as well. In all cases the per cell colour is set.
 
'''[[SetCellColor|SetCellColor($1,$2,$3)]]'''
$1 = Cell
$2 = TextColor
$3 = BackColor
 
=== SetColumnFilter ===
 
Sets a column filter text for a table view. The filter needs to be reapplied once all the columns have been set.
 
'''[[SetColumnFilter|SetColumnFilter($R,$1,$2)]]'''
$R = Column
$1 = Text
$2 = Panel
 
=== SetTableView ===
 
Set columns that a table view will display
 
'''[[SetTableView|SetTableView($1,$2,$3)]]'''
$1 = View Table
$2 = View Panel
$3 = Config Table
 
=== SetTableViewColScroll ===
 
Sets the column scroll of a view for a table on a given panel
 
'''[[SetTableViewColScroll|SetTableViewColScroll($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Value
 
=== SetTableViewRowScroll ===
 
Sets the row scroll of a view for a table on a given panel
 
'''[[SetTableViewRowScroll|SetTableViewRowScroll($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Value
 
=== SetViewFilterRows ===
 
Sets the rows that a table view on a panel will display. Filter List is a column of row numbers.
 
'''[[SetViewFilterRows|SetViewFilterRows(($1,$2,$3)]]'''
$1 = Filter List
$2 = Table
$3 = Panel
 
=== SetViewProperty ===
 
Sets a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.
 
'''[[SetViewProperty|SetViewProperty($1,$2,$3,$4,$5,$6)]]'''
$1 = Table
$2 = Panel
$3 = Property
$4 = Value
$5 = View Type
$6 = Index
 
=== TableViewColScroll ===
 
Reads the column scroll of a view for a table on a given panel
 
'''[[TableViewColScroll|$R = TableViewColScroll($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewRows ===
 
Reads the number of rows in a table view. If a filter is set, this may differ from the number of rows in the table
 
'''[[TableViewRows|$R = TableViewRows($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewRowScroll ===
 
Reads the row scroll of a view for a table on a given panel
 
'''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewVisibleCols ===
 
Reads the number of visible columns in a table view
 
'''[[TableViewVisibleCols|$R = TableViewVisibleCols($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewVisibleRows ===
 
Reads the number of visible rows in a table view
 
'''[[TableViewVisibleRows|$R = TableViewVisibleRows($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
== Time ==
 
=== AdvanceToTimeDialog ===
 
Enables user to use the advance to time dialog. If Absolute is set, it defaults to an absolute time advance otherwise it defaults to a relative interval. Time is interpreted accordingly depending on Absolute, as an interval or as an absolute time. For an Absolute advance, if its zero, the clock value is the default instead of the model start time.
 
'''[[AdvanceToTimeDialog|AdvanceToTimeDialog($1,$2)]]'''
$1 = Absolute
$2 = Time
 
=== DayOfMonth ===
 
Returns the day of the month, starting at 1
 
'''[[DayOfMonth|$R = DayOfMonth($1)]]'''
$R = Result
$1 = Time
 
=== DayOfWeek ===
 
Returns the day of the week, starting at 1 for Sunday
 
'''[[DayOfWeek|$R = DayOfWeek($1)]]'''
$R = Result
$1 = Time
 
=== DaysInDateMonth ===
 
Returns how many days in the month of the absolute time
 
'''[[DaysInDateMonth|$R = DaysInDateMonth($1)]]'''
$R = Result
$1 = Time
 
=== FormDate ===
 
Computes the absolute time representing midnight on the given date
 
'''[[FormDate|$R = FormDate($1,$2,$3)]]'''
$R = Result
$1 = Date
$2 = Month
$3 = Year
 
=== GetDate ===
 
Extracts the date from a date/time
 
'''[[GetDate|$R = GetDate($1)]]'''
$R = Result
$1 = Date/Time
 
=== HourOfDay ===
 
Returns the hour into the current day of the time, starting at 0
 
'''[[HourOfDay|$R = HourOfDay($1)]]'''
$R = Result
$1 = Time
 
=== HourOfDay+1 ===
 
Returns the hour into the current day of the time, starting at 1 instead of 0
 
'''[[HourOfDay+1|$R = HourOfDay_1($1)]]'''
$R = Result
$1 = Time
 
=== IncrementByMonths ===
 
Increments the date by one or more months, attempting to keep the same day of month
 
'''[[IncrementByMonths|IncrementByMonths($R,$1)]]'''
$R = Result
$1 = # of months
 
=== MonthOfYear ===
 
Returns the month of the year, starting at 1 for January
 
'''[[MonthOfYear|$R = MonthOfYear($1)]]'''
$R = Result
$1 = Time
 
=== TimeOfDay ===
 
Returns the number of seconds into the current day of the time
 
'''[[TimeOfDay|$R = TimeOfDay($1)]]'''
$R = Result
$1 = Time
 
=== WeekOfYear ===
 
Returns the week of the year, starting at 1
 
'''[[WeekOfYear|$R = WeekOfYear($1)]]'''
$R = Result
$1 = Time
 
=== YearOfDate ===
 
Returns the year of the given calendar time
 
'''[[YearOfDate|$R = YearOfDate($1)]]'''
$R = Result
$1 = Time
 
== Tuple ==
 
=== DecodeMultiLabelToTuple ===
 
Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label
 
'''[[DecodeMultiLabelToTuple|DecodeMultiLabelToItem($R)]]'''
$R = Target
 
=== EncodeItemToMultiLabel ===
 
Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label
 
'''[[EncodeItemToMultiLabel|EncodeItemToMultiLabel($R)]]'''
$R = Target
 
=== MatchedCopyRow ===
 
Copy rows between tables where the column names match
 
'''[[MatchedCopyRow|MatchedCopyRow($R,$1)]]'''
$R = Result
$1 = Set To
 
=== TupleAppendFromCarried ===
 
Append a row to the table and for it, set table columns from a carried item's attributes with the same name
 
'''[[TupleAppendFromCarried|TupleAppendFromCarried($R,$1)]]'''
$R = Table
$1 = Carried Index
 
=== TupleAppendFromItem ===
 
Append a row into the table and for it, set table columns from item attributes with the same name
 
'''[[TupleAppendFromItem|TupleAppendFromItem($R)]]'''
$R = Table
 
=== TupleCarriedToRow ===
 
For the specified row, set table columns from a carried item's attributes with the same name
 
'''[[TupleCarriedToRow|TupleCarriedToRow($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleDecrementToRow ===
 
For the specified row, decrement cells with the values of item attributes with matching names
 
'''[[TupleDecrementToRow|TupleDecrementFromRow($R)]]'''
$R = Row
 
=== TupleExtractToCarried ===
 
For the specified row, set a carried item's attributes from table columns with the same name then delete the row
 
'''[[TupleExtractToCarried|TupleExtractToCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleExtractToItem ===
 
For the specified row, set item attributes from table columns with the same name then delete the row
 
'''[[TupleExtractToItem|TupleExtractToItem($R)]]'''
$R = Row
 
=== TupleIncrementToRow ===
 
For the specified row, increment cells with the values of item attributes with matching names
 
'''[[TupleIncrementToRow|TupleIncrementToRow($R)]]'''
$R = Row
 
=== TupleInsertFromCarried ===
 
Insert a row into the table and for it, set table columns from a carried item's attributes with the same name
 
'''[[TupleInsertFromCarried|TupleInsertFromCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleInsertFromItem ===
 
Insert a row into the table and for it, set table columns from item attributes with the same name
 
'''[[TupleInsertFromItem|TupleInsertFromItem($R)]]'''
$R = Row
 
=== TupleItemToRow ===
 
For the specified row, set table columns from item attributes with the same name
 
'''[[TupleItemToRow|TupleItemToRow($R)]]'''
$R = Row
 
=== TupleRowToCarried ===
 
For the specified row, set a carried item's attributes from table columns with the same name
 
'''[[TupleRowToCarried|TupleRowToCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleRowToItem ===
 
For the specified row, set item attributes from table columns with the same name
 
'''[[TupleRowToItem|TupleRowToItem($R)]]'''
$R = Row
 
== UI ==
 
=== AddListToMenu ===
 
Appends a new menu to the modeller custom menu bar
 
'''[[AddListToMenu|AddListToMenu($1,$2)]]'''
$1 = Menu Name
$2 = Item List
 
=== BringToFront ===
 
If a panel is open in a popup window, bring that popup to the front in the window z-order.
 
'''[[BringToFront|BringToFront($1)]]'''
$1 = Panel
 
=== BrowseFile ===
 
Browse for a file. Returns non zero if one chosen. FileName sets an initial file, Options can combine:1 to enable a save-style dialog (default is load) and 2 to enable stay in directory (default is to return to working directory). Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.
 
'''[[BrowseFile|$R = BrowseFile($1,$2)]]'''
$R = File Chosen
$1 = FileName
$2 = Options
 
=== BrowseFolder ===
 
Browse for a folder. Returns non zero if one chosen. Name sets an initial path,  Use s.LastAccessedDataFilePath to access the path selected.
 
'''[[BrowseFolder|$R = BrowseFolder($1,$2)]]'''
$R = Folder Chosen
$1 = StartFolder
$2 = Title
 
=== ClearCustomMenubar ===
 
Removes all menu items from the modeller custom menu bar
 
'''[[ClearCustomMenubar|ClearCustomMenubar]]'''
 
=== DescribeFont ===
 
Retrieves a CSV text field describing the properties of the font for the specified column or table cell.
 
'''[[DescribeFont|$R = DescribeFont($1)]]'''
$R = Result
$1 = Data
 
=== Dialog ===
 
Show a dialog box for the user to interact with
 
'''[[Dialog|$R = Dialog($F)]]'''
$R = Result
$F = Dialog
 
=== DragIcon ===
 
Displays an icon and enables user to position it. X and Y are the starting position (center) in panel co-ordinates. If a move is performed, new co-ordinates are written to these values. Icon selects an image which defines the bounding box. Returns non zero if the move was not cancelled. Supports being invoked with mouse down or up. Keys also supported.
 
'''[[DragIcon|$R = DragIcon($1,$2,$3,$4)]]'''
$R = result
$1 = X Value
$2 = Y Value
$3 = Panel
$4 = Icon Name
 
=== GetCellXY ===
 
Retrieves the co-ordinates of a given corner of a cell that is visible in a table view. Co-ordinates are relative to the top left of the main panel window and can be used for ShowPopupPanel(). Corner is 1..9, 1 = top left.The cell is specified in view cells. Result is non zero on error, for example the cell is not visible. Otherwise X and Y are set.
 
'''[[GetCellXY|$R = GetCellXY($1,$2,$3,$4,$5,$6,$7,$8)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = View Index
$4 = View Row
$5 = View Column
$6 = Corner
$7 = X
$8 = Y
 
=== HandlePopupMenu ===
 
Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled
 
'''[[HandlePopupMenu|$R = HandlePopupMenu($1)]]'''
$R = Result
$1 = Table
 
=== InitiateFieldEdit ===
 
Starts editing attribute/cell views on a panel, as if the user clicked on the first one
 
'''[[InitiateFieldEdit|InitiateFieldEdit($1)]]'''
$1 = Target Panel
 
=== MessageBox ===
 
Displays a standard message box with an OK button
 
'''[[MessageBox|MessageBox($1,$2)]]'''
$1 = Text
$2 = Title
 
=== MessageBoxConfirm ===
 
Displays a standard message box with OK (1) / Cancel (0) Buttons
 
'''[[MessageBoxConfirm|$R = MessageBoxConfirm($1,$2)]]'''
$R = Result
$1 = Text
$2 = Title
 
=== MessageBoxYN ===
 
Displays a standard message box with Yes (1) / No (0) Buttons
 
'''[[MessageBoxYN|$R = MessageBoxYN($1,$2)]]'''
$R = Result
$1 = Text
$2 = Title
 
=== MessageBoxYNC ===
 
Displays a standard message box with Yes (1) / No (0) / Cancel (-1) buttons
 
'''[[MessageBoxYNC|$R = MessageBoxYNC($1,$2)]]'''
$R = Result
$1 = Text
$2 = Title
 
=== SetMenuBar ===
 
Interprets columns in table as depth/name/index and builds a custom menu bar
 
'''[[SetMenuBar|SetMenuBar($1)]]'''
$1 = Table

Latest revision as of 16:08, 14 September 2020

This page lists all of the routine operations available in Planimate as of 8.54.0. The operations all link to pages with their name but most of these pages will not exist. Where an operation warrants further discussion, these links can be followed and the pages created.

This page is automatically created using Planimate 12.0.0.

Please do not edit it.

Arithmetic

Add

Add two values/rows/columns/tables

$R = Add($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Clear

Set the target value to its initialising value

$R = CLEAR

$R = Clear

Dec ( -= )

Decrement first value/row/column/table by second value

$R -= $1

$R = Result
$1 = Decr. by

Div

Divide values/rows/columns/tables

$R = Div($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Inc ( += )

Increment first value/row/column/table by second value

$R += $1

$R = Result
$1 = Incr. by

InterpolateValue

Interpolates a value between value1 and value2 based on ratio (0.0 gives value1, 1.0 gives value2)

$R = InterpolateValue($1,$2,$3)

$R = Result
$1 = Value1
$2 = Value2
$3 = Ratio

Mul

Multiply values/rows/columns/tables

$R = Mul($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

RemapValue

Remaps value through table, interpolating To Column values according to value's position in From Column. A row range can be specified, To Row of 0 uses the last row in the table.

$R = RemapValue($1,$2,$3,$4,$5,$6)

$R = Result
$1 = Map Table
$2 = Value
$3 = To Column
$4 = From Row
$5 = To Row
$6 = From Column

Scale ( *= )

Scale first value/row/column/table by second value

$R *= $1

$R = Result
$1 = Scale by

Set ( = )

Assign a value/row/column/table to another of the same type and size

$R = $1

$R = Result
$1 = Set To

Sub

Subtract two values/rows/columns/tables

$R = Sub($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Control

BREAKLOOP

Immediately exits an ITERATE loop

BREAKLOOP

CASE

Tests a condition and if true, executes the code following until another CASE or DEFAULT is reached

CASE ($F)

$F = CASE

CONTINUE

Immediately processes the next iteration in a loop/while, skipping the rest of the code

CONTINUE

DEFAULT

Marks code that should be executed if no CASES match in a SELECT block

DEFAULT

ELSE

Enables an alternate block of code to execute if an IF test fails to be true

ELSE

ENDIF

Marks the end of an IF block

ENDIF

ENDLOOP

Marks the end of an ITERATE block

ENDLOOP

ENDSELECT

Marks the end of a SELECT block

ENDSELECT

ENDWHILE

Marks the end of a WHILE block

ENDWHILE

IF

Executes lines following only if the condition is true

IF ($F)

$F = IF

ITERATE

Repeats a block of routine lines, incrementing an attribute over a range

ITERATE ($R,$1,$2)

$R = Index Using
$1 = First Value
$2 = Last Value

ITERATEROWS

Iterate Row Index over all the rows in the table

ITERATEROWS ($R,$1)

$R = Row Index
$1 = Table     

RETURN

Returns from the routine

RETURN

REVERSEITERATE

Iterate the result attribute over the given range in descending order

REVERSEITERATE ($R,$1,$2)

$R = Index Using
$1 = First Value
$2 = Last Value

SELECT

Starts a block where CASEs can be used to execute different code for conditions tested

SELECT

WHILE

Repeats a block of lines until the condition is false; the condition is tested first

WHILE ($F)

$F = WHILE

Display

Animate

Animate a model object to a new screen position

Animate($1,$2,$3)

$1 = Object
$2 = X Pos
$3 = Y Pos

ChooseColor

Enables selection of a colour

$R = ChooseColor($1)

$R = Selected Colour
$1 = Initial Colour

ChoosePaletteColor

Shows the colour palette selector dialog to select a given palette colour

$R = ChoosePaletteColor($1)

$R = Result
$1 = Selection Color

ColorPaletteEntry

Returns the RGB color for a given color index in the Planimate color palette

$R = ColorPaletteEntry($1)

$R = Result       
$1 = Palette Index

FitPanelToArea

Fits the panel to the area of its contents with a margin

FitPanelToArea($1,$2)

$1 = Target Panel
$2 = Margin

ForceRepaint

Repaints all windows; use with care, it can cause slowdown

ForceRepaint

ForceRepaintPanel

Repaints the specified panel

ForceRepaintPanel($1)

$1 = Panel

GetPanelProperty

Read a property of a panel, specified using _panel_properties list

$R = GetPanelProperty($1,$2)

$R = Result
$1 = Panel
$2 = Property Label

GetSystemColorRGB

Returns the RGB color for a given color in the Windows system color palette

$R = GetSystemColorRGB($1)

$R = Result
$1 = Value

GetViewportScrollX

Get the x scroll of a viewport on a given panel

$R = GetViewportScrollX($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GetViewportScrollY

Get the y scroll of a viewport on a given panel

$R = GetViewportScrollY($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GetViewportZoom

Get the zoom factor of a viewport on a given panel

$R = GetViewportZoom($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GraphXOffset

Read the offset of a graph view for a table on the given panel

$R = GraphXOffset($1,$2)

$R = Target
$1 = Table
$2 = Panel

GraphXWidth

Read the width of a graph view for a table on the given panel

$R = GraphXWidth($1,$2)

$R = Target
$1 = Table
$2 = Panel

HidePanel

Hides any popup for the given panel

HidePanel($1)

$1 = Target Panel

HideTableEditor

Close any open table editor for the given table

HideTableEditor($1)

$1 = Table

MakeVisible

Makes the specified panel the active panel on the main window

MakeVisible($1)

$1 = Target Subsystem

PanelWindowLeft

Returns the left window co-ordinate of a popup panel

$R = PanelWindowLeft($1)

$R = Result
$1 = Panel

PanelWindowTop

Returns the top window co-ordinate of a popup panel

$R = PanelWindowTop($1)

$R = Result
$1 = Panel

PrintPanel

Queues the nominated panel for printing; additional panels can be printed by intercepting the _Panel Printed broadcast

PrintPanel($1)

$1 = Target Subsystem

ReFitPopup

Resize an already open popup to panel's changed size

ReFitPopup($1)

$1 = Panel

RepaintObjects

Initiates a repaint of dynamic object icons and the animation layer only; faster than a full force repaint and intended for animation. 'Panel' can be used to specify a viewport etc, if zero the current panel is used. If 'SpeedRegulate' is non zero, checks are performed to prevent successive repaints occurring faster than about 60 frames a second.

RepaintObjects($1,$2)

$1 = Panel
$2 = SpeedRegulate

RepaintView

Repaints contents of a view

RepaintView($1,$2,$3,$4)

$1 = Table
$2 = Panel
$3 = View Type
$4 = Index

SetActivityString

Sets text in the status bar activity area

SetActivityString($1)

$1 = Activity Text

SetColorPaletteEntry

Sets the RGB color for a given color in the Planimate color palette

SetColorPaletteEntry($1,$2)

$1 = Palette Index
$2 = RGB Value    

SetGraphXOffset

Set the offset of a graph view for a table on the given panel

SetGraphXOffset($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetGraphXWidth

Set the width of a graph view for a table on the given panel

SetGraphXWidth($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetIconRemote

Set icon for an item somewhere else in the model. Location can be a portal or object id containing the item. If its 0 the entire model is searched, this is potentially very slow. Icon Name should not include any extention, PL will search DBs for it.

SetIconRemote($1,$2,$3)

$1 = Item ID
$2 = Location
$3 = Icon Name

SetObjectPos

Sets the position and scaling of a dynamic object in one operation. The position is the centre of the object and the scaling is a percentage which should normally be 100 for no scaling.

SetObjectPos($1,$2,$3,$4,$5)

$1 = Object
$2 = X Pos
$3 = Y Pos
$4 = X Scale
$5 = Y Scale

SetPanelColor

Sets the background color of a panel

SetPanelColor($1,$2)

$1 = Panel
$2 = Color

SetPanelProperty

Set a property of a panel, specified using _panel_properties list

SetPanelProperty($1,$2,$3)

$1 = Panel
$2 = Property Label
$3 = Value

SetPanelSize

Sets the panel area size. Useful when the panel is not configured to automatically size.

SetPanelSize($1,$2,$3)

$1 = Panel
$2 = Width
$3 = Height

SetPanelTransparency

Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency

SetPanelTransparency($1,$2)

$1 = Panel
$2 = Transparency

SetPortalIcon

Sets icon for portal's current state.

SetPortalIcon($1,$2)

$1 = Portal ID
$2 = Icon Name

SetPortalTip

Sets tip text for Portal to Text

SetPortalTip($1,$2)

$1 = Portal ID
$2 = Text

SetStatusItemAreaString

Sets the text in the status bar area where item class names are displayed during editing

SetStatusItemAreaString($1)

$1 = Item Area Text

SetViewportScroll

Set the x and y scroll of a viewport on a given panel

SetViewportScroll($R,$1,$2,$3)

$R = Panel With Viewport  
$1 = Panel Inside Viewport
$2 = X Offset
$3 = Y Offset

SetViewportTarget

Changes the Target Panel that a given Viewport will show. Targets are specified using the model object label of its owning portal (_Model_Objects list). The viewport can be identified directly using a paint object label list (_Paint_Objects) or indirectly using the panel the viewport is on and its current target. The Current Target Panel is not required when using a paint label reference, or if the viewport's panel only has one viewport. If New Target Panel is 0, the viewport will be hidden in user mode.

SetViewportTarget($1,$2,$3)

$1 = Viewport or its Panel
$2 = Current Target (or 0)
$3 = New Target Panel

SetViewportZoom

Set the zoom factor of a viewport on a given panel

SetViewportZoom($R,$1,$2)

$R = Panel With Viewport  
$1 = Panel Inside Viewport
$2 = Zoom Value

SetWindowTitle

Sets the title of the main window

SetWindowTitle($1)

$1 = Title Text

ShowAboutBox

Shows the Planimate about box

ShowAboutBox()

ShowPopupPanel

Opens the given panel in a separate window at the specified window co-ordinates

ShowPopupPanel($1,$2,$3)

$1 = Target Panel
$2 = X Position
$3 = Y Position

ShowTableEditor

Open table editor for the given table

ShowTableEditor($1)

$1 = Table

SwapPopupPanel

Swaps which panels are visible in a popup panel without closing/reopening it

SwapPopupPanel($1,$2)

$1 = Target Panel
$2 = Replace With

File

AcquireFileLock

Returns zero if file lock acquired, otherwise if target is text its text is set to the lock failure reason

$R = AcquireFileLock($1,$2)

$R = Result
$1 = File
$2 = New Lock Text

CopyFile

Copies file

$R = CopyFile($1,$2)

$R = Result
$1 = From
$2 = To

CreateFolder

Create folder, if create path set then upper levels created as well

$R = CreateFolder($1,$2)

$R = Result
$1 = File
$2 = Create Path

DeleteFile

Deletes file

$R = DeleteFile($1)

$R = Result
$1 = File

DeleteFolder

Deletes empty folder, if subfolders set then empty subfolders also deleted

$R = DeleteFolder($1,$2)

$R = Result
$1 = File
$2 = Subfolders

ExtractFileExtention

Extracts the file extention from a path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.

$R = ExtractFileExtention($1)

$R = Result   
$1 = Path/File

ExtractFileName

Extracts the file name from a full path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.

$R = ExtractFileName($1)

$R = Result   
$1 = Path/File

ExtractPathName

Extracts the file name from a full path/file spec. If Result is a label list attribute, and its value is 0 then a new label is added and Result gets assigned to the index, otherwise if its non zero the label indicated by the index is changed. If Result is text formatted, the text is set directly.

$R = ExtractPathName($1)

$R = Result   
$1 = Path/File

FileColumns

Number of columns in file or -1. Supports TAB or comma delimited data.

$R = FileColumns($1,$2)

$R = Result
$1 = File
$2 = Comma Delimit

FileLines

Number of lines in file or -1

$R = FileLines($1)

$R = Result
$1 = File

FilesInFolder

Reads a list of files in the path/folder and puts them into the target label list. The path can include a wildcard file name like c:\Data\*.txt

$R = FilesInFolder($1)

$R = Target List
$1 = Path/Wildcard  

FilesInHierarchy

Retrieves the files in all folders starting at Path/File, placing the path names into the target label list.

$R = FilesInHierarchy($1)

$R = Target List
$1 = Path/File

FileSize

Returns size of file or -1 if not found

$R = FileSize($1)

$R = Result
$1 = File

FolderExists

Returns non zero if the specified directory folder exists.

$R = FolderExists($1)

$R = Result
$1 = Path

PlaySound

Play windows sound file. Will extract WAV files from DB if required.

PlaySound($1,$2)

$1 = Sound File
$2 = Wait Finish

ReadFromFile

Reads the reference from file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.

$R = ReadFromFile($1,$2,$3,$4,$5,$6,$7)

$R = Result
$1 = File
$2 = Data
$3 = Options
$4 = File Row
$5 = File Column
$6 = Row Limit
$7 = Column Limit

ReadViewFromFile

Reads file, following format of table view. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.

$R = ReadViewFromFile($1,$2,$3,$4,$5)

$R = Result
$1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options

ReleaseFileLock

Returns zero if file lock is released (it must be yours to release) otherwise if target is text its text is set to the lock failure reason

$R = ReleaseFileLock($1)

$R = Result
$1 = File

RenameFile

Renames file

$R = RenameFile($1,$2)

$R = Result
$1 = From
$2 = To

RunCommand

Runs a new process or opens a file via the shell

$R = RunCommand($1,$2,$3,$4,$5)

$R = Result
$1 = Command
$2 = Use shell
$3 = Minimised
$4 = Wait Complete
$5 = Keep Front

SaveImage

Saves the panel image to a file or to the clipboard if the file name is empty or “-”. A memory save creates/updates an icon in the icon cache that paint button states and object icons can use.

$R = SaveImage($1,$2,$3)

$R = Result
$1 = File
$2 = Panel
$3 = In-Memory

WriteToFile

Writes the reference to file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.

$R = WriteToFile($1,$2,$3)

$R = Result
$1 = File
$2 = Data
$3 = Options

WriteViewToFile

Writes table view to file. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.

$R = WriteViewToFile($1,$2,$3,$4,$5)

$R = Result
$1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options

Label

AddLabelDialog

Show a dialog so the user can add a label to the given label list

AddLabelDialog($R)

$R = Result

AddSubLabel

Makes the new sublabel for the parent label $1 (if it doesn't exist) and returns its index as a sublabel

AddSubLabel($R,$1)

$R = Result
$1 = Label

ClearLabelList

Removes all labels from a label list

ClearLabelList($1)

$1 = Clear Label List

CreateLabelList

Creates a label list with the given name and formats the result attribute to reference it

CreateLabelList($R,$1)

$R = Format Result
$1 = List Name

CreateLabelListFromColumn

Uses the provided column to provide text for creating a new label list

CreateLabelListFromColumn($R,$1)

$R = Target List  
$1 = Source Column

CreatePanelPortalLabel

Creates a panel label for the subsystem of the given portal object label

$R = CreatePanelPortalLabel($1)

$R = New Panel Label    
$1 = Portal Object Label

CreateSubLabelList

Creates an empty sub label list of an existing label list and formats an attribute to reference it

CreateSubLabelList($R,$1,$2)

$R = Format Result
$1 = List Name
$2 = Parent List

CreateSubsystemObjectLabel

Creates an object label for the portal owning the panel of this routine

$R = CreateSubsystemObjectLabel()

$R = New Object Label

DeleteLabel

Deletes the given label from its labellist

DeleteLabel($1)

$1 = Label

GetLabelListProperty

Retrieves a property of a label list

$R = GetLabelListProperty($1,$2)

$R = Result
$1 = LabelList
$2 = Property

LabelCount

Returns how many labels in the given label list

$R = LabelCount($1)

$R = Result
$1 = Label Count

MaxLabelIndex

Returns the highest allocated label index in the given label list

$R = MaxLabelIndex()

$R = Result

MinLabelIndex

Returns the lowest allocated label index in the given label list

$R = MinLabelIndex()

$R = Result

NextLabelIndex

The next allocated label index for the list or -1 if none

$R = NextLabelIndex($1)

$R = Result
$1 = Label Index

PrevLabelIndex

The previous allocated label index for the list or -1 if none

$R = PrevLabelIndex($1)

$R = Result
$1 = Label Index

RedirectLabelList

Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.

RedirectLabelList($1,$2)

$1 = From Name
$2 = To Name

ReIndexLabelList

Re-indexes all members in a label list so they have ascending and continuous index values

ReIndexLabelList($1)

$1 = Re-index Label List

ReIndexLabels

Remaps labels in the given list using 2 columns of matching from and to values

ReIndexLabels($1,$2,$3)

$1 = Re-index List    
$2 = From Values (Col)
$3 = To Values (Col)  

RemoveSubLabel

Removes the sublabel as a member of the sublabel list

RemoveSubLabel($1)

$1 = Label

SetLabelListProperty

Sets a property of a label list

SetLabelListProperty($1,$2,$3)

$1 = LabelList
$2 = Property
$3 = Value

TestLabelIndex

Tests whether an index has been used in a label list

$R = TestLabelIndex($1,$2)

$R = Result
$1 = Index Value
$2 = Label List

Label String

AppendToLabel

Append text to an existing label. Result must be a label list formatted attribute. If its value is 0 then a new label is added and result gets assigned to the index, otherwise the label indicated by the index is changed.

$R = AppendToLabel($1)

$R = Result
$1 = Source

CreateLabelAlias

Creates a label alias from 'Text' and adds it to the 'Target Label' which must be a label from a label list. Returns non zero if there was a problem creating the alias because 'Text' is already assigned to another label index.

$R = CreateLabelAlias($1,$2)

$R = Error Result
$1 = Text
$2 = Target Label

CreateMD5Hash

Uses the 3 text sources to create an unpredictable hash string

$R = CreateMD5Hash($1,$2,$3)

$R = Result
$1 = Text
$2 = Salt 1
$3 = Salt 2

CropToCharacters

Crop a label to a subset of its text

CropToCharacters($R,$1,$2)

$R = Result
$1 = From Char
$2 = To Char

ExtractIntoFormat

Extracts a substring from a formatted value/label and interprets it in the format of the target. If the target is a label list, it gets added as a label if its not already in that list.

$R = ExtractIntoFormat($1,$2,$3)

$R = Result
$1 = Label
$2 = From Char
$3 = To Char

FileSHA

Creates 64 character checksum for file using SHA256. If text_file is 1 then the file is expected to be text and CR characters, if present, are ignored.

$R = FileSHA($1,$2)

$R = Result
$1 = File
$2 = TextFile

FormatIntoLabel

Create a new label with the formatted text of the source

FormatIntoLabel($R,$1)

$R = Result
$1 = Source

FormatIntoLabelIndex

Creates a label from the text of source and using the provided index

$R = FormatIntoLabelIndex($1,$2)

$R = Result
$1 = Source
$2 = Index

FormatNameIntoLabel

Creates a label from the name of the given object

$R = FormatNameIntoLabel($1)

$R = Result
$1 = Source

FormattedLabelIndex

Determines if the source text is a label and returns its index if it is

$R = FormattedLabelIndex($1)

$R = Result
$1 = Source

FormattedWidth

Returns how many characters the referenced data has when it is formatted for display

$R = FormattedWidth($1)

$R = Target
$1 = Width Of

FormatTitleIntoLabel

Creates a label from the title text of the given object

$R = FormatTitleIntoLabel($1)

$R = Result
$1 = Source

GetAppDataName

Get a full Users/username/AppData/Roaming path/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.

$R = GetAppDataName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

GetCharacter

Extracts a character from the formatted value provided and returns the ascii code

$R = GetCharacter($1,$2)

$R = Target   
$1 = String
$2 = Character

GetMyDocumentsName

Get a full Users/username/Documents path/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.

$R = GetMyDocumentsName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

GetProgramName

Get the folder containing the running Planimate EXE and append a filename. If Result is text, it is set to the path, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero.

$R = GetProgramName($1)

$R = Result
$1 = Filename

GetSharedAppDataName

Get a full ProgramData/AppData/Roaming/file including a subfolder and a filename. If Result is text, it is set on success and set empty on failure, otherwise the path is placed in s.LastAccessedDataFilePath and this returns non zero if the folder was created/verified writeable.

$R = GetSharedAppDataName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

LogMessage

Writes text to the debug logger window and the planimat.dbg file if either enabled. Text can be a text expression including attributes and labels as well as quoted text, combined with the & character.

LogMessage($1)

$1 = Text

RemapName

Uses the model ini file remapping to remap text, typically used for filenames. Multiple components can be combined with | separating them.

$R = RemapName($1)

$R = Result
$1 = Source Text

RemoveFileExtention

Crop label to remove trailing dot and text

RemoveFileExtention($R)

$R = Result

RenameLabel

Change the text of a label. Result must be a label list formatted attribute. If its value is 0 then a new label is added and result gets assigned to the index, otherwise the label indicated by the index is changed.

$R = RenameLabel($1)

$R = Result
$1 = Source

RenameObject

Sets the display name of an object. The name may be adjusted if it is not unique on the panel for that kind of object.

RenameObject($1,$2)

$1 = Object
$2 = New Name

SetFreeTextTitle

Sets title of free text editor dialog

SetFreeTextTitle($1)

$1 = Title Text

Logical

BitAND

Treat values as integers and bitwise AND them (limited to 14 bits of precision)

$R = BitAND($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

BitOR

Treat values as integers and bitwise OR them (limited to 14 bits of precision)

$R = BitOR($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

BitXOR

Treat values as integers and bitwise XORs them (limited to 14 bits of precision)

$R = BitXOR($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

EQ ( == )

Determines if 2 values are numerically close to each other

$R = $1 == $2

$R = Result
$1 = Value 1
$2 = Value 2

GE ( >= )

Determines if the first value is greater than or equal to the second

$R = $1 >= $2

$R = Result
$1 = Value 1
$2 = Value 2

GT ( > )

Determines if the first value is significantly greater than the second value

$R = $1 > $2

$R = Result
$1 = Value 1
$2 = Value 2

LE ( <= )

Determines if the first value is less than or equal to the second

$R = $1 <= $2

$R = Result
$1 = Value 1
$2 = Value 2

LT ( < )

Determines if the first value is significantly less than the second value

$R = $1 < $2

$R = Result
$1 = Value 1
$2 = Value 2

NEQ ( != )

Determines if 2 values are not numerically close to each otherclose to each other

$R = $1 != $2

$R = Result
$1 = Value 1
$2 = Value 2

Message

Broadcast

Sends a broadcast to the entire model. Options can be 0 or a combination of values from the Broadcast Options label list.

Broadcast($1,$2)

$1 = Broadcast Index
$2 = Broadcast Options

BroadcastLocal

Sends the broadcast scoped to the portal containing the object sending it, with item attributes. The broadcast is initiated immediately.

BroadcastLocal($1)

$1 = Broadcast

BroadcastScoped

Sends a broadcast to a specified dynamic panel and all under it. Options can be 0 or a combination of values from the Broadcast Options label list.

BroadcastScoped($1,$2,$3)

$1 = Broadcast Index
$2 = Broadcast Options
$3 = Send To Subsystem

BroadcastToPanel

Sends a broadcast to a specified dynamic panel. Options can be 0 or a combination of values from the Broadcast Options label list.

BroadcastToPanel($1,$2,$3)

$1 = Broadcast Index
$2 = Broadcast Options
$3 = Send To Subsystem

ImmediateMessage

Send a message whilst the item waits at the change object

ImmediateMessage($1)

$1 = Message Target

ImmediateMessageNamed

Send a message to a specified portal with a specific name whilst the item waits at the change object

ImmediateMessageNamed($1,$2)

$1 = Message Target
$2 = Message Name   

ReleaseWaitingItem

Used to signal a waiting dispatcher on the target panel that a given item should be released

$R = ReleaseWaitingItem($1,$2)

$R = Result
$1 = Item Index
$2 = Scope Panel

ReverseItemDirection

Searches spatial links for the item and if found, reverses the direction of the item

$R = ReverseItemDirection($1,$2)

$R = Result
$1 = Item Index
$2 = Scope Panel

Numeric

abs

Magnitude of a value, without the sign

$R = abs($1)

$R = Result
$1 = Value 1

Convolve

Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.”

Convolve($R,$1,$2)

$R = Result
$1 = Column 1
$2 = Column 2

fmod

Floating point modulus of $1 over base $2

$R = fmod($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

max

Determines the greater of 2 values

$R = max($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

min

Determines the lesser of 2 values

$R = min($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

mod

Integer modulus of $1 over base $2

$R = mod($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Normalise

Rescales data in column so they add up to 1

Normalise($1)

$1 = Column

random

Random value between 0 and 1

$R = random($F)

$R = Result
$F = Set to

round

Integer closest to the value

$R = round($1)

$R = Result
$1 = Round Value

RoundToN

Round value to the specified number of digits of precision

$R = RoundToN($1,$2)

$R = Result
$1 = Round Value
$2 = Sig. Digits

trunc

Integer equal or lower than the value

$R = trunc($1)

$R = Result
$1 = Truncate

Paint

BlendColors

Returns the resulting colour (always opaque) you would get if a black surface was painted with Color1 then Color2.

$R = BlendColors($1,$2)

$R = Result
$1 = Color1
$2 = Color2

CopyPaintObject

Enables a paint object to be copied

$R = CopyPaintObject($1,$2)

$R = New Paint Label       
$1 = Original Paint Label
$2 = Destination Panel   

CopyPaintProperties

Copies the graphical properties between paint objects

CopyPaintProperties($1,$2)

$1 = Paint Object To Update
$2 = Original Paint Object

CreateTiles

Creates a tileset from an image. (0,0) is the center of image. Existing tileset file is deleted. Returns 0 on success.

$R = CreateTiles($1,$2,$3,$4)

$R = Result
$1 = Image File
$2 = Tile Set
$3 = MaxZoom
$4 = Margin Colour

DeleteAllPaintObjects

Delete all paint objects on the given panel

DeleteAllPaintObject($1)

$1 = Target Panel

DeleteInheritedPaintObjects

Removes all paint objects which inherit from a given panel

DeleteInheritedPaintObjects($1,$2)

$1 = Target Pane     
$2 = Un Inherit Panel

DeletePaintObject

Deletes a paint object

DeletePaintObject($1,$2)

$1 = Paint Label   
$2 = With Inherited

FitPaint

Fits a paint object to its contents.

FitPaint($1)

$1 = Paint ID

GetPaintProperty

Read a property of a paint object

$R = GetPaintProperty($1,$2)

$R = Result
$1 = Paint Object Label
$2 = Property Label    

InheritPaintObjects

Enables a panel to be populated with paint objects from another panel

InheritPaintObjects($1,$2)

$1 = Target Panel      
$2 = Inherit From Panel

InterpolateColor

Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)

$R = InterpolateColor($1,$2,$3)

$R = Result
$1 = Color1
$2 = Color2
$3 = Ratio

LinkPaintObjects

Associate a paint object to a parent so it tracks movement of the parent. Parent and linked are paint objects. Edge values determine which edge/corner is used (1..9, 1=topleft, 2=top, 3=topright etc). Options: 1 auto-delete linked paint object when parent becomes hidden.

LinkPaintObjects($1,$2,$3,$4,$5,$6,$7)

$1 = Parent
$2 = Linked
$3 = Parent Edge
$4 = Linked Edge
$5 = Offset X
$6 = Offset Y
$7 = Options

LongLatToXY

Using the Map paint object, Longitude/Latitude co-ordinates are translated to panel X/Y points. Table must contain columns _Long, _Lat, _X and _Y

LongLatToXY($1,$2)

$1 = Paint Map Label
$2 = Table

MakeRangeVisible

Adjusts the map co-ordinates to make the range of co-ordinates visible regardless of the map view's aspect ratio

MakeRangeVisible($1,$2,$3,$4,$5)

$1 = Paint Map Label
$2 = Long From
$3 = Lat From
$4 = Long To
$5 = Lat To

PositionPaintObject

Move a paint object given a parent's position. Parent and Paint are paint objects. Edge values determine which edge/corner is used (1..9, 1=topleft, 2=top, 3=topright etc). Parent=0 uses panel edge.

PositionPaintObject($1,$2,$3,$4,$5,$6)

$1 = Parent
$2 = Paint
$3 = Parent Edge
$4 = Paint Edge
$5 = Offset X
$6 = Offset Y

RepaintPaintObject

Repaint a single paint object. Useful if the object's contents have changed but it hasn't moved or changed size. Clear colour can be used to erase under the paint object when anti-aliasing causes blending noise to linger.

RepaintPaintObject($1,$2)

$1 = Paint Label   
$2 = Clear Color

ScaleColor

Scales the R/G/B components of a colour by Scale and adds Offset to each. Scale and Offset are normally 0..255. The alpha is unchanged.

$R = ScaleColor($1,$2,$3)

$R = Result
$1 = Color
$2 = Scale
$3 = Offset

SetLongLatXY

Sets paint map to show the given co-ordinate as close as possible to the panel (x,y) point.

SetLongLatXY($1,$2,$3,$4,$5)

$1 = Paint Map Label
$2 = Longitude
$3 = Latitude
$4 = X
$5 = Y

SetNoteVisible

Shows or hides an RTF note

SetNoteVisible($1,$2)

$1 = Paint Object Label
$2 = Visibility        

SetPaintImage

Sets the image of a paint object

SetPaintImage($1,$2,$3)

$1 = Paint Object Label
$2 = Set Image To
$3 = All States

SetPaintProperty

Set a property of a paint object directly

SetPaintProperty($1,$2,$3)

$1 = Paint Object Label
$2 = Property Label    
$3 = Property Value    

SetPaintText

Sets the text of a paint object

SetPaintText($1,$2,$3)

$1 = Paint Object Label
$2 = Set Text/File To  
$3 = For All States    

SetPaintTip

Sets the tool tip text of a paint object

SetPaintTip($1,$2,$3)

$1 = Paint Object Label
$2 = Set Tip To  
$3 = For All States    

SetPaintXY

Moves a paint object so a given edge/corner is at (X,Y). Edge=1..9 (1=topleft, 2=topcenter, 5=center, 7=bottomleft etc.)

SetPaintXY($1,$2,$3,$4)

$1 = Paint Object Label
$2 = X Pos
$3 = Y Pos
$4 = Edge

SetTransparency

Sets the transparency (alpha) value of a colour

$R = SetTransparency($1,$2)

$R = Result
$1 = Color
$2 = Transparency

XYToLongLat

Using the Map paint object, screen X/Y points are translated to Longitude/Latitude co-ordinates. Table must contain columns _Long, _Lat, _X and _Y

XYToLongLat($1,$2)

$1 = Paint Map Label
$2 = Table

Pipe

AddPipe

Creates a pipe between From and To if one doesn't exist and allocates an object label for the new pipe, which is returned. If Copy Pipe is a valid pipe object label then its properties are copied.

$R = AddPipe($1,$2,$3)

$R = New Pipe
$1 = From
$2 = To
$3 = Copy Pipe

RemovePipe

Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.

RemovePipe($1,$2)

$1 = From
$2 = To

Route

AddStaticRoute

Adds a new static route with given name and ID. The route steps start at the starting_cell, working down for step_count. Fill_steps determines if steps are filled after adding the route. If a route with the ID already exists, it is replaced. If ID is 0, a new ID gets allocated. Returns the ID of the route that gets created/modified (>0) or <0 on failure. Do not replace a static route which is being used by any items.

$R = AddStaticRoute($1,$2,$3,$4,$5)

$R = Result
$1 = Name
$2 = Route ID
$3 = Starting Cell
$4 = Step Count
$5 = Fill Steps

AddTrack

Creates a track between From and To if one doesn't exist and an object label is created and returned for the new track section.

$R = AddTrack($1,$2,$3)

$R = New Track
$1 = From
$2 = To
$3 = Track Type

AssignRoute

Sets an item's track route from a route table

AssignRoute($1)

$1 = Timetable Source

AssignRouteFrom

Sets an item's track route from locations specified by cells working down from start, stopping when either count is reached or a zero cell. Returns 0 if no error.

$R = AssignRouteFrom($1,$2)

$R = Result
$1 = Starting Cell
$2 = Step Count

CancelLoopEntryDelay

Cancels a loop entry delay which is initiated for any item that may dwell at a location and is normally cancelled only if the item leaves the location immediately. This enables just a loop exit delay to occur without an associated loop entry delay.

CancelLoopEntryDelay()

ClearRoute

Clear an item's routing database

ClearRoute()

ClearTrailList

Clears a train's history of sections it has traversed

ClearTrailList()

CreateRoute

Creates a route of all steps between the two locations. Returns non zero and sets s.TrackFillRouteError on error.

$R = CreateRoute($1,$2)

$R = Result
$1 = From
$2 = To

EnableTrackCheckNext

Used during lookahead, this enables a modeller to signal objects downstream of a lookahead that the current lookahead is for track capacity purposes and wont be taken immediately. It automatically resets when lookahead unwinds behind the routine.

EnableTrackCheckNext()

FillRouteSteps

Fills in all intermediate portals in an item's track route. Returns non zero on error in which case s.FillRouteError is set to a description

$R = FillRouteSteps()

$R = Result

GenerateTrackTable

Updates the Track Network Details table for the panel inside portal Location. This can change the rows in the track table. Result is non zero if an error occured.

$R = GenerateTrackTable($1)

$R = Result
$1 = Location

HoldSectionRoad

Places the road of a track section into waiting for an item state, preventing any other item using it. If Item ID is >= 0 it is used for the item ID otherwise the current item is used. Item Object is used to locate the item if Item ID is set.

HoldSectionRoad($1,$2,$3,$4)

$1 = SectionID
$2 = Road#
$3 = Item ID
$4 = Item Object

InsertRouteStep

Insert a track route step into an item's internal routing database

InsertRouteStep($1,$2)

$1 = Route Step
$2 = Route Location

ListBlockedTrains

Clears table and adds a row for each blocked train. Columns are filled in this order: Item ID, Blocked Time, Blocked Location

ListBlockedTrains($1)

$1 = Table

PolyPathFinder

Generates a series of steps for movement from start to end. PolyPoints columns 1 and 2 are used for x/y (these can be long/lat). Rows are created in WayPoints with x/y in the first 2 columns and any matching polygon row in column 3. Start and End are brought into the polygon if not already, extra waypoints are created as needed. Returns > 0 on success. UsingLongLat should be set if world co-ordinates are being used instead of pixels.

$R = PolyPathFinder($1,$2,$3,$4,$5,$6,$7)

$R = Result
$1 = StartX
$2 = StartY
$3 = EndX
$4 = EndY
$5 = PolyPoints
$6 = WayPoints
$7 = UsingLongLat

ReadRoute

Reads an item's track route into a table

ReadRoute($R)

$R = Timetable Target

RegisterBlockedTrain

Register the item (train) into the track blocked list

RegisterBlockedTrain()

RemoveStaticRoute

Removes any static route with the given ID. Do not remove a static route which is being used by any items.

RemoveStaticRoute($1)

$1 = Route ID

RemoveTrack

Removes any track between portals From and To. If From is a track label then it is used and To is ignored.

RemoveTrack($1,$2)

$1 = From
$2 = To

ResetLoopDelayTime

Resets the loop entry time for an item, useful for enabling some time to be spent in a track location without a loop exit delay being triggered. This does not affect any loop entry delay under way, it will complete at its scheduled time.

ResetLoopDelayTime()

RoadsInTrackSection

Returns how many roads a given track section has been configured for

$R = RoadsInTrackSection($1)

$R = Target
$1 = Section

SectionRoadAvail

Returns where a track section road is available for an item/train to use

$R = SectionRoadAvail($1,$2)

$R = Result
$1 = SectionID
$2 = Road#

SectionRoadTrain

Returns item ID of train in a track section road or -1 if no item

$R = SectionRoadTrain($1,$2)

$R = Result
$1 = SectionID
$2 = Road#

SetPreviousTailData

Enables taildata to be set for a road/length multiserver that a train has just left. This is useful when taildata information is not known until the front of the train leaves the road/multiserver. WhichData is 1..4 (TailData1..TailData4).

SetPreviousTailData($1,$2)

$1 = WhichData
$2 = Value

SetRoadCheckFilter

This will use road #'s specified by the column starting at a given cell to determine roads to test in lookahead on a track. It stops on a zero cell.

SetRoadCheckFilter($1)

$1 = Start Cell

SetRoadColor

Sets color of road in track section

SetRoadColor($1,$2,$3)

$1 = SectionID
$2 = Road#
$3 = Color     

TrackSectionType

Returns the type of a track section (_section_types label list)

$R = TrackSectionType($1)

$R = Target
$1 = Section

UnblockTrain

Attempt unblock of specific train id or all blocked trains if id is 0

UnblockTrain($1)

$1 = Item ID

UpdateLoopEntryDelay

Sets the loop entry delay to a new value. This can be performed when a train enters a location. The delay is measured from when the original loop delay started. If no loop delay is active, the operation does nothing.

UpdateLoopEntryDelay($1)

$1 = Loop Delay

Row/Column

Average

Determines the average of values in a row or column

$R = Average($1,$2,$3)

$R = Result
$1 = Average of
$2 = From
$3 = To

MaxIndex

Determines the index of the highest value in a row or column

$R = MaxIndex($1,$2,$3)

$R = Result
$1 = Max of
$2 = From
$3 = To

MinIndex

Determines the index of the lowest value in a row or column

$R = MinIndex($1,$2,$3)

$R = Result
$1 = Min of
$2 = From
$3 = To

StdDev

Determines the Standard Deviation of values in a row or column

$R = StdDev($1,$2,$3)

$R = Result
$1 = StdDev of
$2 = From
$3 = To

Sum

Determines the sum of values in a row or column

$R = Sum($1,$2,$3)

$R = Result
$1 = Sum of
$2 = From
$3 = To

SumSquared

Determines the sum of squares of values in a row or column

$R = SumSquared($1,$2,$3)

$R = Result
$1 = Sum/Sqr of
$2 = From
$3 = To

Scientific

arccos

Inverse cosine function, returns radians

$R = arccos($1)

$R = Result
$1 = Value

arcsin

Inverse sine function, returns radians

$R = arcsin($1)

$R = Result
$1 = Value

arctan

Inverse tan function, returns radians

$R = arctan($1)

$R = Result
$1 = Value

atan2

Determines angle (in radians) given x and y displacement

$R = atan2($1,$2)

$R = Result
$1 = Numerator (Y)
$2 = Denominator (X)

cos

Cosine function, value in radians

$R = cos($1)

$R = Result
$1 = Value

DegToRad

Converts degrees to radians

$R = DegToRad($1)

$R = Result
$1 = Value

exp

Calculates $1 to the power of E

$R = exp($1)

$R = Result
$1 = Value

hypot

Hypotenuse of right angled triangle with given sides

$R = hypot($1,$2)

$R = Result
$1 = X Value
$2 = Y Value

log10

Calculates the decimal logarithm of the value

$R = log10($1)

$R = Result
$1 = Value

logN

Calculates the natural logarithm of the value

$R = logN($1)

$R = Result
$1 = Value

pow

Calculates $1 to the power of $2

$R = pow($1,$2)

$R = Result
$1 = Value
$2 = Power

RadToDeg

Converts radians to degrees

$R = RadToDeg($1)

$R = Result
$1 = Value

sin

Sine function, value in radians

$R = sin($1)

$R = Result
$1 = Value

sqr

Value multiplied by itself

$R = sqr($1)

$R = Result
$1 = Value

sqrt

Square root of value

$R = sqrt($1)

$R = Result
$1 = Value

tan

Tan function, value in radians

$R = tan($1)

$R = Result
$1 = Value

Spatial Link

AddBendPoint

Adds a bend point to a spatial link between the two objects specified

AddBendPoint($R,$1,$2,$3)

$R = From Object
$1 = To Object
$2 = X Position
$3 = Y Position

AddDirectionalLink

Adds a spatial link between objects which can only be traversed in the forward direction

$R = AddDirectionalLink($1,$2)

$R = Link ID
$1 = From Object
$2 = To Object

AddLink

Add a spatial link between the two objects labels specified

$R = AddLink($1,$2)

$R = Link ID
$1 = From Object
$2 = To Object

ClearLinkCache

Instructs Planimate to update spatial link information after links are created or objects are moved

ClearLinkCache()

CopyLink

Creates a spatial link between objects, copying an existing link's properties

$R = CopyLink($1,$2,$3)

$R = Link ID
$1 = From Object
$2 = To Object
$3 = Copy Link

DeletePanelLinks

Deletes all spatial links on a given panel

DeletePanelLinks($1)

$1 = Panel

GetBendPoints

Reads bend points into table Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.

GetBendPoints($1,$2,$3)

$1 = Bend Table
$2 = Panel
$3 = Link Type

GetNextLinkObject

Returns the next portal object index that an item will travel to on a spatial link given the item starting at 'from' and target 'to'. Returns 0 if none.

$R = GetNextLinkObject($1,$2)

$R = Location
$1 = From Portal
$2 = To Portal

LinkDistance

Determine the spatial link travel distance between 2 portals.

$R = LinkDistance($1,$2)

$R = Distance
$1 = From
$2 = To

QueryLinkItems

Sets table to rows describing every item on the link. Required columns are ItemID, TotalTime, Ratio, Direction and Stopped. Ratio corresponds to the position on the link, 0 being the start of the link and 1 being the end. Direction is 0 for forward and 1 for reverse.

QueryLinkItems($1,$2)

$1 = Table
$2 = Link

RemoveLink

Removes any spatial links from and to the specified object labels (directional)

RemoveLink($1,$2)

$1 = From Object
$2 = To Object

SetBendPoints

Deletes all bend points and recreates them from the Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.

SetBendPoints($1,$2,$3)

$1 = Bend Table
$2 = Panel
$3 = Link Type

SetItemLinkTarget

Sets the destination an item will look for once it enters a spatial link. Time sets the travel time to use (or SetItemLinkTime can be used after this). Road sets the road for multi-toad links, 1..n or 0 to leave unchanged.

SetItemLinkTarget($1,$2,$3)

$1 = Target Object
$2 = Total Time
$3 = Road

SetItemLinkTime

Sets the time an item will take to reach its destination once it enters a spatial link

SetItemLinkTime($1)

$1 = To Time

SetLinkColor

Sets the color of a spatial link between 2 given objects

SetLinkColor($1,$2,$3,$4)

$1 = From Object
$2 = To Object
$3 = Color     
$4 = Road

SetLinkCost

Sets the link cost of a spatial link (normally computed from the link's distance)

SetLinkCost($1,$2,$3)

$1 = From Object
$2 = To Object
$3 = Cost      

SetLinkRoads

Sets the number of roads and road spacing for a spatial link.

SetLinkRoads($1,$2,$3,$4)

$1 = From Object
$2 = To Object
$3 = Roads
$4 = Spacing

SetLinkWidth

Sets the width of a spatial link between two objects

SetLinkWidth($1,$2,$3)

$1 = From Object
$2 = To Object
$3 = Width     

UpdateLinkItems

Updates the spatial link items according to the settings in the table. Columns are ItemID, TotalTime, Ratio, Direction and Stopped. Ratio corresponds to the position on the link, 0 being the start of the link and 1 being the end. Direction is 0 for forward and 1 for reverse. Stopped enables just that item to be suspended on the link. If ItemID is -1 the row is ignored. If Ratio is -1, the items position is retained. If TotalTime is -1, the current total time for the item is retained.

UpdateLinkItems($1,$2)

$1 = Table
$2 = Link

Special

---| Only During Move |---

Enables the modeller to specifically mark that the following routine lines do not execute during lookahead

 Only During Move |---||----- Following Only During Move -----|

Beep

Plays a tone through the sound card, Frequency in Hz, Duration in milliseconds

Beep($1,$2)

$1 = Frequency
$2 = Duration

BREAKPOINTIF

If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state

BREAKPOINTIF ($1)

$1 = Enable Break

BrowseKey

Give user chance to browse for another key. Returns non zero if a different key was selected which is acceptable.

$R = BrowseKey()

$R = Result

CallRoutine

Calls a subroutine

CallRoutine($F)

$F = Call

CLRDelete

Deletes a managed object created by New().

CLRDelete($1)

$1 = Handle

CLRGetProperty

Enables reading a dynamically named property of a managed class.

$R = CLRGetProperty($1,$2)

$R = Target
$1 = Handle
$2 = Name

CLRNew

Creates a new instance of a managed object. Requires result be an Instance formatted attribute.

$R = CLRNew($1)

$R = Target
$1 = DLLClass

CLRSetOwner

Sets owning window of a class, can specify a paint object or 0 to use current panel.

CLRSetOwner($1,$2)

$1 = Handle
$2 = PaintID

CLRSetProperty

Enables setting a dynamically named property of a managed class

CLRSetProperty($1,$2,$3)

$1 = Handle
$2 = Name
$3 = Value

Comment (//)

A comment line

Comment

CopyFont

Copies the font properties between cells and columns

CopyFont($R,$1)

$R = Format Result
$1 = Format From

CopyFormat

Copies the format/unit type/label reference between cells, columns and attributes

CopyFormat($R,$1)

$R = Format Result
$1 = Format From

CopyPortal

Makes a copy of a portal and places it on Panel. If the name text is not “-” or an empty string, the new portal uses that name.

$R = CopyPortal($1,$2,$3,$4,$5)

$R = New Portal
$1 = Original Portal
$2 = New Panel
$3 = X
$4 = Y
$5 = New Name

DescribeRoutineData

Describe the data accessed by a change object routine

DescribeRoutineData($1,$2,$3)

$1 = Routine Panel
$2 = Object Name
$3 = Output Filename

DragGanttBlock

Initiates dragging a gantt block. Should be invoked as result of gantt block click (set option to process event immediately). Returns non zero if block was moved and corresponding rows in table changed. Table data may need resorting if block moved beyond other block on same row. Drag Type can be as returned from the click broadcast, 1 = left edge, 2 = right edge, 3 = center (move only).

$R = DragGanttBlock($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Panel
$3 = Drag Type
$4 = Start Row
$5 = End Row
$6 = Min Time
$7 = Max Time
$8 = Increment

EncodeARGB

Encodes alpha, red, green and blue components (0..255) into a single 4 byte value used to specify any color/transparency in Planimate.

$R = EncodeARGB($1,$2,$3,$4)

$R = Result
$1 = Alpha Value
$2 = Red Value
$3 = Green Value
$4 = Blue Value

EncodeRGB

Encodes red, green and blue components (0..255) into a single 4 byte value used to specify any color in Planimate. The top byte of the value (alpha) is set to 255.

$R = EncodeRGB($1,$2,$3)

$R = Result
$1 = Red Value
$2 = Green Value
$3 = Blue Value

FollowItemRemote

Searches spatial links for the item and if found, sets the 'followitem property.

$R = FollowItemRemote($1,$2,$3)

$R = Result
$1 = Item Index
$2 = Scope Panel
$3 = Follow State

FormatForList

Formats the result object to reference a label list with the given name

FormatForList($R,$1)

$R = Format Result
$1 = List Name

GanttPopup

Pops up the default gantt popup window as if a gantt block was clicked. This is useful when processing a gantt click broadcast. (x/y) are panel co-ordinates as read from the mouse. Returns non zero on success or zero if there wasn't a gantt block under the co-ordinates supplied.

$R = GanttPopup($1,$2,$3,$4)

$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y

GetFormat

Returns the value format of the data

$R = GetFormat($1)

$R = Result
$1 = Data To Test

GetFormatListName

Creates a new label with the name of the label list the target is formatted to. If no list, no change to the target is made

GetFormatListName($R,$1)

$R = Result
$1 = Data To Test

InfoPanelRemote

Searches spatial links for the item and if found, sets the s.ItemShowInfoPanel property.

$R = InfoPanelRemote($1,$2,$3)

$R = Result
$1 = Item Info
$2 = Scope Panel
$3 = Show State

ListRoutineCode

Write a change object routine code to a file

ListRoutineCode($1,$2,$3)

$1 = Routine Panel
$2 = Object Name
$3 = Output Filename

LoadDataSet2

Load a version 2 dataset

$R = LoadDataSet2($1,$2,$3)

$R = Result
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase

LoadedAssemblies

Display Loaded Assemblies dialog for debugging.

LoadedAssemblies()

LoadModel

Stops current run and loads another model. For PBA, the PBA is reloaded regardless of name.

LoadModel($1)

$1 = Model Name

ObjectType

Returns the type of the object that the object label refers to

$R = ObjectType($1)

$R = Result
$1 = Object

OpenRoutineWindow

Opens/closes the current routine window depending on command.

OpenRoutineWindow($1)

$1 = Command

QueryNetwork

Sets table to rows describing every link on Panel between portals (track,spatial,pipe). 4 columns are required; From, To, Type and ID. From and To are the object Ids of the portals at the end points. Type is the type of link and is formatted to the “_link_type” label list. ID is the object id of the link.

QueryNetwork($1,$2)

$1 = Table
$2 = Panel

RealTimeCallBack

This will schedule a _Real Time Tick broadcast at a given real interval, in milliseconds. Note that any previous event is cancelled when this is re-invoked. Interval can be between 10 and 5000ms.

RealTimeCallBack($1,$2)

$1 = Interval (ms)
$2 = Scope Panel

RemovePortal

Deletes the portal and its contents from the model

RemovePortal($1)

$1 = Portal ID

SaveDataSet2

Save a version 2 dataset

$R = SaveDataSet2($1,$2,$3)

$R = Result
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase

SetDirectory

Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure

$R = SetDirectory($1)

$R = Result
$1 = Path

SetFormat

Sets format of $1 to mode $2, with $3 being the label list name if its a label format

SetFormat($1,$2,$3)

$1 = Data To Set
$2 = Format
$3 = List Name

SetLastDatasetFile

Sets the last dataset filename, optionally visible in the titlebar. A relative filename will have a full path created as would be used in a file operation with the name.

SetLastDatasetFile($1)

$1 = Name

ShowHelp

Open a HTML help window. Help File can be empty for default.

ShowHelp($1,$2)

$1 = Help File
$2 = Section

SignFile

Digitally signs a file.

$R = SignFile($1,$2,$3,$4,$5)

$R = Result
$1 = File Name
$2 = Cert
$3 = Password
$4 = Subject
$5 = Time Server

StartScheduledEntries

Signals that scheduled entries should start (if options deferred them starting when the model was run)

StartScheduledEntries

UserKeyBrowse

Presents a dialog enabling the user to either paste an application license or browse to a license file. On success in either case the license text is returned. You can specify a default filename and browse directory.

$R = UserKeyBrowse($1,$2,$3)

$R = License Text
$1 = FileName
$2 = BrowseFolder
$3 = AppName

UserKeyLoadFile

Attempts to load a user license key from a file, returns zero on success.

$R = UserKeyLoadFile($1,$2,$3)

$R = Target
$1 = File Name
$2 = Password
$3 = PublicKey

UserKeyLoadText

Attempts to load a user license key from the supplied text, returns zero on success.

$R = UserKeyLoadText($1,$2,$3)

$R = Target
$1 = Key Text
$2 = Password
$3 = PublicKey

UserKeyLookup

Looks up a setting in a loaded key file. Returns -1 on error or empty string if LHS is text.

$R = UserKeyLookup($1)

$R = Value
$1 = Name

WatchListAdd

Add portal, routine or item attribute to watch list for debugging

WatchListAdd($1)

$1 = Attribute

WatchListRemove

Remove portal, routine or item attribute from watch list

WatchListRemove($1)

$1 = Attribute

String

GetNoteRTF

Retrieves RTF text of note

$R = GetNoteRTF($1)

$R = String
$1 = Paint ID

GetNoteText

Retrieves plain text of note

$R = GetNoteText($1)

$R = String
$1 = Paint ID

SetNoteRTF

Sets RTF text of note

SetNoteRTF($1,$2)

$1 = Paint ID
$2 = Text

SetNoteText

Sets plain text of note

SetNoteText($1,$2)

$1 = Paint ID
$2 = Text

SetText ( $= )

Set a free text attribute or table cell to another text attribute, literal text or a the formatted text of a value

$R $= $1

$R = Result
$1 = Set To

Table

AddTable

Adds table to panel, returning data object label. If a table with that name already exists, 0 is returned.

$R = AddTable($1,$2)

$R = Result
$1 = Panel
$2 = Name

AdvancedSort

Performs a sort on a table using another table to define the sort criteria, the sort info table should have columns for column, asc/desc,num/alpha and optionally filter if you intend to use row filtering. ColumnAsText interprets and matches entries in column 1 textually instead of numerically.

AdvancedSort($R,$1,$2,$3)

$R = Target   
$1 = Sort Info
$2 = Filter
$3 = ColumnAsText

AllocateTableRowMemory

Enables memory to be reserved for a table which is expected to grow to a large number of rows

AllocateTableRowMemory($R,$1)

$R = Target Table
$1 = Allocate Rows

AppendColumn

Append a column to a table

AppendColumn($R,$1)

$R = Target
$1 = Col Count

AppendRow

Append a row to the table

AppendRow($R,$1)

$R = Target
$1 = Row Count

BinarySearch

Perform a binary search over the range First Index to Last Index. Assumes the data compared is sorted ascending and the comparison is for equality. Multiple comparisons can be combined only with AND. Returns 1 + last index or 0 if Zero On Fail is set.

$R = BinarySearch($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

BlockMove

Block copy a range of cells to another table

BlockMove($R,$1,Range[$2][$3])

$R = Result
$1 = Source
$2 = # of Rows
$3 = # of Cols

CheckTableSorted

Determines if a table is sorted by the sort criteria. Return 0 if OK or the first unsorted row number. This can be more efficient than calling Sort which is very slow if the table is already sorted.

$R = CheckTableSorted($1,$2,$3,$4,$5)

$R = Result
$1 = Table
$2 = Column 1
$3 = Column 2
$4 = Column 3
$5 = Column 4

CompareTables

Compares rows in tables, returns row number of first difference. Only numerical values are compared, not Text strings.

$R = CompareTables($1,$2)

$R = Result
$1 = Table 1
$2 = Table 2

CopyTable

Replaces all data columns in the target table so it is a copy of Original.

$R = CopyTable($1)

$R = Target
$1 = Original Table

CopyToClipboard

Copy table to clipboard using its clipboard settings and the option modifiers

CopyToClipboard($R,$1)

$R = From Table
$1 = Options

CountIFMatch

Counts rows where Match Column matches Match Key

$R = CountIFMatch($1,$2)

$R = Result
$1 = Match Column
$2 = Match Key

CreateSortIndex

Creates an ordered list of row numbers if the given column was sorted alphabetically

CreateSortIndex($R,$1)

$R = Target Column
$1 = Column To Sort

DeleteColumn

Delete a range of columns from a table

DeleteColumn($R,$1,$2)

$R = Target Table
$1 = First Col
$2 = Col Count

DeleteRow

Delete a number of rows starting at a given row in a table

DeleteRow($R,$1,$2)

$R = Target Table
$1 = First Row
$2 = Row Count

EnableColumnEditing

Controls whether a given table column can be edited

EnableColumnEditing($R,$1)

$R = Target Column
$1 = Edit Control

FindColumnLabel

Searches columns in table $1 for one with a label which matches formatted $2 and returns the index or 0 if none found

$R = FindColumnLabel($1,$2)

$R = Result
$1 = Table
$2 = Find String

FindColumnTitle

Searches columns in table $1 for one with a title which matches formatted $2 and returns the index or 0 if none found

$R = FindColumnTitle($1,$2)

$R = Result
$1 = Table
$2 = Find String

FindDuplicates

Finds duplicated rows in Table, storing the duplicate row number pairs in the first two columns of table Duplicates. Existing rows in Duplicates are removed. Only values are compared, not text.

FindDuplicates($R,$1)

$R = Duplicates
$1 = Table

GenerateUnique

First column of the target table is set to a unique subset of the passed column. Text or numbers are supported, with the target column being reformatted if required. If the target does not contain a column, it is created. The output column is sorted using natural ordering.

$R = GenerateUnique($1)

$R = Result
$1 = Column

GetCellBackgroundColor

Returns ARGB or index value for a cell's background color. Will be null index (255) if not set for the cell

$R = GetCellBackgroundColor($1)

$R = Result
$1 = Table Cell

GetCellTextColor

Returns ARGB or index value for a cell's text color. Will be null index (255) if not set for the cell

$R = GetCellTextColor($1)

$R = Result
$1 = Table Cell

GetColSecondTitle

Sets the target to a label of the second title row for the given column

GetColumnSecondTitle($R,$1)

$R = Result
$1 = Column

GetColumnProperty

Read a property of a table column

$R = GetColumnProperty($1,$2)

$R = Result
$1 = Table Column
$2 = Property Label    

GetColumnTip

Sets the target (text or label) to the tip text for the given column

GetColumnTip($R,$1)

$R = Result
$1 = Column

ImportFromClipboard

Performs import of table data/structure from clipboard as available in the table editor

$R = ImportFromClipboard($1,$2)

$R = Result
$1 = Target Table
$2 = Configure   

InsertColumn

Insert columns into a table with the option of copying formatting from another column

InsertColumn($R,$1,$2,$3)

$R = Target Table
$1 = Insert Pos.
$2 = Col Count
$3 = Copy Format

InsertRow

Insert a number of rows at a given row in a table

InsertRow($R,$1,$2)

$R = Target Table
$1 = Insert Pos.
$2 = Row Count

MatchMultipleKeys

Searches table from the top for the first instance where the given columns have the given values. Returns row number or 0 if no match. Column 3 may be zero for a 2 column search.

$R = MatchMultipleKeys($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Start Row
$3 = Column 1
$4 = Match 1
$5 = Column 2
$6 = Match 2
$7 = Column 3
$8 = Match 3

MaxIndexIFMatch

Returns first row with maximum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.

$R = MaxIndexIFMatch($1,$2,$3)

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

MinIndexIFMatch

Returns first row with minimum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.

$R = MinIndexIFMatch($1,$2,$3)

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

OutOfScopeWrite

Enable writing to item table reference $1 even if it is not in scope

OutOfScopeWrite($1)

$1 = Item Table Ref

PositionLastRow

Intended for use after a single row has been appended to an already-sorted table, this will efficiently move that last row to the position to maintain the sort. Table must already be sorted by the sort criteria.

PositionLastRow($R,$1,$2,$3,$4)

$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4

PurgeDuplicateRows

Removes any identical rows from the given table. Text formatted columns are not compared and should not be present in the table in cases of 100k or more rows for performance reasons.

PurgeDuplicateRows($R)

$R = Target

ReverseSearch

Decrement the result attribute from first to last until the condition is true. If the search fails, returns last_index-1 or 0 if the Zero On Fail option is non zero.

$R = ReverseSearch($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

Search

Increment the result attribute from first to last until the condition is true. If the search fails, returns 1+last_index or 0 if the Zero On Fail option is non zero.

$R = Search($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

SetCellBackgroundColor

Sets the background color for the cell.

SetCellBackgroundColor($1,$2)

$1 = Table Cell
$2 = Color Value

SetCellFreeText

Sets the free text (not bound by label text rules) for a table cell

SetCellFreeText($R,$1)

$R = Target Cell
$1 = Source Cell

SetCellTextColor

Sets the text color for the cell

SetCellTextColor($1,$2)

$1 = Table Cell
$2 = Color Value

SetColAlignment

Enables a column's text alignment to be changed

SetColumnAlignment($R,$1)

$R = Target Column
$1 = Align Mode   

SetColSecondTitle

Sets the text of the second title row for the given column

SetColumnSecondTitle($R,$1)

$R = Target Column
$1 = Title Text

SetColTitle

Set the title text of a table column

SetColumnTitle($R,$1)

$R = Target Column
$1 = Title Text

SetColTupleName

Sets the name used to internally identify a column

SetColumnTupleName($R,$1)

$R = Target Column
$1 = Tuple Text

SetColumnProperty

Set a property of a table column

SetColumnProperty($1,$2,$3)

$1 = Table Column
$2 = Property Label    
$3 = Property Value    

SetColumnTip

Sets the tool tip of a table column

SetColumnTip($R,$1)

$R = Column
$1 = Tip Text

SetColWidth

Sets the formatting width of a table column

SetColWidth($R,$1)

$R = Target Column
$1 = Column Width

SetTableRowHeight

Sets the height of table rows

SetTableRowHeight($1,$2)

$1 = Target Table
$2 = Row Height

SetTableTitle

Set the title text of the table from the label

SetTableTitle($R,$1)

$R = Target Table
$1 = Title Text

ShiftCol

Shift the columns in a table

ShiftColumn($R,$1,$2)

$R = Result
$1 = Source
$2 = Shift <+ ->

ShiftRow

Shift the rows in a table

ShiftRow($R,$1,$2)

$R = Result
$1 = Source
$2 = Shift ^+ -v

Sort

Sort table by up to 4 columns. If the column index is -ve, it reverses the sort order for that column.

Sort($R,$1,$2,$3,$4)

$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4

SumIFMatch

Sums values in Data Column for rows where Match Column matches Match Key

$R = SumIFMatch($1,$2,$3)

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

TableReferenceSet

Returns non zero if the reference resolves to a table

$R = TableReferenceSet($1)

$R = Result
$1 = Item Table Ref

TableSortDialog

Enables the user to set up and perform a sort using the table sort dialog

TableSortDialog($R)

$R = Target

UpdateColumnRefs

Re-initialises column labels for references to a table

UpdateColumnRefs($1)

$1 = Table

Table View

ClearFilter

Clear filter settings for a table view

ClearFilter($1,$2)

$1 = Table
$2 = Panel

CopyAllFromView

Copies the entire contents of a table view. Any current selection is ignored and left intact.

CopyAllFromView($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Col Labels

CopyFromView

Copies the current cell or selection from a specified table view just as if CTRL-C was pressed

CopyFromView($1,$2)

$1 = Table
$2 = Panel

DeleteView

Deletes view during run. Data is the table, attribute the view is for. Panel is where the view is located.

DeleteView($1,$2,$3,$4)

$1 = Data
$2 = Panel
$3 = View Type
$4 = Index

GetColumnFilter

Gets any active column filter for a table view

$R = GetColumnFilter($1,$2)

$R = Text/Label
$1 = Column
$2 = Panel

GetFilteredRows

Retrieves the filter mapping of view rows to actual rows into the list table

GetFilteredRows($1,$2,$3)

$1 = Filter List
$2 = Table
$3 = Panel

GetTableView

Read columns of a table view into another table

GetTableView($1,$2,$3)

$1 = View Table
$2 = View Panel
$3 = Config Table

GetViewProperty

Retrieves a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.

$R = GetViewProperty($1,$2,$3,$4,$5)

$R = Result
$1 = Table
$2 = Panel
$3 = Property
$4 = View Type
$5 = Index

NearestPoint

Returns the row of the closest point on a Log Driven Display. If Overlay is non zero, only that overlay is checked. Max Distance sets the largest distance that will be considered in the matching. With no match, the function returns 0.

$R = NearestPoint($1,$2,$3,$4,$5,$6)

$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y
$5 = Overlay
$6 = Max Distance

PasteIntoView

Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success

$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)

$R = Error Result
$1 = Table
$2 = Panel
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read

ReFilterTableView

Reapply any active filters to the current data in the table

ReFilterTableView($1,$2)

$1 = Table
$2 = Panel

SetCellColor

Set text and background colours for cells, supporting doing entire columns, rows or tables as well. In all cases the per cell colour is set.

SetCellColor($1,$2,$3)

$1 = Cell
$2 = TextColor
$3 = BackColor

SetColumnFilter

Sets a column filter text for a table view. The filter needs to be reapplied once all the columns have been set.

SetColumnFilter($R,$1,$2)

$R = Column
$1 = Text
$2 = Panel

SetTableView

Set columns that a table view will display

SetTableView($1,$2,$3)

$1 = View Table
$2 = View Panel
$3 = Config Table

SetTableViewColScroll

Sets the column scroll of a view for a table on a given panel

SetTableViewColScroll($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetTableViewRowScroll

Sets the row scroll of a view for a table on a given panel

SetTableViewRowScroll($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetViewFilterRows

Sets the rows that a table view on a panel will display. Filter List is a column of row numbers.

SetViewFilterRows(($1,$2,$3)

$1 = Filter List
$2 = Table
$3 = Panel

SetViewProperty

Sets a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.

SetViewProperty($1,$2,$3,$4,$5,$6)

$1 = Table
$2 = Panel
$3 = Property
$4 = Value
$5 = View Type
$6 = Index

TableViewColScroll

Reads the column scroll of a view for a table on a given panel

$R = TableViewColScroll($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewRows

Reads the number of rows in a table view. If a filter is set, this may differ from the number of rows in the table

$R = TableViewRows($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewRowScroll

Reads the row scroll of a view for a table on a given panel

$R = TableViewRowScroll($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewVisibleCols

Reads the number of visible columns in a table view

$R = TableViewVisibleCols($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewVisibleRows

Reads the number of visible rows in a table view

$R = TableViewVisibleRows($1,$2)

$R = Target
$1 = Table
$2 = Panel

Time

AdvanceToTimeDialog

Enables user to use the advance to time dialog. If Absolute is set, it defaults to an absolute time advance otherwise it defaults to a relative interval. Time is interpreted accordingly depending on Absolute, as an interval or as an absolute time. For an Absolute advance, if its zero, the clock value is the default instead of the model start time.

AdvanceToTimeDialog($1,$2)

$1 = Absolute
$2 = Time

DayOfMonth

Returns the day of the month, starting at 1

$R = DayOfMonth($1)

$R = Result
$1 = Time

DayOfWeek

Returns the day of the week, starting at 1 for Sunday

$R = DayOfWeek($1)

$R = Result
$1 = Time

DaysInDateMonth

Returns how many days in the month of the absolute time

$R = DaysInDateMonth($1)

$R = Result
$1 = Time

FormDate

Computes the absolute time representing midnight on the given date

$R = FormDate($1,$2,$3)

$R = Result
$1 = Date
$2 = Month
$3 = Year

GetDate

Extracts the date from a date/time

$R = GetDate($1)

$R = Result
$1 = Date/Time

HourOfDay

Returns the hour into the current day of the time, starting at 0

$R = HourOfDay($1)

$R = Result
$1 = Time

HourOfDay+1

Returns the hour into the current day of the time, starting at 1 instead of 0

$R = HourOfDay_1($1)

$R = Result
$1 = Time

IncrementByMonths

Increments the date by one or more months, attempting to keep the same day of month

IncrementByMonths($R,$1)

$R = Result
$1 = # of months

MonthOfYear

Returns the month of the year, starting at 1 for January

$R = MonthOfYear($1)

$R = Result
$1 = Time

TimeOfDay

Returns the number of seconds into the current day of the time

$R = TimeOfDay($1)

$R = Result
$1 = Time

WeekOfYear

Returns the week of the year, starting at 1

$R = WeekOfYear($1)

$R = Result
$1 = Time

YearOfDate

Returns the year of the given calendar time

$R = YearOfDate($1)

$R = Result
$1 = Time

Tuple

DecodeMultiLabelToTuple

Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label

DecodeMultiLabelToItem($R)

$R = Target

EncodeItemToMultiLabel

Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label

EncodeItemToMultiLabel($R)

$R = Target

MatchedCopyRow

Copy rows between tables where the column names match

MatchedCopyRow($R,$1)

$R = Result
$1 = Set To

TupleAppendFromCarried

Append a row to the table and for it, set table columns from a carried item's attributes with the same name

TupleAppendFromCarried($R,$1)

$R = Table
$1 = Carried Index

TupleAppendFromItem

Append a row into the table and for it, set table columns from item attributes with the same name

TupleAppendFromItem($R)

$R = Table

TupleCarriedToRow

For the specified row, set table columns from a carried item's attributes with the same name

TupleCarriedToRow($R,$1)

$R = Row
$1 = Carried Index

TupleDecrementToRow

For the specified row, decrement cells with the values of item attributes with matching names

TupleDecrementFromRow($R)

$R = Row

TupleExtractToCarried

For the specified row, set a carried item's attributes from table columns with the same name then delete the row

TupleExtractToCarried($R,$1)

$R = Row
$1 = Carried Index

TupleExtractToItem

For the specified row, set item attributes from table columns with the same name then delete the row

TupleExtractToItem($R)

$R = Row

TupleIncrementToRow

For the specified row, increment cells with the values of item attributes with matching names

TupleIncrementToRow($R)

$R = Row

TupleInsertFromCarried

Insert a row into the table and for it, set table columns from a carried item's attributes with the same name

TupleInsertFromCarried($R,$1)

$R = Row
$1 = Carried Index

TupleInsertFromItem

Insert a row into the table and for it, set table columns from item attributes with the same name

TupleInsertFromItem($R)

$R = Row

TupleItemToRow

For the specified row, set table columns from item attributes with the same name

TupleItemToRow($R)

$R = Row

TupleRowToCarried

For the specified row, set a carried item's attributes from table columns with the same name

TupleRowToCarried($R,$1)

$R = Row
$1 = Carried Index

TupleRowToItem

For the specified row, set item attributes from table columns with the same name

TupleRowToItem($R)

$R = Row

UI

AddListToMenu

Appends a new menu to the modeller custom menu bar

AddListToMenu($1,$2)

$1 = Menu Name
$2 = Item List

BringToFront

If a panel is open in a popup window, bring that popup to the front in the window z-order.

BringToFront($1)

$1 = Panel

BrowseFile

Browse for a file. Returns non zero if one chosen. FileName sets an initial file, Options can combine:1 to enable a save-style dialog (default is load) and 2 to enable stay in directory (default is to return to working directory). Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.

$R = BrowseFile($1,$2)

$R = File Chosen
$1 = FileName
$2 = Options

BrowseFolder

Browse for a folder. Returns non zero if one chosen. Name sets an initial path, Use s.LastAccessedDataFilePath to access the path selected.

$R = BrowseFolder($1,$2)

$R = Folder Chosen
$1 = StartFolder
$2 = Title

ClearCustomMenubar

Removes all menu items from the modeller custom menu bar

ClearCustomMenubar

DescribeFont

Retrieves a CSV text field describing the properties of the font for the specified column or table cell.

$R = DescribeFont($1)

$R = Result
$1 = Data

Dialog

Show a dialog box for the user to interact with

$R = Dialog($F)

$R = Result
$F = Dialog

DragIcon

Displays an icon and enables user to position it. X and Y are the starting position (center) in panel co-ordinates. If a move is performed, new co-ordinates are written to these values. Icon selects an image which defines the bounding box. Returns non zero if the move was not cancelled. Supports being invoked with mouse down or up. Keys also supported.

$R = DragIcon($1,$2,$3,$4)

$R = result
$1 = X Value
$2 = Y Value
$3 = Panel
$4 = Icon Name

GetCellXY

Retrieves the co-ordinates of a given corner of a cell that is visible in a table view. Co-ordinates are relative to the top left of the main panel window and can be used for ShowPopupPanel(). Corner is 1..9, 1 = top left.The cell is specified in view cells. Result is non zero on error, for example the cell is not visible. Otherwise X and Y are set.

$R = GetCellXY($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Panel
$3 = View Index
$4 = View Row
$5 = View Column
$6 = Corner
$7 = X
$8 = Y

HandlePopupMenu

Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled

$R = HandlePopupMenu($1)

$R = Result
$1 = Table

InitiateFieldEdit

Starts editing attribute/cell views on a panel, as if the user clicked on the first one

InitiateFieldEdit($1)

$1 = Target Panel

MessageBox

Displays a standard message box with an OK button

MessageBox($1,$2)

$1 = Text
$2 = Title

MessageBoxConfirm

Displays a standard message box with OK (1) / Cancel (0) Buttons

$R = MessageBoxConfirm($1,$2)

$R = Result
$1 = Text
$2 = Title

MessageBoxYN

Displays a standard message box with Yes (1) / No (0) Buttons

$R = MessageBoxYN($1,$2)

$R = Result
$1 = Text
$2 = Title

MessageBoxYNC

Displays a standard message box with Yes (1) / No (0) / Cancel (-1) buttons

$R = MessageBoxYNC($1,$2)

$R = Result
$1 = Text
$2 = Title

SetMenuBar

Interprets columns in table as depth/name/index and builds a custom menu bar

SetMenuBar($1)

$1 = Table