Routine Operations: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This page lists all of the routine operations available in Planimate as of 5.32f. 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. Please do not edit it.'' __NOEDITSECTION__ __TOC__
Line 5: Line 5:
== Arithmetic ==
== 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 32: Line 32:
  $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 62: Line 62:
  $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
  $1 = Value 1
  $1 = Value 1
  $2 = Value 2
  $2 = Value 2
=== RemapValue ===
Remaps value through table with row range, To Row = 0 uses row count
'''[[RemapValue|$R = RemapValue($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = Map Table
$2 = Value
$3 = Map Column
$4 = From Row
$5 = To Row


=== Scale ( *= ) ===
=== Scale ( *= ) ===
Line 90: Line 103:
  $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 178: Line 191:
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 188: Line 201:
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 ===
=== RETURN ===
Line 204: Line 217:
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 234: Line 247:
   
   
  $1 = Object
  $1 = Object
  $2 = X Pos  
  $2 = X Pos
  $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
Line 252: Line 274:
  '''[[ColorPaletteEntry|$R = ColorPaletteEntry($1)]]'''
  '''[[ColorPaletteEntry|$R = ColorPaletteEntry($1)]]'''
   
   
  $R = Result      
  $R = Result    
  $1 = Palette Index
  $1 = Palette Index


Line 278: Line 300:
   
   
  $1 = Panel
  $1 = Panel
=== 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 ===
=== GetSystemColorRGB ===
Line 295: Line 327:
   
   
  $R = Result
  $R = Result
  $1 = Panel With Viewport
  $1 = Panel With Viewport  
  $2 = Panel Inside Viewport
  $2 = Panel Inside Viewport


Line 305: Line 337:
   
   
  $R = Result
  $R = Result
  $1 = Panel With Viewport
  $1 = Panel With Viewport  
  $2 = Panel Inside Viewport
  $2 = Panel Inside Viewport


Line 315: Line 347:
   
   
  $R = Result
  $R = Result
  $1 = Panel With Viewport
  $1 = Panel With Viewport  
  $2 = Panel Inside Viewport
  $2 = Panel Inside Viewport


Line 369: Line 401:
   
   
  $R = Result
  $R = Result
  $1 = Panel  
  $1 = Panel


=== PanelWindowTop ===
=== PanelWindowTop ===
Line 378: Line 410:
   
   
  $R = Result
  $R = Result
  $1 = Panel  
  $1 = Panel


=== PrintPanel ===
=== PrintPanel ===
Line 387: Line 419:
   
   
  $1 = Target Subsystem
  $1 = Target Subsystem
=== ReFitPopup ===
Resize an already open popup to panel's changed size
'''[[ReFitPopup|ReFitPopup($1)]]'''
$1 = Panel


=== RepaintObjects ===
=== RepaintObjects ===


Forces a repaint of dynamic objects only; faster than a full force repaint
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]]'''
  '''[[RepaintObjects|RepaintObjects($1,$2)]]'''
   
   
$1 = Panel
$2 = SpeedRegulate
=== RepaintView ===
Repaints contents of a view
'''[[RepaintView|RepaintView($1,$2,$3,$4)]]'''
$1 = Table
$2 = Panel
$3 = View Type
$4 = Index


=== SetActivityString ===
=== SetActivityString ===
Line 410: Line 463:
   
   
  $1 = Palette Index
  $1 = Palette Index
  $2 = RGB Value  
  $2 = RGB Value  


=== SetGraphXOffset ===
=== SetGraphXOffset ===
Line 441: Line 494:
  $2 = Location
  $2 = Location
  $3 = Icon Name
  $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 ===
=== SetPanelColor ===
Line 448: Line 513:
  '''[[SetPanelColor|SetPanelColor($1,$2)]]'''
  '''[[SetPanelColor|SetPanelColor($1,$2)]]'''
   
   
  $1 = Panel  
  $1 = Panel
  $2 = Color
  $2 = Color


=== SetPanelTransparency ===
=== SetPanelProperty ===


Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency
Set a property of a panel, specified using _panel_properties list
 
'''[[SetPanelProperty|SetPanelProperty($1,$2,$3)]]'''
$1 = Panel
$2 = Property Label
$3 = Value
 
=== SetPanelTransparency ===
 
Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency


  '''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
  '''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
   
   
  $1 = Panel  
  $1 = Panel
  $2 = Transparency
  $2 = Transparency


Line 468: Line 543:
  $1 = Portal ID
  $1 = Portal ID
  $2 = Icon Name
  $2 = Icon Name
=== SetPortalTip ===
Sets tip text for Portal to Text
'''[[SetPortalTip|SetPortalTip($1,$2)]]'''
$1 = Portal ID
$2 = Text


=== SetStatusItemAreaString ===
=== SetStatusItemAreaString ===
Line 483: Line 567:
  '''[[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
Line 494: Line 578:
  '''[[SetViewportTarget|SetViewportTarget($1,$2,$3)]]'''
  '''[[SetViewportTarget|SetViewportTarget($1,$2,$3)]]'''
   
   
  $1 = Panel With Viewport
  $1 = Panel With Viewport  
  $2 = Current Panel Inside Viewport
  $2 = Current Panel Inside Viewport
  $3 = New Panel Inside Viewport
  $3 = New Panel Inside Viewport
Line 504: Line 588:
  '''[[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
=== SetWindowTitle ===
Sets the title of the main window
'''[[SetWindowTitle|SetWindowTitle($1)]]'''
$1 = Title Text
=== ShowAboutBox ===
Shows the Planimate about box
'''[[ShowAboutBox|ShowAboutBox()]]'''


=== ShowPopupPanel ===
=== ShowPopupPanel ===
Line 532: Line 631:
  '''[[SwapPopupPanel|SwapPopupPanel($1,$2)]]'''
  '''[[SwapPopupPanel|SwapPopupPanel($1,$2)]]'''
   
   
  $1 = Target Panel  
  $1 = Target Panel
  $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 ===
 
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 ===
  '''[[ExtractPathName|$R = ExtractPathName($1)]]'''
  '''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
   
   
  $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


=== GetLabelListProperty ===
=== FileLines ===


Retrieves a property of a label list
Number of lines in file or -1


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


=== LabelCount ===
=== FilesInFolder ===


Returns how many labels 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


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


=== MaxLabelIndex ===
=== FilesInHierarchy ===


Returns the highest 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.


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


=== MinLabelIndex ===
=== FileSize ===


Returns the lowest allocated label index in the given label list
Returns size of file or -1 if not found


  '''[[MinLabelIndex|$R = MinLabelIndex()]]'''
  '''[[FileSize|$R = FileSize($1)]]'''
   
   
  $R = Result
  $R = Result
$1 = File


=== NextLabelIndex ===
=== PlaySound ===


The next allocated label index for the list or -1 if none
Play windows sound file. Will extract WAV files from DB if required.


  '''[[NextLabelIndex|$R = NextLabelIndex($1)]]'''
  '''[[PlaySound|PlaySound($1,$2)]]'''
   
   
  $R = Result
  $1 = Sound File
  $1 = Label Index
  $2 = Wait Finish


=== PrevLabelIndex ===
=== ReadFromFile ===


The previous allocated label index for the list or -1 if none
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.


  '''[[PrevLabelIndex|$R = PrevLabelIndex($1)]]'''
  '''[[ReadFromFile|$R = ReadFromFile($1,$2,$3,$4,$5,$6,$7)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label Index
  $1 = File
$2 = Data
$3 = Options
$4 = File Row
$5 = File Column
$6 = Row Limit
$7 = Column Limit


=== RedirectLabelList ===
=== ReadViewFromFile ===


Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.
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.


  '''[[RedirectLabelList|RedirectLabelList($1,$2)]]'''
  '''[[ReadViewFromFile|$R = ReadViewFromFile($1,$2,$3,$4,$5)]]'''
   
   
  $1 = From Name
$R = Result
  $2 = To Name
  $1 = File
  $2 = Table
$3 = Panel
$4 = View Index
$5 = Options


=== ReIndexLabelList ===
=== ReleaseFileLock ===


Re-indexes all members in a label list so they have ascending and continuous index values
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


  '''[[ReIndexLabelList|ReIndexLabelList($1)]]'''
  '''[[ReleaseFileLock|$R = ReleaseFileLock($1)]]'''
   
   
  $1 = Re-index Label List
$R = Result
  $1 = File


=== ReIndexLabels ===
=== RenameFile ===


Remaps labels in the given list using 2 columns of matching from and to values
Renames file


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


=== RemoveSubLabel ===
=== RunCommand ===


Removes the sublabel as a member of the sublabel list
Runs a new process or opens a file via the shell


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


=== SetLabelListProperty ===
=== SaveImage ===


Sets a property of a label list
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.


  '''[[SetLabelListProperty|SetLabelListProperty($1,$2,$3)]]'''
  '''[[SaveImage|$R = SaveImage($1,$2,$3)]]'''
   
   
  $1 = LabelList
$R = Result
  $2 = Property
  $1 = File
  $3 = Value
  $2 = Panel
  $3 = In-Memory


=== TestLabelIndex ===
=== WriteToFile ===


Tests whether an index has been used in a label list
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.


  '''[[TestLabelIndex|$R = TestLabelIndex($1,$2)]]'''
  '''[[WriteToFile|$R = WriteToFile($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Index Value
  $1 = File
  $2 = Label List
  $2 = Data
$3 = Options


== Label String ==
=== WriteViewToFile ===


=== AppendToLabel ===
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.


Append text to an existing label
  '''[[WriteViewToFile|$R = WriteViewToFile($1,$2,$3,$4,$5)]]'''
 
  '''[[AppendToLabel|AppendToLabel($R,$1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options


=== CreateLabelAlias ===
== Label ==


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.
=== AddLabelDialog ===


'''[[CreateLabelAlias|$R = CreateLabelAlias($1,$2)]]'''
Show a dialog so the user can add a label to the given label list
$R = Error Result
$1 = Text
$2 = Target Label


=== CreatePasswordHash ===
  '''[[AddLabelDialog|AddLabelDialog($R)]]'''
 
Uses the 3 text sources to create an unpredictable hash string
 
  '''[[CreatePasswordHash|$R = CreatePasswordHash($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
$1 = Text-1
$2 = Text-2
$3 = Text-3


=== CropToCharacters ===
=== AddSubLabel ===


Crop a label to a subset of its text
Makes the new sublabel for the parent label $1 (if it doesn't exist) and returns its index as a sublabel


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


=== ExtractFileExtention ===
=== ClearLabelList ===


Create a label in the target label list which is the file extention of the path/file text
Removes all labels from a label list


  '''[[ExtractFileExtention|ExtractFileExtention($R,$1)]]'''
  '''[[ClearLabelList|ClearLabelList($1)]]'''
   
   
$R = Result 
  $1 = Clear Label List
  $1 = Path/File


=== ExtractFileName ===
=== CreateLabelList ===


Create a label in the target label list which is the file name from a full path/file text
Creates a label list with the given name and formats the result attribute to reference it


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


=== ExtractIntoFormat ===
=== CreateLabelListFromColumn ===


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.
Uses the provided column to provide text for creating a new label list


  '''[[ExtractIntoFormat|$R = ExtractIntoFormat($1,$2,$3)]]'''
  '''[[CreateLabelListFromColumn|CreateLabelListFromColumn($R,$1)]]'''
   
   
  $R = Result
  $R = Target List
  $1 = Label
  $1 = Source Column
$2 = From Char
$3 = To Char


=== ExtractPathName ===
=== CreatePanelPortalLabel ===


Create a label in the target label list which is the file name from a full path/file text
Creates a panel label for the subsystem of the given portal object label


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


=== FilesInFolder ===
=== CreateSubLabelList ===


Returns how many files matching a wildcard in the given folder
Creates an empty sub label list of an existing label list and formats an attribute to reference it


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


=== FilesInHierarchy ===
=== CreateSubsystemObjectLabel ===


Retrieve how many files in a file folder (including subfolders)
Creates an object label for the portal owning the panel of this routine


  '''[[FilesInHierarchy|$R = FilesInHierarchy($1)]]'''
  '''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
   
   
  $R = Target List
  $R = New Object Label
$1 = Path/File 


=== FormatIntoLabel ===
=== DeleteLabel ===


Create a new label with the formatted text of the source
Deletes the given label from its labellist


  '''[[FormatIntoLabel|FormatIntoLabel($R,$1)]]'''
  '''[[DeleteLabel|DeleteLabel($1)]]'''
   
   
$R = Result
  $1 = Label
  $1 = Source


=== FormatIntoLabelIndex ===
=== GetLabelListProperty ===


Creates a label from the text of source and using the provided index
Retrieves a property of a label list


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


=== FormatNameIntoLabel ===
=== LabelCount ===


Creates a label from the name of the given object
Returns how many labels in the given label list


  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
  '''[[LabelCount|$R = LabelCount($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = Label Count


=== FormattedLabelIndex ===
=== MaxLabelIndex ===


Determines if the source text is a label and returns its index if it is
Returns the highest allocated label index in the given label list


  '''[[FormattedLabelIndex|$R = FormattedLabelIndex($1)]]'''
  '''[[MaxLabelIndex|$R = MaxLabelIndex()]]'''
   
   
  $R = Result
  $R = Result
$1 = Source


=== FormattedWidth ===
=== MinLabelIndex ===


Returns how many characters the referenced data has when it is formatted for display
Returns the lowest allocated label index in the given label list


  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
  '''[[MinLabelIndex|$R = MinLabelIndex()]]'''
   
   
  $R = Target
  $R = Result
$1 = Width Of


=== FormatTitleIntoLabel ===
=== NextLabelIndex ===


Creates a label from the title text of the given object
The next allocated label index for the list or -1 if none


  '''[[FormatTitleIntoLabel|$R = FormatTitleIntoLabel($1)]]'''
  '''[[NextLabelIndex|$R = NextLabelIndex($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = Label Index


=== GetAppDataName ===
=== PrevLabelIndex ===


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.
The previous allocated label index for the list or -1 if none


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


=== GetCharacter ===
=== RedirectLabelList ===


Extracts a character from the formatted value provided and returns the ascii code
Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.


  '''[[GetCharacter|$R = GetCharacter($1,$2)]]'''
  '''[[RedirectLabelList|RedirectLabelList($1,$2)]]'''
   
   
$R = Target 
  $1 = From Name
  $1 = String 
  $2 = To Name
  $2 = Character


=== GetMyDocumentsName ===
=== ReIndexLabelList ===


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.
Re-indexes all members in a label list so they have ascending and continuous index values


  '''[[GetMyDocumentsName|$R = GetMyDocumentsName($1,$2)]]'''
  '''[[ReIndexLabelList|ReIndexLabelList($1)]]'''
   
   
$R = Result
  $1 = Re-index Label List
  $1 = Folder
$2 = Filename


=== GetProgramName ===
=== ReIndexLabels ===


Get the folder containing the running Planimate EXE and append a filename. Sets s.LastAccessedDataFilePath.
Remaps labels in the given list using 2 columns of matching from and to values


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


=== RemapName ===
=== RemoveSubLabel ===


Uses the model ini file remapping to remap text, typically used for filenames. Multiple components can be combined with | separating them.
Removes the sublabel as a member of the sublabel list


  '''[[RemapName|$R = RemapName($1)]]'''
  '''[[RemoveSubLabel|RemoveSubLabel($1)]]'''
   
   
$R = Result
  $1 = Label
  $1 = Source Text


=== RemoveFileExtention ===
=== SetLabelListProperty ===


Crop label to remove trailing dot and text
Sets a property of a label list


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


=== RenameLabel ===
=== TestLabelIndex ===


Change the text of a label
Tests whether an index has been used in a label list


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


=== SetFreeTextTitle ===
== Label String ==
 
=== AppendToLabel ===


Sets title of free text editor 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.


  '''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
  '''[[AppendToLabel|$R = AppendToLabel($1)]]'''
   
   
  $1 = Title Text
$R = Result
  $1 = Source


== Logical ==
=== CreateLabelAlias ===


=== BitAND ===
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.


Treat values as integers and bitwise AND them (limited to 14 bits of precision)
  '''[[CreateLabelAlias|$R = CreateLabelAlias($1,$2)]]'''
 
  '''[[BitAND|$R = BitAND($1,$2)]]'''
   
   
  $R = Result
  $R = Error Result
  $1 = Value 1
  $1 = Text
  $2 = Value 2
  $2 = Target Label


=== BitOR ===
=== CreateMD5Hash ===


Treat values as integers and bitwise OR them (limited to 14 bits of precision)
Uses the 3 text sources to create an unpredictable hash string


  '''[[BitOR|$R = BitOR($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


=== BitXOR ===
=== CropToCharacters ===


Treat values as integers and bitwise XORs them (limited to 14 bits of precision)
Crop a label to a subset of its text


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


=== Condition ===
=== ExtractIntoFormat ===


Evaluate a condition specified in a dialog
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.


  '''[[Condition|$R = Condition($F)]]'''
  '''[[ExtractIntoFormat|$R = ExtractIntoFormat($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set using
  $1 = Label
$2 = From Char
$3 = To Char


=== EQ ( == ) ===
=== FileSHA ===


Determines if 2 values are numerically close to each other
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.


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


=== GE ( >= ) ===
=== FormatIntoLabel ===


Determines if the first value is greater than or equal to the second
Create a new label with the formatted text of the source


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


=== GT ( > ) ===
=== FormatIntoLabelIndex ===


Determines if the first value is significantly greater than the second value
Creates a label from the text of source and using the provided index


  '''[[GT|$R = $1 > $2]]'''
  '''[[FormatIntoLabelIndex|$R = FormatIntoLabelIndex($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Source
  $2 = Value 2
  $2 = Index


=== LE ( <= ) ===
=== FormatNameIntoLabel ===


Determines if the first value is less than or equal to the second
Creates a label from the name of the given object


  '''[[LE|$R = $1 <= $2]]'''
  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Source
$2 = Value 2


=== LT ( < ) ===
=== FormattedLabelIndex ===


Determines if the first value is significantly less than the second value
Determines if the source text is a label and returns its index if it is


  '''[[LT|$R = $1 < $2]]'''
  '''[[FormattedLabelIndex|$R = FormattedLabelIndex($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value 1
  $1 = Source
$2 = Value 2


=== NEQ ( != ) ===
=== FormattedWidth ===


Determines if 2 values are not numerically close to each otherclose to each other
Returns how many characters the referenced data has when it is formatted for display


  '''[[NEQ|$R = $1 != $2]]'''
  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Value 1
  $1 = Width Of
$2 = Value 2


== Message ==
=== FormatTitleIntoLabel ===


=== Broadcast ===
Creates a label from the title text of the given object


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


=== BroadcastScoped ===
=== GetAppDataName ===


Sends a broadcast to a specified dynamic panel and all under it, optionally including the item's attributes
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.


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


=== BroadcastToPanel ===
=== GetCharacter ===


Sends a broadcast to a specified dynamic panel, optionally including the item's attributes
Extracts a character from the formatted value provided and returns the ascii code


  '''[[BroadcastToPanel|BroadcastToPanel($1,$2,$3)]]'''
  '''[[GetCharacter|$R = GetCharacter($1,$2)]]'''
   
   
  $1 = Broadcast Index
  $R = Target 
  $2 = With Item Info
  $1 = String
  $3 = Send To Subsystem
  $2 = Character


=== ImmediateMessage ===
=== GetMyDocumentsName ===


Send a message whilst the item waits at the change object
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.


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


=== ImmediateMessageNamed ===
=== GetProgramName ===


Send a message to a specified portal with a specific name whilst the item waits at the change object
Get the folder containing the running Planimate EXE and append a filename. Sets s.LastAccessedDataFilePath.


  '''[[ImmediateMessageNamed|ImmediateMessageNamed($1,$2)]]'''
  '''[[GetProgramName|GetProgramName($1)]]'''
   
   
  $1 = Message Target
  $1 = Filename
$2 = Message Name 


=== ReleaseWaitingItem ===
=== LogMessage ===


Used to signal a waiting dispatcher on the target panel that a given item should be released
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.


  '''[[ReleaseWaitingItem|$R = ReleaseWaitingItem($1,$2)]]'''
  '''[[LogMessage|LogMessage($1)]]'''
   
   
$R = Result
  $1 = Text
  $1 = Item Index
$2 = Scope Panel


=== ReverseItemDirection ===
=== RemapName ===


Searches spatial links for the item and if found, reverses the direction of the item
Uses the model ini file remapping to remap text, typically used for filenames. Multiple components can be combined with | separating them.


  '''[[ReverseItemDirection|$R = ReverseItemDirection($1,$2)]]'''
  '''[[RemapName|$R = RemapName($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Item Index
  $1 = Source Text
$2 = Scope Panel


== Numeric ==
=== RemoveFileExtention ===


=== abs ===
Crop label to remove trailing dot and text


Magnitude of a value, without the sign
  '''[[RemoveFileExtention|RemoveFileExtention($R)]]'''
 
  '''[[abs|$R = abs($1)]]'''
   
   
  $R = Result
  $R = Result
$1 = Value 1


=== Convolve ===
=== RenameLabel ===


Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.
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.


  '''[[Convolve|Convolve($R,$1,$2)]]'''
  '''[[RenameLabel|$R = RenameLabel($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Column 1
  $1 = Source
$2 = Column 2


=== fmod ===
=== RenameObject ===


Floating point modulus of $1 over base $2
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.


  '''[[fmod|$R = fmod($1,$2)]]'''
  '''[[RenameObject|RenameObject($1,$2)]]'''
   
   
  $R = Result
  $1 = Object
  $1 = Value 1
  $2 = New Name
  $2 = Value 2
 
=== SetFreeTextTitle ===
 
Sets title of free text editor dialog
 
'''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
  $1 = Title Text
 
== Logical ==


=== max ===
=== BitAND ===


Determines the greater of 2 values
Treat values as integers and bitwise AND them (limited to 14 bits of precision)


  '''[[max|$R = max($1,$2)]]'''
  '''[[BitAND|$R = BitAND($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 1,155: Line 1,269:
  $2 = Value 2
  $2 = Value 2


=== min ===
=== BitOR ===


Determines the lesser of 2 values
Treat values as integers and bitwise OR them (limited to 14 bits of precision)


  '''[[min|$R = min($1,$2)]]'''
  '''[[BitOR|$R = BitOR($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 1,165: Line 1,279:
  $2 = Value 2
  $2 = Value 2


=== mod ===
=== BitXOR ===


Integer modulus of $1 over base $2
Treat values as integers and bitwise XORs them (limited to 14 bits of precision)


  '''[[mod|$R = mod($1,$2)]]'''
  '''[[BitXOR|$R = BitXOR($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 1,175: Line 1,289:
  $2 = Value 2
  $2 = Value 2


=== Normalise ===
=== EQ ( == ) ===


Rescales data in column so they add up to 1
Determines if 2 values are numerically close to each other


  '''[[Normalise|Normalise($1)]]'''
  '''[[EQ|$R = $1 == $2]]'''
   
   
  $1 = Column
  $R = Result
$1 = Value 1
$2 = Value 2


=== random ===
=== GE ( >= ) ===


Random value between 0 and 1
Determines if the first value is greater than or equal to the second


  '''[[random|$R = random($F)]]'''
  '''[[GE|$R = $1 >= $2]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Value 1
$2 = Value 2


=== round ===
=== GT ( > ) ===


Integer closest to the value
Determines if the first value is significantly greater than the second value


  '''[[round|$R = round($1)]]'''
  '''[[GT|$R = $1 > $2]]'''
   
   
  $R = Result
  $R = Result
  $1 = Round Value
  $1 = Value 1
$2 = Value 2


=== RoundToN ===
=== LE ( <= ) ===


Round value to the specified number of digits of precision
Determines if the first value is less than or equal to the second


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


=== trunc ===
=== LT ( < ) ===


Integer equal or lower than the value
Determines if the first value is significantly less than the second value


  '''[[trunc|$R = trunc($1)]]'''
  '''[[LT|$R = $1 < $2]]'''
   
   
  $R = Result
  $R = Result
  $1 = Truncate
  $1 = Value 1
$2 = Value 2


== Paint ==
=== NEQ ( != ) ===


=== CopyPaintObject ===
Determines if 2 values are not numerically close to each otherclose to each other


Enables a paint object to be copied, optionally keeping it inherited from the given master
'''[[NEQ|$R = $1 != $2]]'''
$R = Result
$1 = Value 1
$2 = Value 2


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


=== CopyPaintProperties ===
=== Broadcast ===


Copies the graphical properties between paint objects
Sends a broadcast to the entire model, optionally including the item's attributes


  '''[[CopyPaintProperties|CopyPaintProperties($1,$2)]]'''
  '''[[Broadcast|Broadcast($1,$2)]]'''
   
   
  $1 = Paint Object To Update
  $1 = Broadcast Index
  $2 = Original Paint Object
  $2 = With Item Info


=== DeleteAllPaintObjects ===
=== BroadcastScoped ===


Delete all paint objects on the given panel
Sends a broadcast to a specified dynamic panel and all under it, optionally including the item's attributes


  '''[[DeleteAllPaintObjects|DeleteAllPaintObject($1)]]'''
  '''[[BroadcastScoped|BroadcastScoped($1,$2,$3)]]'''
   
   
  $1 = Target Panel
  $1 = Broadcast Index
$2 =  With Item Info
$3 = Send To Subsystem


=== DeleteInheritedPaintObjects ===
=== BroadcastToPanel ===


Removes all paint objects which inherit from a given panel
Sends a broadcast to a specified dynamic panel, optionally including the item's attributes


  '''[[DeleteInheritedPaintObjects|DeleteInheritedPaintObjects($1,$2)]]'''
  '''[[BroadcastToPanel|BroadcastToPanel($1,$2,$3)]]'''
   
   
  $1 = Target Pane   
  $1 = Broadcast Index
  $2 = Un Inherit Panel
  $2 = With Item Info
$3 = Send To Subsystem


=== DeletePaintObject ===
=== ImmediateMessage ===


Deletes a paint object
Send a message whilst the item waits at the change object


  '''[[DeletePaintObject|DeletePaintObject($1,$2)]]'''
  '''[[ImmediateMessage|ImmediateMessage($1)]]'''
   
   
  $1 = Paint Label 
  $1 = Message Target
$2 = With Inherited


=== GetPaintProperty ===
=== ImmediateMessageNamed ===


Read a property of a paint object
Send a message to a specified portal with a specific name whilst the item waits at the change object


  '''[[GetPaintProperty|$R = GetPaintProperty($1,$2)]]'''
  '''[[ImmediateMessageNamed|ImmediateMessageNamed($1,$2)]]'''
   
   
$R = Result
  $1 = Message Target
  $1 = Paint Object Label
  $2 = Message Name 
  $2 = Property Label   


=== InheritPaintObjects ===
=== ReleaseWaitingItem ===


Enables a panel to be populated with paint objects from another panel
Used to signal a waiting dispatcher on the target panel that a given item should be released


  '''[[InheritPaintObjects|InheritPaintObjects($1,$2)]]'''
  '''[[ReleaseWaitingItem|$R = ReleaseWaitingItem($1,$2)]]'''
   
   
  $1 = Target Panel     
$R = Result
  $2 = Inherit From Panel
  $1 = Item Index
  $2 = Scope Panel


=== InterpolateColor ===
=== ReverseItemDirection ===


Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)
Searches spatial links for the item and if found, reverses the direction of the item


  '''[[InterpolateColor|$R = InterpolateColor($1,$2,$3)]]'''
  '''[[ReverseItemDirection|$R = ReverseItemDirection($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Color1
  $1 = Item Index
  $2 = Color2
  $2 = Scope Panel
$3 = Ratio
 
== Numeric ==


=== LongLatToXY ===
=== abs ===


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
Magnitude of a value, without the sign


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


=== RepaintPaintObject ===
=== Convolve ===


Repaint a single paint object. Useful if the object's contents have changed but it hasn't moved or changed size.
Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.


  '''[[RepaintPaintObject|RepaintPaintObject($1)]]'''
  '''[[Convolve|Convolve($R,$1,$2)]]'''
   
   
  $1 = Paint Label 
  $R = Result
$1 = Column 1
$2 = Column 2


=== SetLongLatXY ===
=== fmod ===


Sets paint map to show the given co-ordinate as close as possible to the panel (x,y) point.
Floating point modulus of $1 over base $2


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


=== SetNoteVisible ===
=== max ===


Shows or hides an RTF note
Determines the greater of 2 values


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


=== SetPaintImage ===
=== min ===


Sets the image of a paint object
Determines the lesser of 2 values


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


=== SetPaintPosition ===
=== mod ===


Moves a paint object to a new position
Integer modulus of $1 over base $2


  '''[[SetPaintPosition|SetPaintPosition($1,$2,$3)]]'''
  '''[[mod|$R = mod($1,$2)]]'''
   
   
  $1 = Paint Object Label
  $R = Result
  $2 = X Pos (lower left)
  $1 = Value 1
  $3 = Y Pos (lower left)
  $2 = Value 2


=== SetPaintProperty ===
=== Normalise ===


Set a property of a paint object directly
Rescales data in column so they add up to 1


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


=== SetPaintText ===
=== random ===


Sets the text of a paint object
Random value between 0 and 1


  '''[[SetPaintText|SetPaintText($1,$2,$3)]]'''
  '''[[random|$R = random($F)]]'''
   
   
  $1 = Paint Object Label
  $R = Result
  $2 = Set Text/File To 
  $F = Set to
$3 = For All States   


=== SetPaintTip ===
=== round ===


Sets the tool tip text of a paint object
Integer closest to the value


  '''[[SetPaintTip|SetPaintTip($1,$2,$3)]]'''
  '''[[round|$R = round($1)]]'''
   
   
  $1 = Paint Object Label
  $R = Result
  $2 = Set Tip To 
  $1 = Round Value
$3 = For All States   


=== XYToLongLat ===
=== RoundToN ===


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
Round value to the specified number of digits of precision


  '''[[XYToLongLat|XYToLongLat($1,$2)]]'''
  '''[[RoundToN|$R = RoundToN($1,$2)]]'''
   
   
  $1 = Paint Map Label
$R = Result
  $2 = Table
  $1 = Round Value
  $2 = Sig. Digits


== Pipe ==
=== trunc ===


=== AddPipe ===
Integer equal or lower than the value


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.
'''[[trunc|$R = trunc($1)]]'''
$R = Result
$1 = Truncate


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


=== RemovePipe ===
=== BlendColors ===


Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.
Returns the resulting colour (always opaque) you would get if a black surface was painted with Color1 then Color2.


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


== Route ==
=== CopyPaintObject ===


=== AddTrack ===
Enables a paint object to be copied, optionally keeping it inherited from the given master


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.
  '''[[CopyPaintObject|$R = CopyPaintObject($1,$2,$3)]]'''
 
  '''[[AddTrack|$R = AddTrack($1,$2,$3)]]'''
   
   
  $R = New Track
  $R = New Paint Label     
  $1 = From
  $1 = Original Paint Label
  $2 = To
  $2 = Destination Panel 
  $3 = Track Type
  $3 = Inherit The Copy 


=== AssignRoute ===
=== CopyPaintProperties ===


Sets an item's track route from a route table
Copies the graphical properties between paint objects


  '''[[AssignRoute|AssignRoute($1)]]'''
  '''[[CopyPaintProperties|CopyPaintProperties($1,$2)]]'''
   
   
  $1 = Timetable Source
  $1 = Paint Object To Update
$2 = Original Paint Object


=== CancelLoopEntryDelay ===
=== DeleteAllPaintObjects ===


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.
Delete all paint objects on the given panel


  '''[[CancelLoopEntryDelay|CancelLoopEntryDelay()]]'''
  '''[[DeleteAllPaintObjects|DeleteAllPaintObject($1)]]'''
   
   
$1 = Target Panel


=== ClearRoute ===
=== DeleteInheritedPaintObjects ===


Clear an item's routing database
Removes all paint objects which inherit from a given panel


  '''[[ClearRoute|ClearRoute()]]'''
  '''[[DeleteInheritedPaintObjects|DeleteInheritedPaintObjects($1,$2)]]'''
   
   
$1 = Target Pane   
$2 = Un Inherit Panel


=== EnableTrackCheckNext ===
=== DeletePaintObject ===


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.
Deletes a paint object


  '''[[EnableTrackCheckNext|EnableTrackCheckNext()]]'''
  '''[[DeletePaintObject|DeletePaintObject($1,$2)]]'''
   
   
$1 = Paint Label 
$2 = With Inherited


=== FillRouteSteps ===
=== GetPaintProperty ===


Fills in all intermediate portals and loops in an item's track route
Read a property of a paint object


  '''[[FillRouteSteps|FillRouteSteps($1)]]'''
  '''[[GetPaintProperty|$R = GetPaintProperty($1,$2)]]'''
   
   
  $1 = Include Loops (1=yes)
$R = Result
  $1 = Paint Object Label
$2 = Property Label 


=== GenerateTrackTable ===
=== InheritPaintObjects ===


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.
Enables a panel to be populated with paint objects from another panel


  '''[[GenerateTrackTable|$R = GenerateTrackTable($1)]]'''
  '''[[InheritPaintObjects|InheritPaintObjects($1,$2)]]'''
   
   
  $R = Result
  $1 = Target Panel   
  $1 = Location
  $2 = Inherit From Panel


=== HoldSectionRoad ===
=== InterpolateColor ===


Places the road of a track section into waiting for an item state, preventing any other item using it.
Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)


  '''[[HoldSectionRoad|HoldSectionRoad($1,$2)]]'''
  '''[[InterpolateColor|$R = InterpolateColor($1,$2,$3)]]'''
   
   
  $1 = SectionID
$R = Result
  $2 = Road#
  $1 = Color1
  $2 = Color2
$3 = Ratio


=== InsertRouteStep ===
=== LongLatToXY ===


Insert a track route step into an item's internal routing database
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


  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
  '''[[LongLatToXY|LongLatToXY($1,$2)]]'''
   
   
  $1 = Route Step
  $1 = Paint Map Label
  $2 = Route Location
  $2 = Table


=== ReadRoute ===
=== MakeRangeVisible ===


Reads an item's track route into a table
Adjusts the map co-ordinates to make the range of co-ordinates visible regardless of the map view's aspect ratio


  '''[[ReadRoute|ReadRoute($R)]]'''
  '''[[MakeRangeVisible|MakeRangeVisible($1,$2,$3,$4,$5)]]'''
   
   
  $R = Timetable Target
  $1 = Paint Map Label
$2 = Long From
$3 = Lat From
$4 = Long To
$5 = Lat To


=== RegisterBlockedTrain ===
=== RepaintPaintObject ===


Register the item (train) into the track blocked list
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.


  '''[[RegisterBlockedTrain|RegisterBlockedTrain()]]'''
  '''[[RepaintPaintObject|RepaintPaintObject($1,$2)]]'''
   
   
$1 = Paint Label 
$2 = Clear Color


=== RemoveTrack ===
=== ScaleColor ===


Removes any track between portals From and To. If From is a track label then it is used and To is ignored.
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.


  '''[[RemoveTrack|RemoveTrack($1,$2)]]'''
  '''[[ScaleColor|$R = ScaleColor($1,$2,$3)]]'''
   
   
  $1 = From
$R = Result
  $2 = To
  $1 = Color
  $2 = Scale
$3 = Offset


=== ResetLoopDelayTime ===
=== SetLongLatXY ===


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.
Sets paint map to show the given co-ordinate as close as possible to the panel (x,y) point.


  '''[[ResetLoopDelayTime|ResetLoopDelayTime()]]'''
  '''[[SetLongLatXY|SetLongLatXY($1,$2,$3,$4,$5)]]'''
   
   
$1 = Paint Map Label
$2 = Longitude
$3 = Latitude
$4 = X
$5 = Y


=== RoadsInTrackSection ===
=== SetNoteVisible ===


Returns how many roads a given track section has been configured for
Shows or hides an RTF note


  '''[[RoadsInTrackSection|$R = RoadsInTrackSection($1)]]'''
  '''[[SetNoteVisible|SetNoteVisible($1,$2)]]'''
   
   
  $R = Target
  $1 = Paint Object Label
  $1 = Section
  $2 = Visibility     


=== SectionRoadAvail ===
=== SetPaintImage ===


Returns where a track section road is available for an item/train to use
Sets the image of a paint object


  '''[[SectionRoadAvail|$R = SectionRoadAvail($1,$2)]]'''
  '''[[SetPaintImage|SetPaintImage($1,$2)]]'''
   
   
$R = Result
  $1 = Paint Object Label
  $1 = SectionID
  $2 = Set Image To
  $2 = Road#


=== SetRoadCheckFilter ===
=== SetPaintPosition ===


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.
Moves a paint object to a new position


  '''[[SetRoadCheckFilter|SetRoadCheckFilter($1)]]'''
  '''[[SetPaintPosition|SetPaintPosition($1,$2,$3)]]'''
   
   
  $1 = Start Cell
  $1 = Paint Object Label
$2 = X Pos (lower left)
$3 = Y Pos (lower left)


=== TrackSectionType ===
=== SetPaintProperty ===


Returns the type of a track section (_section_types label list)
Set a property of a paint object directly


  '''[[TrackSectionType|$R = TrackSectionType($1)]]'''
  '''[[SetPaintProperty|SetPaintProperty($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = Paint Object Label
  $1 = Section
$2 = Property Label 
  $3 = Property Value 


=== UnblockTrain ===
=== SetPaintText ===


Attempt unblock of specific train id or all blocked trains if id is 0
Sets the text of a paint object


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


=== UpdateLoopEntryDelay ===
=== SetPaintTip ===


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.
Sets the tool tip text of a paint object


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


== Row/Column ==
=== SetTransparency ===


=== Average ===
Sets the transparency (alpha) value of a colour


Determines the average of values in a row or column
  '''[[SetTransparency|$R = SetTransparency($1,$2)]]'''
 
   
  '''[[Average|$R = Average($1,$2,$3)]]'''
   
  $R = Result
  $R = Result
  $1 = Average of
  $1 = Color
  $2 = From
  $2 = Transparency
$3 = To


=== MaxIndex ===
=== XYToLongLat ===


Determines the index of the highest value in a row or column
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


  '''[[MaxIndex|$R = MaxIndex($1,$2,$3)]]'''
  '''[[XYToLongLat|XYToLongLat($1,$2)]]'''
   
   
$R = Result
  $1 = Paint Map Label
  $1 = Max of
  $2 = Table
  $2 = From
 
$3 = To
== Pipe ==


=== MinIndex ===
=== AddPipe ===


Determines the index of the lowest value in a row or column
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.


  '''[[MinIndex|$R = MinIndex($1,$2,$3)]]'''
  '''[[AddPipe|$R = AddPipe($1,$2,$3)]]'''
   
   
  $R = Result
  $R = New Pipe
  $1 = Min of
  $1 = From
  $2 = From
  $2 = To
  $3 = To
  $3 = Copy Pipe


=== StdDev ===
=== RemovePipe ===


Determines the Standard Deviation of values in a row or column
Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.


  '''[[StdDev|$R = StdDev($1,$2,$3)]]'''
  '''[[RemovePipe|RemovePipe($1,$2)]]'''
   
   
$R = Result
  $1 = From
  $1 = StdDev of
  $2 = To
  $2 = From
 
$3 = To
== Route ==


=== Sum ===
=== AddStaticRoute ===


Determines the sum of values in a row or column
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.


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


=== SumSquared ===
=== AddTrack ===


Determines the sum of squares of values in a row or column
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.


  '''[[SumSquared|$R = SumSquared($1,$2,$3)]]'''
  '''[[AddTrack|$R = AddTrack($1,$2,$3)]]'''
   
   
  $R = Result
  $R = New Track
  $1 = Sum/Sqr of
  $1 = From
  $2 = From
  $2 = To
  $3 = To
  $3 = Track Type


== Scientific ==
=== AssignRoute ===


=== arccos ===
Sets an item's track route from a route table


Inverse cosine function, returns radians
  '''[[AssignRoute|AssignRoute($1)]]'''
 
  '''[[arccos|$R = arccos($1)]]'''
   
   
$R = Result
  $1 = Timetable Source
  $1 = Value


=== arcsin ===
=== AssignRouteFrom ===


Inverse sine function, returns radians
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.


  '''[[arcsin|$R = arcsin($1)]]'''
  '''[[AssignRouteFrom|$R = AssignRouteFrom($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Starting Cell
$2 = Step Count


=== arctan ===
=== CancelLoopEntryDelay ===


Inverse tan function, returns radians
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.


  '''[[arctan|$R = arctan($1)]]'''
  '''[[CancelLoopEntryDelay|CancelLoopEntryDelay()]]'''
   
   
$R = Result
$1 = Value


=== atan2 ===
=== ClearRoute ===


Determines angle (in radians) given x and y displacement
Clear an item's routing database


  '''[[atan2|$R = atan2($1,$2)]]'''
  '''[[ClearRoute|ClearRoute()]]'''
   
   
$R = Result
$1 = Numerator (Y)
$2 = Denominator (X)


=== cos ===
=== ClearTrailList ===


Cosine function, value in radians
Clears a train's history of sections it has traversed


  '''[[cos|$R = cos($1)]]'''
  '''[[ClearTrailList|ClearTrailList()]]'''
   
   
$R = Result
$1 = Value


=== DegToRad ===
=== CreateRoute ===


Converts degrees to radians
Creates a route of all steps between the two locations. Returns non zero and sets s.TrackFillRouteError on error.


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


=== exp ===
=== EnableTrackCheckNext ===


Calculates $1 to the power of E
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.


  '''[[exp|$R = exp($1)]]'''
  '''[[EnableTrackCheckNext|EnableTrackCheckNext()]]'''
   
   
$R = Result
$1 = Value


=== hypot ===
=== FillRouteSteps ===


Hypotenuse of right angled triangle with given sides
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


  '''[[hypot|$R = hypot($1,$2)]]'''
  '''[[FillRouteSteps|$R = FillRouteSteps()]]'''
   
   
  $R = Result
  $R = Result
$1 = X Value
$2 = Y Value


=== log10 ===
=== GenerateTrackTable ===


Calculates the decimal logarithm of the value
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.


  '''[[log10|$R = log10($1)]]'''
  '''[[GenerateTrackTable|$R = GenerateTrackTable($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Location


=== logN ===
=== HoldSectionRoad ===


Calculates the natural logarithm of the value
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.


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


=== pow ===
=== InsertRouteStep ===


Calculates $1 to the power of $2
Insert a track route step into an item's internal routing database


  '''[[pow|$R = pow($1,$2)]]'''
  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
   
   
$R = Result
  $1 = Route Step
  $1 = Value
  $2 = Route Location
  $2 = Power


=== RadToDeg ===
=== ListBlockedTrains ===


Converts radians to degrees
Clears table and adds a row for each blocked train. Columns are filled in this order: Item ID, Blocked Time, Blocked Location


  '''[[RadToDeg|$R = RadToDeg($1)]]'''
  '''[[ListBlockedTrains|ListBlockedTrains($1)]]'''
   
   
$R = Result
  $1 = Table
  $1 = Value


=== sin ===
=== ReadRoute ===


Sine function, value in radians
Reads an item's track route into a table


  '''[[sin|$R = sin($1)]]'''
  '''[[ReadRoute|ReadRoute($R)]]'''
   
   
  $R = Result
  $R = Timetable Target
$1 = Value


=== sqr ===
=== RegisterBlockedTrain ===


Value multiplied by itself
Register the item (train) into the track blocked list


  '''[[sqr|$R = sqr($1)]]'''
  '''[[RegisterBlockedTrain|RegisterBlockedTrain()]]'''
   
   
$R = Result
$1 = Value


=== sqrt ===
=== RemoveStaticRoute ===


Square root of value
Removes any static route with the given ID. Do not remove a static route which is being used by any items.


  '''[[sqrt|$R = sqrt($1)]]'''
  '''[[RemoveStaticRoute|RemoveStaticRoute($1)]]'''
   
   
$R = Result
  $1 = Route ID
  $1 = Value


=== tan ===
=== RemoveTrack ===


Tan function, value in radians
Removes any track between portals From and To. If From is a track label then it is used and To is ignored.


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


== Spatial Link ==
=== ResetLoopDelayTime ===


=== AddBendPoint ===
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.


Adds a bend point to a spatial link between the two objects specified
  '''[[ResetLoopDelayTime|ResetLoopDelayTime()]]'''
 
  '''[[AddBendPoint|AddBendPoint($R,$1,$2,$3)]]'''
   
   
$R = From Object
$1 = To Object
$2 = X Position
$3 = Y Position


=== AddDirectionalLink ===
=== RoadsInTrackSection ===


Adds a spatial link between objects which can only be traversed in the forward direction
Returns how many roads a given track section has been configured for


  '''[[AddDirectionalLink|$R = AddDirectionalLink($1,$2)]]'''
  '''[[RoadsInTrackSection|$R = RoadsInTrackSection($1)]]'''
   
   
  $R = Link ID
  $R = Target
  $1 = From Object
  $1 = Section
$2 = To Object


=== AddSpatialLink ===
=== SectionRoadAvail ===


Add a spatial link between the two objects labels specified
Returns where a track section road is available for an item/train to use


  '''[[AddSpatialLink|$R = AddSpatialLink($1,$2)]]'''
  '''[[SectionRoadAvail|$R = SectionRoadAvail($1,$2)]]'''
   
   
  $R = Link ID
  $R = Result
  $1 = From Object
  $1 = SectionID
  $2 = To Object
  $2 = Road#


=== ClearSpatialCache ===
=== SectionRoadTrain ===


Instructs Planimate to update spatial link information after links are created or objects are moved
Returns item ID of train in a track section road or -1 if no item


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


=== CopySpatialLink ===
=== SetRoadCheckFilter ===


Creates a spatial link between objects, copying an existing link's properties
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.


  '''[[CopySpatialLink|$R = CopySpatialLink($1,$2,$3)]]'''
  '''[[SetRoadCheckFilter|SetRoadCheckFilter($1)]]'''
   
   
$R = Link ID
  $1 = Start Cell
  $1 = From Object
$2 = To Object
$3 = Copy Link


=== DeletePanelSpatialLinks ===
=== SetRoadColor ===


Deletes all spatial links on a given panel
Sets color of road in track section


  '''[[DeletePanelSpatialLinks|DeletePanelSpatialLinks($1)]]'''
  '''[[SetRoadColor|SetRoadColor($1,$2,$3)]]'''
   
   
  $1 = Panel
  $1 = SectionID
$2 = Road#
$3 = Color   


=== GetBendPoints ===
=== TrackSectionType ===


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.
Returns the type of a track section (_section_types label list)


  '''[[GetBendPoints|GetBendPoints($1,$2,$3)]]'''
  '''[[TrackSectionType|$R = TrackSectionType($1)]]'''
   
   
  $1 = Bend Table
  $R = Target
  $2 = Panel
  $1 = Section
$3 = Link Type


=== GetNextLinkObject ===
=== UnblockTrain ===


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.
Attempt unblock of specific train id or all blocked trains if id is 0


  '''[[GetNextLinkObject|$R = GetNextLinkObject($1,$2)]]'''
  '''[[UnblockTrain|UnblockTrain($1)]]'''
   
   
$R = Location
  $1 = Item ID
  $1 = From Portal
$2 = To Portal


=== QueryLinkItems ===
=== UpdateLoopEntryDelay ===


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.
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.


  '''[[QueryLinkItems|QueryLinkItems($1,$2)]]'''
  '''[[UpdateLoopEntryDelay|UpdateLoopEntryDelay($1)]]'''
   
   
  $1 = Table
  $1 = Loop Delay
$2 = Link
 
== Row/Column ==


=== RemoveSpatialLink ===
=== Average ===


Removes any spatial links from and to the specified object labels (directional)
Determines the average of values in a row or column


  '''[[RemoveSpatialLink|RemoveSpatialLink($1,$2)]]'''
  '''[[Average|$R = Average($1,$2,$3)]]'''
   
   
  $1 = From Object
$R = Result
  $2 = To Object
  $1 = Average of
$2 = From
  $3 = To


=== SetBendPoints ===
=== MaxIndex ===


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.
Determines the index of the highest value in a row or column


  '''[[SetBendPoints|SetBendPoints($1,$2,$3)]]'''
  '''[[MaxIndex|$R = MaxIndex($1,$2,$3)]]'''
   
   
  $1 = Bend Table
$R = Result
  $2 = Panel
  $1 = Max of
  $3 = Link Type
  $2 = From
  $3 = To


=== SetItemTransitTarget ===
=== MinIndex ===


Sets the destination an item will look for once it enters a spatial link
Determines the index of the lowest value in a row or column


  '''[[SetItemTransitTarget|SetItemTransitTarget($1)]]'''
  '''[[MinIndex|$R = MinIndex($1,$2,$3)]]'''
   
   
  $1 = To Target
$R = Result
  $1 = Min of
$2 = From
$3 = To


=== SetItemTransitTime ===
=== StdDev ===


Sets the time an item will take to reach its destination once it enters a spatial link
Determines the Standard Deviation of values in a row or column


  '''[[SetItemTransitTime|SetItemTransitTime($1)]]'''
  '''[[StdDev|$R = StdDev($1,$2,$3)]]'''
   
   
  $1 = To Time
$R = Result
  $1 = StdDev of
$2 = From
$3 = To


=== SetLinkColor ===
=== Sum ===


Sets the color of a spatial link between 2 given objects
Determines the sum of values in a row or column


  '''[[SetLinkColor|SetLinkColor($1,$2,$3)]]'''
  '''[[Sum|$R = Sum($1,$2,$3)]]'''
   
   
  $1 = From Object
$R = Result
  $2 = To Object
  $1 = Sum of
  $3 = Color   
  $2 = From
  $3 = To


=== SetLinkCost ===
=== SumSquared ===


Sets the link cost of a spatial link (normally computed from the link's distance)
Determines the sum of squares of values in a row or column


  '''[[SetLinkCost|SetLinkCost($1,$2,$3)]]'''
  '''[[SumSquared|$R = SumSquared($1,$2,$3)]]'''
   
   
  $1 = From Object
$R = Result
  $2 = To Object
  $1 = Sum/Sqr of
  $3 = Cost     
  $2 = From
  $3 = To


=== SetSpatialLinkWidth ===
== Scientific ==


Sets the width of a spatial link between two objects
=== arccos ===


'''[[SetSpatialLinkWidth|SetSpatialLinkWidth($1,$2,$3)]]'''
Inverse cosine function, returns radians
$1 = From Object
$2 = To Object
$3 = Width   


=== UpdateLinkItems ===
  '''[[arccos|$R = arccos($1)]]'''
 
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|UpdateLinkItems($1,$2)]]'''
   
   
  $1 = Table
  $R = Result
  $2 = Link
  $1 = Value


== Special ==
=== arcsin ===


=== ---| Only During Move |--- ===
Inverse sine function, returns radians


Enables the modeller to specifically mark that the following routine lines do not execute during lookahead
  '''[[arcsin|$R = arcsin($1)]]'''
 
  '''[[---| Only During Move |---||----- Following Only During Move -----|]]'''
   
   
$R = Result
$1 = Value


=== BREAKPOINTIF ===
=== arctan ===


If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state
Inverse tan function, returns radians


  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
  '''[[arctan|$R = arctan($1)]]'''
   
   
  $1 = Enable Break
$R = Result
  $1 = Value


=== CallDLL ===
=== atan2 ===


Enables a Planimate compatible DLL to be called
Determines angle (in radians) given x and y displacement


  '''[[CallDLL|$R = CallDLL($F)]]'''
  '''[[atan2|$R = atan2($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Numerator (Y)
$2 = Denominator (X)


=== CallRoutine ===
=== cos ===


Calls a subroutine
Cosine function, value in radians


  '''[[CallRoutine|CallRoutine($F)]]'''
  '''[[cos|$R = cos($1)]]'''
   
   
  $F = Call
  $R = Result
$1 = Value


=== Comment (//) ===
=== DegToRad ===


A comment line
Converts degrees to radians


  '''[[Comment|Comment]]'''
  '''[[DegToRad|$R = DegToRad($1)]]'''
   
   
$R = Result
$1 = Value


=== CopyFont ===
=== exp ===


Copies the font properties between cells and columns
Calculates $1 to the power of E


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


=== CopyFormat ===
=== hypot ===


Copies the format/unit type/label reference between cells, columns and attributes
Hypotenuse of right angled triangle with given sides


  '''[[CopyFormat|CopyFormat($R,$1)]]'''
  '''[[hypot|$R = hypot($1,$2)]]'''
   
   
  $R = Format Result
  $R = Result
  $1 = Format From
  $1 = X Value
$2 = Y Value


=== CopyPortal ===
=== log10 ===


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.
Calculates the decimal logarithm of the value


  '''[[CopyPortal|$R = CopyPortal($1,$2,$3,$4,$5)]]'''
  '''[[log10|$R = log10($1)]]'''
   
   
  $R = New Portal
  $R = Result
  $1 = Original Portal
  $1 = Value
$2 = New Panel
$3 = X
$4 = Y
$5 = New Name


=== DescribeRoutineData ===
=== logN ===


Describe the data accessed by a change object routine
Calculates the natural logarithm of the value


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


=== EncodeRGB ===
=== pow ===


Encodes red, green and blue components (0..255) into a single value used to specify any color
Calculates $1 to the power of $2


  '''[[EncodeRGB|$R = EncodeRGB($1,$2,$3)]]'''
  '''[[pow|$R = pow($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Red Value
  $1 = Value
  $2 = Green Value
  $2 = Power
$3 = Blue Value


=== FormatForList ===
=== RadToDeg ===


Formats the result object to reference a label list with the given name
Converts radians to degrees


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


=== GetFormat ===
=== sin ===


Returns the value format of the data
Sine function, value in radians


  '''[[GetFormat|$R = GetFormat($1)]]'''
  '''[[sin|$R = sin($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Data To Test
  $1 = Value


=== GetFormatListName ===
=== sqr ===


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
Value multiplied by itself


  '''[[GetFormatListName|GetFormatListName($R,$1)]]'''
  '''[[sqr|$R = sqr($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Data To Test
  $1 = Value


=== ListRoutineCode ===
=== sqrt ===


Write a change object routine code to a file
Square root of value


  '''[[ListRoutineCode|ListRoutineCode($1,$2,$3)]]'''
  '''[[sqrt|$R = sqrt($1)]]'''
   
   
  $1 = Routine Panel
  $R = Result
  $2 = Object Name
  $1 = Value
$3 = Output Filename


=== LoadDataSet ===
=== tan ===


Initiates loading of a given data set from a file name specified by a label
Tan function, value in radians


  '''[[LoadDataSet|LoadDataSet($1,$2)]]'''
  '''[[tan|$R = tan($1)]]'''
   
   
  $1 = Data Set #
  $R = Result
  $2 = File Name
  $1 = Value
 
== Spatial Link ==


=== LoadDataSet2 ===
=== AddBendPoint ===


Load a version 2 dataset
Adds a bend point to a spatial link between the two objects specified


  '''[[LoadDataSet2|$R = LoadDataSet2($1,$2,$3)]]'''
  '''[[AddBendPoint|AddBendPoint($R,$1,$2,$3)]]'''
   
   
  $R = Result
  $R = From Object
  $1 = Definition Table
  $1 = To Object
  $2 = File Name
  $2 = X Position
  $3 = Pass Phrase
  $3 = Y Position


=== ObjectType ===
=== AddDirectionalLink ===


Returns the type of the object that the object label refers to
Adds a spatial link between objects which can only be traversed in the forward direction


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


=== QueryNetwork ===
=== AddLink ===


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.
Add a spatial link between the two objects labels specified


  '''[[QueryNetwork|QueryNetwork($1,$2)]]'''
  '''[[AddLink|$R = AddLink($1,$2)]]'''
   
   
  $1 = Table
$R = Link ID
  $2 = Panel
  $1 = From Object
  $2 = To Object


=== RealTimeCallBack ===
=== ClearLinkCache ===


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.
Instructs Planimate to update spatial link information after links are created or objects are moved


  '''[[RealTimeCallBack|RealTimeCallBack($1)]]'''
  '''[[ClearLinkCache|ClearLinkCache()]]'''
   
   
$1 = Interval (ms)


=== SaveDataSet ===
=== CopyLink ===


Initiates saving of a given data set to a file name specified as a label
Creates a spatial link between objects, copying an existing link's properties


  '''[[SaveDataSet|SaveDataSet($1,$2)]]'''
  '''[[CopyLink|$R = CopyLink($1,$2,$3)]]'''
   
   
  $1 = Data Set #
$R = Link ID
  $2 = File Name
  $1 = From Object
  $2 = To Object
$3 = Copy Link


=== SaveDataSet2 ===
=== DeletePanelLinks ===


Save a version 2 dataset
Deletes all spatial links on a given panel


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


=== SetDirectory ===
=== GetBendPoints ===


Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure
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.


  '''[[SetDirectory|$R = SetDirectory($1)]]'''
  '''[[GetBendPoints|GetBendPoints($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = Bend Table
  $1 = Path
$2 = Panel
  $3 = Link Type


=== SetFormat ===
=== GetNextLinkObject ===


Sets format of $1 to mode $2, with $3 being the label list name if its a label format
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.


  '''[[SetFormat|SetFormat($1,$2,$3)]]'''
  '''[[GetNextLinkObject|$R = GetNextLinkObject($1,$2)]]'''
   
   
  $1 = Data To Set
  $R = Location
  $2 = Format
  $1 = From Portal
  $3 = List Name
  $2 = To Portal


=== SetLastDataFile ===
=== QueryLinkItems ===


Sets the last data filename, optionally visible in the titlebar
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.


  '''[[SetLastDataFile|SetLastDataFile($1)]]'''
  '''[[QueryLinkItems|QueryLinkItems($1,$2)]]'''
   
   
  $1 = Name
  $1 = Table
$2 = Link


=== ShowHelp ===
=== RemoveLink ===


Open a HTML help window. Help File can be empty for default.
Removes any spatial links from and to the specified object labels (directional)


  '''[[ShowHelp|ShowHelp($1,$2)]]'''
  '''[[RemoveLink|RemoveLink($1,$2)]]'''
   
   
  $1 = Help File
  $1 = From Object
  $2 = Section
  $2 = To Object


=== StartScheduledEntries ===
=== SetBendPoints ===


Signals that scheduled entries should start (if options deferred them starting when the model was run)
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.


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


== String ==
=== SetItemTransitTarget ===


=== SetText ( $= ) ===
Sets the destination an item will look for once it enters a spatial link


Set a free text attribute or table cell to another text attribute, literal text or a the formatted text of a value
  '''[[SetItemTransitTarget|SetItemTransitTarget($1)]]'''
 
  '''[[SetText|$R $= $1]]'''
   
   
$R = Result
  $1 = To Target
  $1 = Set To


== Table ==
=== SetItemTransitTime ===


=== AdvancedSort ===
Sets the time an item will take to reach its destination once it enters a spatial link


Performs a sort on a table using another table to define the sort criteria
  '''[[SetItemTransitTime|SetItemTransitTime($1)]]'''
 
  '''[[AdvancedSort|AdvancedSort($R,$1)]]'''
   
   
$R = Target 
  $1 = To Time
  $1 = Sort Info


=== AllocateTableRowMemory ===
=== SetLinkColor ===


Enables memory to be reserved for a table which is expected to grow to a large number of rows
Sets the color of a spatial link between 2 given objects


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


=== AppendCol ===
=== SetLinkCost ===


Append a column to a table
Sets the link cost of a spatial link (normally computed from the link's distance)


  '''[[AppendCol|AppendColumn($R)]]'''
  '''[[SetLinkCost|SetLinkCost($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = From Object
$2 = To Object
$3 = Cost   


=== AppendRow ===
=== SetLinkRoads ===


Append a row to the table
Sets the number of roads and road spacing for a spatial link.


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


=== BinarySearch ===
=== SetLinkWidth ===


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.
Sets the width of a spatial link between two objects


  '''[[BinarySearch|$R = BinarySearch($F,$1,$2,$3)]]'''
  '''[[SetLinkWidth|SetLinkWidth($1,$2,$3)]]'''
   
   
$R = Result
  $1 = From Object
  $1 = First Index
  $2 = To Object
  $2 = Last Index
  $3 = Width   
  $3 = Zero On Fail
$F = Condition


=== BlockMove ===
=== UpdateLinkItems ===


Block copy a range of cells to another table
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.


  '''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
  '''[[UpdateLinkItems|UpdateLinkItems($1,$2)]]'''
   
   
$R = Result
  $1 = Table
  $1 = Source
  $2 = Link
  $2 = # of Rows
 
$3 = # of Cols
== Special ==


=== CopyToClipboard ===
=== ---| Only During Move |--- ===


Copy table to clipboard using its clipboard settings and the option modifiers
Enables the modeller to specifically mark that the following routine lines do not execute during lookahead


  '''[[CopyToClipboard|CopyToClipboard($R,$1)]]'''
  '''[[---| Only During Move |---||----- Following Only During Move -----|]]'''
   
   
$R = From Table
$1 = Options


=== CountIFMatch ===
=== Beep ===


Counts rows where Match Column matches Match Key
Plays a tone through the sound card, Frequency in Hz, Duration in milliseconds


  '''[[CountIFMatch|$R = CountIFMatch($1,$2)]]'''
  '''[[Beep|Beep($1,$2)]]'''
   
   
$R = Result
  $1 = Frequency
  $1 = Match Column
  $2 = Duration
  $2 = Match Key


=== CreateSortIndex ===
=== BREAKPOINTIF ===


Creates an ordered list of row numbers if the given column was sorted alphabetically
If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state


  '''[[CreateSortIndex|CreateSortIndex($R,$1)]]'''
  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
   
   
$R = Target Column
  $1 = Enable Break
  $1 = Column To Sort


=== DeleteCol ===
=== CallRoutine ===


Delete a range of columns from a table
Calls a subroutine


  '''[[DeleteCol|DeleteColumn($R,$1,$2)]]'''
  '''[[CallRoutine|CallRoutine($F)]]'''
   
   
  $R = Target Table
  $F = Call
$1 = First Col
$2 = Col Count


=== DeleteRow ===
=== Comment (//) ===


Delete a number of rows starting at a given row in a table
A comment line


  '''[[DeleteRow|DeleteRow($R,$1,$2)]]'''
  '''[[Comment|Comment]]'''
   
   
$R = Target Table
$1 = First Row
$2 = Row Count


=== EnableColumnEditing ===
=== CopyFont ===


Controls whether a given table column can be edited
Copies the font properties between cells and columns


  '''[[EnableColumnEditing|EnableColumnEditing($R,$1)]]'''
  '''[[CopyFont|CopyFont($R,$1)]]'''
   
   
  $R = Target Column
  $R = Format Result
  $1 = Edit Control
  $1 = Format From


=== FindColumnLabel ===
=== CopyFormat ===


Searches columns in table $1 for one with a label which matches formatted $2 and returns the index or 0 if none found
Copies the format/unit type/label reference between cells, columns and attributes


  '''[[FindColumnLabel|$R = FindColumnLabel($1,$2)]]'''
  '''[[CopyFormat|CopyFormat($R,$1)]]'''
   
   
  $R = Result
  $R = Format Result
  $1 = Table
  $1 = Format From
$2 = Find String


=== FindColumnTitle ===
=== CopyPortal ===


Searches columns in table $1 for one with a title which matches formatted $2 and returns the index or 0 if none found
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.


  '''[[FindColumnTitle|$R = FindColumnTitle($1,$2)]]'''
  '''[[CopyPortal|$R = CopyPortal($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $R = New Portal
  $1 = Table
  $1 = Original Portal
  $2 = Find String
  $2 = New Panel
$3 = X
$4 = Y
$5 = New Name


=== GetColSecondTitle ===
=== DescribeRoutineData ===


Sets the target to a label of the second title row for the given column
Describe the data accessed by a change object routine


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


=== GetColumnProperty ===
=== DragGanttBlock ===


Read a property of a table column
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).


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


=== InsertCol ===
=== EncodeARGB ===


Insert columns into a table with the option of copying formatting from another column
Encodes alpha, red, green and blue components (0..255) into a single 4 byte value used to specify any color/transparency in Planimate.


  '''[[InsertCol|InsertColumn($R,$1,$2,$3)]]'''
  '''[[EncodeARGB|$R = EncodeARGB($1,$2,$3,$4)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Insert Pos.
  $1 = Alpha Value
  $2 = Col Count
  $2 = Red Value
  $3 = Copy Format
  $3 = Green Value
$4 = Blue Value


=== InsertRow ===
=== EncodeRGB ===


Insert a number of rows at a given row in a table
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.


  '''[[InsertRow|InsertRow($R,$1,$2)]]'''
  '''[[EncodeRGB|$R = EncodeRGB($1,$2,$3)]]'''
   
   
  $R = Target Table
  $R = Result
  $1 = Insert Pos.
  $1 = Red Value
  $2 = Row Count
  $2 = Green Value
$3 = Blue Value


=== MaxIndexIFMatch ===
=== FormatForList ===


Returns first row with maximum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
Formats the result object to reference a label list with the given name


  '''[[MaxIndexIFMatch|$R = MaxIndexIFMatch($1,$2,$3)]]'''
  '''[[FormatForList|FormatForList($R,$1)]]'''
   
   
  $R = Result
  $R = Format Result
  $1 = Match Column
  $1 = List Name
$2 = Match Key
$3 = Data Column


=== MinIndexIFMatch ===
=== GetFormat ===


Returns first row with minimum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
Returns the value format of the data


  '''[[MinIndexIFMatch|$R = MinIndexIFMatch($1,$2,$3)]]'''
  '''[[GetFormat|$R = GetFormat($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Match Column
  $1 = Data To Test
$2 = Match Key
$3 = Data Column


=== OutOfScopeWrite ===
=== GetFormatListName ===


Enable writing to item table reference $1 even if it is not in scope
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


  '''[[OutOfScopeWrite|OutOfScopeWrite($1)]]'''
  '''[[GetFormatListName|GetFormatListName($R,$1)]]'''
   
   
  $1 = Item Table Ref
$R = Result
  $1 = Data To Test


=== PasteFromClipboard ===
=== ListRoutineCode ===


Paste the clipboard into the table using its clipboard options and the modifiers
Write a change object routine code to a file


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


=== PurgeDuplicateRows ===
=== LoadDataSet ===


Removes any identical rows from the given table
Initiates loading of a given data set from a file name specified by a label


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


=== ReverseSearch ===
=== LoadDataSet2 ===


Decrement the result attribute from first to last until the condition is true. If the search fails, returns ast_index – 1 or 0 if 'Zero On Fail' is true.
Load a version 2 dataset


  '''[[ReverseSearch|$R = ReverseSearch($F,$1,$2,$3)]]'''
  '''[[LoadDataSet2|$R = LoadDataSet2($1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = First Index
  $1 = Definition Table
  $2 = Last Index
  $2 = File Name
  $3 = Zero On Fail
  $3 = Pass Phrase
  $F = Condition
 
=== LoadModel ===
 
Stops current run and loads another model. For PBA, the PBA is reloaded regardless of name.
 
'''[[LoadModel|LoadModel($1)]]'''
  $1 = Model Name


=== Search ===
=== ObjectType ===


Increment the result attribute from first to last until the condition is true. If the search fails, returns 1 + last_index or 0 if 'Zero On Fail' is true.
Returns the type of the object that the object label refers to


  '''[[Search|$R = Search($F,$1,$2,$3)]]'''
  '''[[ObjectType|$R = ObjectType($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = First Index
  $1 = Object
$2 = Last Index
$3 = Zero On Fail
$F = Condition


=== SetCellFreeText ===
=== QueryNetwork ===


Sets the free text (not bound by label text rules) for a table cell
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.


  '''[[SetCellFreeText|SetCellFreeText($R,$1)]]'''
  '''[[QueryNetwork|QueryNetwork($1,$2)]]'''
   
   
  $R = Target Cell
  $1 = Table
  $1 = Source Cell
  $2 = Panel


=== SetColAlignment ===
=== RealTimeCallBack ===


Enables a column's text alignment to be changed
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.


  '''[[SetColAlignment|SetColumnAlignment($R,$1)]]'''
  '''[[RealTimeCallBack|RealTimeCallBack($1)]]'''
   
   
$R = Target Column
  $1 = Interval (ms)
  $1 = Align Mode 


=== SetColSecondTitle ===
=== RemovePortal ===


Sets the text of the second title row for the given column
Deletes the portal and its contents from the model


  '''[[SetColSecondTitle|SetColumnSecondTitle($R,$1)]]'''
  '''[[RemovePortal|RemovePortal($1)]]'''
   
   
$R = Target Column
  $1 = Portal ID
  $1 = Title Text


=== SetColTitle ===
=== SaveDataSet ===


Set the title text of a table column
Initiates saving of a given data set to a file name specified as a label


  '''[[SetColTitle|SetColumnTitle($R,$1)]]'''
  '''[[SaveDataSet|SaveDataSet($1,$2)]]'''
   
   
  $R = Target Column
  $1 = Data Set #
  $1 = Title Text
  $2 = File Name


=== SetColTupleName ===
=== SaveDataSet2 ===


Sets the name used to internally identify a column
Save a version 2 dataset


  '''[[SetColTupleName|SetColumnTupleName($R,$1)]]'''
  '''[[SaveDataSet2|$R = SaveDataSet2($1,$2,$3)]]'''
   
   
  $R = Target Column
  $R = Result
  $1 = Tuple Text
  $1 = Definition Table
$2 = File Name
$3 = Pass Phrase


=== SetColumnProperty ===
=== SetDirectory ===


Set a property of a table column
Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure


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


=== SetColumnTip ===
=== SetFormat ===


Sets the tool tip of a table column
Sets format of $1 to mode $2, with $3 being the label list name if its a label format


  '''[[SetColumnTip|SetColumnTip($R,$1)]]'''
  '''[[SetFormat|SetFormat($1,$2,$3)]]'''
   
   
  $R = Column
  $1 = Data To Set
  $1 = Tip Text
$2 = Format
  $3 = List Name


=== SetColWidth ===
=== SetLastDatasetFile ===


Sets the formatting width of a table column
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.


  '''[[SetColWidth|SetColWidth($R,$1)]]'''
  '''[[SetLastDatasetFile|SetLastDatasetFile($1)]]'''
   
   
$R = Target Column
  $1 = Name
  $1 = Column Width


=== SetTableRowHeight ===
=== ShowHelp ===


Sets the height of table rows
Open a HTML help window. Help File can be empty for default.


  '''[[SetTableRowHeight|SetTableRowHeight($1,$2)]]'''
  '''[[ShowHelp|ShowHelp($1,$2)]]'''
   
   
  $1 = Target Table
  $1 = Help File
  $2 = Row Height
  $2 = Section


=== SetTableTitle ===
=== StartScheduledEntries ===


Set the title text of the table from the label
Signals that scheduled entries should start (if options deferred them starting when the model was run)


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


=== ShiftCol ===
=== WatchListAdd ===


Shift the columns in a table
Add portal, routine or item attribute to watch list for debugging


  '''[[ShiftCol|ShiftColumn($R,$1,$2)]]'''
  '''[[WatchListAdd|WatchListAdd($1)]]'''
   
   
$R = Result
  $1 = Attribute
  $1 = Source
$2 = Shift <+ ->


=== ShiftRow ===
=== WatchListRemove ===


Shift the rows in a table
Remove portal, routine or item attribute from watch list


  '''[[ShiftRow|ShiftRow($R,$1,$2)]]'''
  '''[[WatchListRemove|WatchListRemove($1)]]'''
   
   
  $R = Result
  $1 = Attribute
$1 = Source
 
$2 = Shift ^+ -v
== String ==


=== Sort ===
=== GetNoteRTF ===


Sort table by up to 3 columns
Retrieves RTF text of note


  '''[[Sort|Sort($R,$1,$2,$3)]]'''
  '''[[GetNoteRTF|$R = GetNoteRTF($1)]]'''
   
   
  $R = Target
  $R = String
  $1 = Primary Col.
  $1 = Paint ID
$2 = Second Col.
$3 = Third Col.


=== SumIFMatch ===
=== GetNoteText ===


Sums values in Data Column for rows where Match Column matches Match Key
Retrieves plain text of note


  '''[[SumIFMatch|$R = SumIFMatch($1,$2,$3)]]'''
  '''[[GetNoteText|$R = GetNoteText($1)]]'''
   
   
  $R = Result
  $R = String
  $1 = Match Column
  $1 = Paint ID
$2 = Match Key
$3 = Data Column


=== TableReferenceSet ===
=== SetNoteRTF ===


Returns non zero if the reference resolves to a table
Sets RTF text of note


  '''[[TableReferenceSet|$R = TableReferenceSet($1)]]'''
  '''[[SetNoteRTF|SetNoteRTF($1,$2)]]'''
   
   
  $R = Result
  $1 = Paint ID
  $1 = Item Table Ref
  $2 = Text


=== TableSortDialog ===
=== SetNoteText ===


Enables the user to set up and perform a sort using the table sort dialog
Sets plain text of note


  '''[[TableSortDialog|TableSortDialog($R)]]'''
  '''[[SetNoteText|SetNoteText($1,$2)]]'''
   
   
  $R = Target
  $1 = Paint ID
$2 = Text


== Table View ==
=== SetText ( $= ) ===


=== ClearFilter ===
Set a free text attribute or table cell to another text attribute, literal text or a the formatted text of a value


Clear filter settings for a table view
'''[[SetText|$R $= $1]]'''
$R = Result
$1 = Set To


'''[[ClearFilter|ClearFilter($1,$2)]]'''
== Table ==
$1 = Table
$2 = Panel


=== CopyAllFromView ===
=== AddTable ===


Copies the entire contents of a table view. Any current selection is ignored and left intact.
Adds table to panel, returning data object label. If a table with that name already exists, 0 is returned.


  '''[[CopyAllFromView|CopyAllFromView($1,$2)]]'''
  '''[[AddTable|$R = AddTable($1,$2)]]'''
   
   
  $1 = Table
$R = Result
  $2 = Panel
  $1 = Panel
  $2 = Name


=== CopyFromView ===
=== AdvancedSort ===


Copies the current cell or selection from a specified table view just as if CTRL-C was pressed
Performs a sort on a table using another table to define the sort criteria


  '''[[CopyFromView|CopyFromView($1,$2)]]'''
  '''[[AdvancedSort|AdvancedSort($R,$1)]]'''
   
   
  $1 = Table
  $R = Target 
  $2 = Panel
  $1 = Sort Info


=== GetColumnFilter ===
=== AllocateTableRowMemory ===


Gets any active column filter for a table view
Enables memory to be reserved for a table which is expected to grow to a large number of rows


  '''[[GetColumnFilter|$R = GetColumnFilter($1,$2)]]'''
  '''[[AllocateTableRowMemory|AllocateTableRowMemory($R,$1)]]'''
   
   
  $R = Text/Label
  $R = Target Table
  $1 = Column
  $1 = Allocate Rows
$2 = Panel


=== GetFilteredRows ===
=== AppendColumn ===


Retrieves the filter mapping of view rows to actual rows into the list table
Append a column to a table


  '''[[GetFilteredRows|GetFilteredRows($1,$2,$3)]]'''
  '''[[AppendColumn|AppendColumn($R,$1)]]'''
   
   
  $1 = Filter List
  $R = Target
  $2 = Table
  $1 = Col Couint
$3 = Panel


=== GetTableView ===
=== AppendRow ===


Read columns of a table view into another table
Append a row to the table


  '''[[GetTableView|GetTableView($1,$2,$3)]]'''
  '''[[AppendRow|AppendRow($R,$1)]]'''
   
   
  $1 = View Table
  $R = Target
  $2 = View Panel
  $1 = Row Count
$3 = Config Table


=== GetViewProperty ===
=== BinarySearch ===


Retrieves a property of a view of a table on a given panel
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.


  '''[[GetViewProperty|$R = GetViewProperty($1,$2,$3,$4)]]'''
  '''[[BinarySearch|$R = BinarySearch($F,$1,$2,$3)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Table
  $1 = First Index
  $2 = Panel
  $2 = Last Index
  $3 = Property
  $3 = Zero On Fail
  $4 = View Type
  $F = Condition


=== PasteIntoView ===
=== BlockMove ===


Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success
Block copy a range of cells to another table


  '''[[PasteIntoView|$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)]]'''
  '''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
   
   
  $R = Error Result
$R = Result
  $1 = Table
$1 = Source
  $2 = Panel
$2 = # of Rows
  $3 = TL Row
$3 = # of Cols
  $4 = TL Col
 
  $5 = Options
=== CompareTables ===
  $6 = Rows Read
 
  $7 = Cols Read
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
 
=== 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
 
=== 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 
 
=== 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
 
=== PurgeDuplicateRows ===
 
Removes any identical rows from the given table
 
'''[[PurgeDuplicateRows|PurgeDuplicateRows($R)]]'''
$R = Target
 
=== ReverseSearch ===
 
Decrement the result attribute from first to last until the condition is true. If the search fails, returns ast_index – 1 or 0 if 'Zero On Fail' is true.
 
'''[[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 'Zero On Fail' is true.
 
'''[[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 3 columns
 
'''[[Sort|Sort($R,$1,$2,$3)]]'''
$R = Target
$1 = Primary Col.
$2 = Second Col.
$3 = Third Col.
 
=== 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)]]'''
$1 = Table
$2 = Panel
 
=== 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


=== ReFilterTableView ===
=== SetViewProperty ===


Reapply any active filters to the current data in the table
Sets a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.


  '''[[ReFilterTableView|ReFilterTableView($1,$2)]]'''
  '''[[SetViewProperty|SetViewProperty($1,$2,$3,$4,$5,$6)]]'''
   
   
  $1 = Table
  $1 = Table
  $2 = Panel
  $2 = Panel
$3 = Property
$4 = Value
$5 = View Type
$6 = Index


=== SetColumnFilter ===
=== TableViewColScroll ===


Sets a column filter text for a table view. The filter needs to be reapplied once all the columns have been set.
Reads the column scroll of a view for a table on a given panel


  '''[[SetColumnFilter|SetColumnFilter($R,$1,$2)]]'''
  '''[[TableViewColScroll|$R = TableViewColScroll($1,$2)]]'''
   
   
  $R = Column
  $R = Target
  $1 = Text
  $1 = Table
  $2 = Panel
  $2 = Panel


=== SetTableView ===
=== TableViewRows ===


Set columns that a table view will display
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


  '''[[SetTableView|SetTableView($1,$2,$3)]]'''
  '''[[TableViewRows|$R = TableViewRows($1,$2)]]'''
   
   
  $1 = View Table
$R = Target
  $2 = View Panel
  $1 = Table
$3 = Config Table
  $2 = Panel


=== SetTableViewColScroll ===
=== TableViewRowScroll ===


Sets the column scroll of a view for a table on a given panel
Reads the row scroll of a view for a table on a given panel


  '''[[SetTableViewColScroll|SetTableViewColScroll($1,$2,$3)]]'''
  '''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
   
   
$R = Target
  $1 = Table
  $1 = Table
  $2 = Panel
  $2 = Panel
$3 = Value


=== SetTableViewRowScroll ===
=== TableViewVisibleCols ===


Sets the row scroll of a view for a table on a given panel
Reads the number of visible columns in a table view


  '''[[SetTableViewRowScroll|SetTableViewRowScroll($1,$2,$3)]]'''
  '''[[TableViewVisibleCols|$R = TableViewVisibleCols($1,$2)]]'''
   
   
$R = Target
  $1 = Table
  $1 = Table
  $2 = Panel
  $2 = Panel
$3 = Value


=== SetViewFilterRows ===
=== TableViewVisibleRows ===


Sets the rows that a table view on a panel will display. Filter List is a column of row numbers.
Reads the number of visible rows in a table view


  '''[[SetViewFilterRows|SetViewFilterRows(($1,$2,$3)]]'''
  '''[[TableViewVisibleRows|$R = TableViewVisibleRows($1,$2)]]'''
   
   
  $1 = Filter List
  $R = Target
  $2 = Table
  $1 = Table
  $3 = Panel
  $2 = Panel
 
== Time ==


=== SetViewProperty ===
=== AdvanceToTimeDialog ===


Sets a property of a view of a table on a given panel
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.


  '''[[SetViewProperty|SetViewProperty($1,$2,$3,$4,$5)]]'''
  '''[[AdvanceToTimeDialog|AdvanceToTimeDialog($1,$2)]]'''
   
   
  $1 = Table
  $1 = Absolute
  $2 = Panel
  $2 = Time
$3 = Property
$4 = Value
$5 = View Type


=== TableViewColScroll ===
=== DayOfMonth ===


Reads the column scroll of a view for a table on a given panel
Returns the day of the month, starting at 1


  '''[[TableViewColScroll|$R = TableViewColScroll($1,$2)]]'''
  '''[[DayOfMonth|$R = DayOfMonth($1)]]'''
   
   
  $R = Target
  $R = Result
  $1 = Table
  $1 = Time
$2 = Panel


=== TableViewRows ===
=== DayOfWeek ===


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
Returns the day of the week, starting at 1 for Sunday


  '''[[TableViewRows|$R = TableViewRows($1,$2)]]'''
  '''[[DayOfWeek|$R = DayOfWeek($1)]]'''
   
   
  $R = Target
  $R = Result
  $1 = Table
  $1 = Time
$2 = Panel


=== TableViewRowScroll ===
=== DaysInDateMonth ===


Reads the row scroll of a view for a table on a given panel
Returns how many days in the month of the absolute time


  '''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
  '''[[DaysInDateMonth|$R = DaysInDateMonth($1)]]'''
   
   
  $R = Target
  $R = Result
  $1 = Table
  $1 = Time
$2 = Panel


=== TableViewVisibleCols ===
=== FormDate ===


Reads the number of visible columns in a table view
Computes the absolute time representing midnight on the given date


'''[[TableViewVisibleCols|$R = TableViewVisibleCols($1,$2)]]'''
  '''[[FormDate|$R = FormDate($1,$2,$3)]]'''
$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 ==
 
=== 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
  $R = Result
Line 2,896: Line 3,567:
=== TimeOfDay ===
=== TimeOfDay ===


Returns the number of seconds into the current day of the time  
Returns the number of seconds into the current day of the time


  '''[[TimeOfDay|$R = TimeOfDay($1)]]'''
  '''[[TimeOfDay|$R = TimeOfDay($1)]]'''
Line 3,102: Line 3,773:
   
   
  $1 = Target Panel
  $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 ===
=== SetMenuBar ===

Revision as of 16:21, 31 May 2016

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.

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 with row range, To Row = 0 uses row count

$R = RemapValue($1,$2,$3,$4,$5)

$R = Result
$1 = Map Table
$2 = Value
$3 = Map Column
$4 = From Row
$5 = To Row

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

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

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.

SetViewportTarget($1,$2,$3)

$1 = Panel With Viewport 
$2 = Current Panel Inside Viewport
$3 = New Panel Inside Viewport

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

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 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.

$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 My Documents path/file including a subfolder and a filename. Sets s.LastAccessedDataFilePath and 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. Sets s.LastAccessedDataFilePath.

GetProgramName($1)

$1 = 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, optionally including the item's attributes

Broadcast($1,$2)

$1 = Broadcast Index
$2 =  With Item Info

BroadcastScoped

Sends a broadcast to a specified dynamic panel and all under it, optionally including the item's attributes

BroadcastScoped($1,$2,$3)

$1 = Broadcast Index
$2 =  With Item Info
$3 = Send To Subsystem

BroadcastToPanel

Sends a broadcast to a specified dynamic panel, optionally including the item's attributes

BroadcastToPanel($1,$2,$3)

$1 = Broadcast Index
$2 =  With Item Info
$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, optionally keeping it inherited from the given master

$R = CopyPaintObject($1,$2,$3)

$R = New Paint Label      
$1 = Original Paint Label
$2 = Destination Panel  
$3 = Inherit The Copy   

CopyPaintProperties

Copies the graphical properties between paint objects

CopyPaintProperties($1,$2)

$1 = Paint Object To Update
$2 = Original Paint Object

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

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

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

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)

$1 = Paint Object Label
$2 = Set Image To

SetPaintPosition

Moves a paint object to a new position

SetPaintPosition($1,$2,$3)

$1 = Paint Object Label
$2 = X Pos (lower left)
$3 = Y Pos (lower left)

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   

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

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#

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

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

SetItemTransitTarget

Sets the destination an item will look for once it enters a spatial link

SetItemTransitTarget($1)

$1 = To Target

SetItemTransitTime

Sets the time an item will take to reach its destination once it enters a spatial link

SetItemTransitTime($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

CallRoutine

Calls a subroutine

CallRoutine($F)

$F = Call

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

FormatForList

Formats the result object to reference a label list with the given name

FormatForList($R,$1)

$R = Format Result
$1 = List Name

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

ListRoutineCode

Write a change object routine code to a file

ListRoutineCode($1,$2,$3)

$1 = Routine Panel
$2 = Object Name
$3 = Output Filename

LoadDataSet

Initiates loading of a given data set from a file name specified by a label

LoadDataSet($1,$2)

$1 = Data Set #
$2 = File Name

LoadDataSet2

Load a version 2 dataset

$R = LoadDataSet2($1,$2,$3)

$R = Result
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase

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

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)

$1 = Interval (ms)

RemovePortal

Deletes the portal and its contents from the model

RemovePortal($1)

$1 = Portal ID

SaveDataSet

Initiates saving of a given data set to a file name specified as a label

SaveDataSet($1,$2)

$1 = Data Set #
$2 = File Name

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

StartScheduledEntries

Signals that scheduled entries should start (if options deferred them starting when the model was run)

StartScheduledEntries

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

AdvancedSort($R,$1)

$R = Target  
$1 = Sort Info

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 Couint

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

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

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

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   

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

PurgeDuplicateRows

Removes any identical rows from the given table

PurgeDuplicateRows($R)

$R = Target

ReverseSearch

Decrement the result attribute from first to last until the condition is true. If the search fails, returns ast_index – 1 or 0 if 'Zero On Fail' is true.

$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 'Zero On Fail' is true.

$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 3 columns

Sort($R,$1,$2,$3)

$R = Target
$1 = Primary Col.
$2 = Second Col.
$3 = Third Col.

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)

$1 = Table
$2 = Panel

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

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

ClearCustomMenubar

Removes all menu items from the modeller custom menu bar

ClearCustomMenubar

Dialog

Show a dialog box for the user to interact with

$R = Dialog($F)

$R = Result
$F = Dialog

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