Routine Operations: Difference between revisions

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


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


Please do not edit it.
'' __NOEDITSECTION__ __TOC__
== 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 34:
  $1 = Decr. by
  $1 = Decr. by


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


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


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


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


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


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


=== Scale ( *= ) ===
=== Scale ( *= ) ===
Line 90: Line 106:
  $1 = Set To
  $1 = Set To


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


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


  '''[[Sub|$R = $1 - $2]]'''
  '''[[Sub|$R = Sub($1,$2)]]'''
   
   
  $R = Result
  $R = Result
Line 116: Line 132:
   
   
  $F = CASE
  $F = CASE
=== CONTINUE ===
Immediately processes the next iteration in a loop/while, skipping the rest of the code
'''[[CONTINUE|CONTINUE]]'''


=== DEFAULT ===
=== DEFAULT ===
Line 171: Line 194:
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 181: Line 204:
Iterate Row Index over all the rows in the table
Iterate Row Index over all the rows in the table


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


=== REVERSEITERATE ===
=== REVERSEITERATE ===
Line 190: Line 220:
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 220: Line 250:
   
   
  $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 264: Line 303:
   
   
  $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 355: Line 404:
   
   
  $R = Result
  $R = Result
  $1 = Panel  
  $1 = Panel


=== PanelWindowTop ===
=== PanelWindowTop ===
Line 364: Line 413:
   
   
  $R = Result
  $R = Result
  $1 = Panel  
  $1 = Panel


=== PrintPanel ===
=== PrintPanel ===
Line 374: Line 423:
  $1 = Target Subsystem
  $1 = Target Subsystem


=== RepaintObjects ===
=== ReFitPopup ===


Forces a repaint of dynamic objects only; faster than a full force repaint
Resize an already open popup to panel's changed size


  '''[[RepaintObjects|RepaintObjects]]'''
  '''[[ReFitPopup|ReFitPopup($1)]]'''
   
   
$1 = Panel


=== SetActivityString ===
=== RepaintObjects ===


Sets text in the status bar activity area
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.


  '''[[SetActivityString|SetActivityString($1)]]'''
  '''[[RepaintObjects|RepaintObjects($1,$2)]]'''
   
   
  $1 = Activity Text
  $1 = Panel
$2 = SpeedRegulate


=== SetColorPaletteEntry ===
=== RepaintView ===


Sets the RGB color for a given color in the Planimate color palette
Repaints contents of a view
 
'''[[RepaintView|RepaintView($1,$2,$3,$4)]]'''
$1 = Table
$2 = Panel
$3 = View Type
$4 = Index
 
=== SetActivityString ===
 
Sets text in the status bar activity area
 
'''[[SetActivityString|SetActivityString($1)]]'''
$1 = Activity Text
 
=== SetColorPaletteEntry ===
 
Sets the RGB color for a given color in the Planimate color palette


  '''[[SetColorPaletteEntry|SetColorPaletteEntry($1,$2)]]'''
  '''[[SetColorPaletteEntry|SetColorPaletteEntry($1,$2)]]'''
Line 417: Line 487:
  $2 = Panel
  $2 = Panel
  $3 = Value
  $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|SetIconRemote($1,$2,$3)]]'''
$1 = Item ID
$2 = Location
$3 = Icon Name
=== SetObjectPos ===
Sets the position and scaling of a dynamic object in one operation. The position is the centre of the object and the scaling is a percentage which should normally be 100 for no scaling.
'''[[SetObjectPos|SetObjectPos($1,$2,$3,$4,$5)]]'''
$1 = Object
$2 = X Pos
$3 = Y Pos
$4 = X Scale
$5 = Y Scale


=== SetPanelColor ===
=== SetPanelColor ===
Line 424: Line 516:
  '''[[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


  '''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
  '''[[SetPanelProperty|SetPanelProperty($1,$2,$3)]]'''
   
   
  $1 = Panel  
  $1 = Panel
  $2 = Transparency
  $2 = Property Label
$3 = Value


=== SetStatusItemAreaString ===
=== SetPanelSize ===


Sets the text in the status bar area where item class names are displayed during editing
Sets the panel area size. Useful when the panel is not configured to automatically size.
 
'''[[SetPanelSize|SetPanelSize($1,$2,$3)]]'''
$1 = Panel
$2 = Width
$3 = Height
 
=== SetPanelTransparency ===
 
Enables the use of transparency for a panel, value 0..254 or 255 to disable transparency
 
'''[[SetPanelTransparency|SetPanelTransparency($1,$2)]]'''
$1 = Panel
$2 = Transparency
 
=== SetPortalIcon ===
 
Sets icon for portal's current state.
 
'''[[SetPortalIcon|SetPortalIcon($1,$2)]]'''
$1 = Portal ID
$2 = Icon Name
 
=== SetPortalTip ===
 
Sets tip text for Portal to Text
 
'''[[SetPortalTip|SetPortalTip($1,$2)]]'''
$1 = Portal ID
$2 = Text
 
=== SetStatusItemAreaString ===
 
Sets the text in the status bar area where item class names are displayed during editing


  '''[[SetStatusItemAreaString|SetStatusItemAreaString($1)]]'''
  '''[[SetStatusItemAreaString|SetStatusItemAreaString($1)]]'''
Line 457: Line 587:
=== SetViewportTarget ===
=== SetViewportTarget ===


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


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


=== SetViewportZoom ===
=== SetViewportZoom ===
Line 474: Line 604:
  $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 499: Line 644:
  '''[[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


=== CreateSubsystemObjectLabel ===
=== ExtractPathName ===
'''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
$R = New Object Label


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


Deletes the given label from its labellist
  '''[[ExtractPathName|$R = ExtractPathName($1)]]'''
 
  '''[[DeleteLabel|DeleteLabel($1)]]'''
   
   
  $1 = Label
$R = Result 
  $1 = Path/File


=== LabelCount ===
=== FileColumns ===


Returns how many labels in the given label list
Number of columns in file or -1. Supports TAB or comma delimited data.


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


=== MaxLabelIndex ===
=== FileLines ===


Returns the highest allocated label index in the given label list
Number of lines in file or -1


  '''[[MaxLabelIndex|$R = MaxLabelIndex()]]'''
  '''[[FileLines|$R = FileLines($1)]]'''
   
   
  $R = Result
  $R = Result
$1 = File


=== MinLabelIndex ===
=== FilesInFolder ===


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


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


=== NextLabelIndex ===
=== FilesInHierarchy ===


The next allocated label index for the list or -1 if none
Retrieves the files in all folders starting at Path/File, placing the path names into the target label list.


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


=== PrevLabelIndex ===
=== FileSize ===


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


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


=== ReIndexLabelList ===
=== FolderExists ===


Re-indexes all members in a label list so they have ascending and continuous index values
Returns non zero if the specified directory folder exists.


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


=== ReIndexLabels ===
=== PlaySound ===


Remaps labels in the given list using 2 columns of matching from and to values
Play windows sound file. Will extract WAV files from DB if required.


  '''[[ReIndexLabels|ReIndexLabels($1,$2,$3)]]'''
  '''[[PlaySound|PlaySound($1,$2)]]'''
   
   
  $1 = Re-index List   
  $1 = Sound File
  $2 = From Values (Col)
  $2 = Wait Finish
$3 = To Values (Col) 


=== RemoveSubLabel ===
=== ReadFromFile ===


Removes the sublabel as a member of the sublabel list
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.


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


=== TestLabelIndex ===
=== ReadViewFromFile ===


Tests whether an index has been used in a label list
Reads file, following format of table view. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.


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


== Label String ==
=== ReleaseFileLock ===


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


Append text to an existing label
  '''[[ReleaseFileLock|$R = ReleaseFileLock($1)]]'''
 
  '''[[AppendToLabel|AppendToLabel($R,$1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = File


=== CreatePasswordHash ===
=== RenameFile ===


Uses the 3 text sources to create an unpredictable hash string
Renames file


  '''[[CreatePasswordHash|$R = CreatePasswordHash($1,$2,$3)]]'''
  '''[[RenameFile|$R = RenameFile($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Text-1
  $1 = From
  $2 = Text-2
  $2 = To
$3 = Text-3


=== CropToCharacters ===
=== RunCommand ===


Crop a label to a subset of its text
Runs a new process or opens a file via the shell


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


=== ExtractFileExtention ===
=== SaveImage ===


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


  '''[[ExtractFileExtention|ExtractFileExtention($R,$1)]]'''
  '''[[SaveImage|$R = SaveImage($1,$2,$3)]]'''
   
   
  $R = Result  
  $R = Result
  $1 = Path/File
  $1 = File
$2 = Panel
$3 = In-Memory


=== ExtractFileName ===
=== WriteToFile ===


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


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


=== ExtractIntoFormat ===
=== WriteViewToFile ===


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


  '''[[ExtractIntoFormat|$R = ExtractIntoFormat($1,$2,$3)]]'''
  '''[[WriteViewToFile|$R = WriteViewToFile($1,$2,$3,$4,$5)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Label
  $1 = File
  $2 = From Char
  $2 = Table
  $3 = To Char
  $3 = Panel
$4 = View Index
$5 = Options
 
== Label ==


=== ExtractPathName ===
=== AddLabelDialog ===


Create a label in the target label list which is the file name from a full path/file text
Show a dialog so the user can add a label to the given label list


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


=== FilesInFolder ===
=== AddSubLabel ===


Returns how many files matching a wildcard in the given folder
Makes the new sublabel for the parent label $1 (if it doesn't exist) and returns its index as a sublabel


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


=== FilesInHierarchy ===
=== ClearLabelList ===


Retrieve how many files in a file folder (including subfolders)
Removes all labels from a label list


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


=== FormatIntoLabel ===
=== CreateLabelList ===


Create a new label with the formatted text of the source
Creates a label list with the given name and formats the result attribute to reference it


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


=== FormatIntoLabelIndex ===
=== CreateLabelListFromColumn ===


Creates a label from the text of source and using the provided index
Uses the provided column to provide text for creating a new label list


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


=== FormatNameIntoLabel ===
=== CreatePanelPortalLabel ===


Creates a label from the name of the given object
Creates a panel label for the subsystem of the given portal object label


  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
  '''[[CreatePanelPortalLabel|$R = CreatePanelPortalLabel($1)]]'''
   
   
  $R = Result
  $R = New Panel Label   
  $1 = Source
  $1 = Portal Object Label


=== FormattedLabelIndex ===
=== CreateSubLabelList ===


Determines if the source text is a label and returns its index if it is
Creates an empty sub label list of an existing label list and formats an attribute to reference it


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


=== FormattedWidth ===
=== CreateSubsystemObjectLabel ===


Returns how many characters the referenced data has when it is formatted for display
Creates an object label for the portal owning the panel of this routine


  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
  '''[[CreateSubsystemObjectLabel|$R = CreateSubsystemObjectLabel()]]'''
   
   
  $R = Target
  $R = New Object Label
$1 = Width Of


=== FormatTitleIntoLabel ===
=== DeleteLabel ===


Creates a label from the title text of the given object
Deletes the given label from its labellist


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


=== GetAppDataName ===
=== GetLabelListProperty ===


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


  '''[[GetAppDataName|$R = GetAppDataName($1,$2)]]'''
  '''[[GetLabelListProperty|$R = GetLabelListProperty($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Folder
  $1 = LabelList
  $2 = Filename
  $2 = Property


=== GetCharacter ===
=== LabelCount ===


Extracts a character from the formatted value provided and returns the ascii code
Returns how many labels in the given label list


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


=== GetMyDocumentsName ===
=== MaxLabelIndex ===


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


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


=== GetProgramName ===
=== MinLabelIndex ===


Get the folder containing the running Planimate EXE and append a filename. Sets s.LastAccessedDataFilePath.
Returns the lowest allocated label index in the given label list


  '''[[GetProgramName|GetProgramName($1)]]'''
  '''[[MinLabelIndex|$R = MinLabelIndex()]]'''
   
   
  $1 = Filename
  $R = Result


=== RemoveFileExtention ===
=== NextLabelIndex ===


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


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


=== RenameLabel ===
=== PrevLabelIndex ===


Change the text of a label
The previous allocated label index for the list or -1 if none


  '''[[RenameLabel|RenameLabel($R,$1)]]'''
  '''[[PrevLabelIndex|$R = PrevLabelIndex($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Source
  $1 = Label Index


=== SetFreeTextTitle ===
=== RedirectLabelList ===


Sets title of free text editor dialog
Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.


  '''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
  '''[[RedirectLabelList|RedirectLabelList($1,$2)]]'''
   
   
  $1 = Title Text
  $1 = From Name
$2 = To Name


== Logical ==
=== ReIndexLabelList ===


=== BitAND ===
Re-indexes all members in a label list so they have ascending and continuous index values


Treat values as integers and bitwise AND them (limited to 14 bits of precision)
  '''[[ReIndexLabelList|ReIndexLabelList($1)]]'''
 
  '''[[BitAND|$R = BitAND($1,$2)]]'''
   
   
  $R = Result
  $1 = Re-index Label List
$1 = Value 1
$2 = Value 2


=== BitOR ===
=== ReIndexLabels ===


Treat values as integers and bitwise OR them (limited to 14 bits of precision)
Remaps labels in the given list using 2 columns of matching from and to values


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


=== BitXOR ===
=== RemoveSubLabel ===


Treat values as integers and bitwise XORs them (limited to 14 bits of precision)
Removes the sublabel as a member of the sublabel list


  '''[[BitXOR|$R = BitXOR($1,$2)]]'''
  '''[[RemoveSubLabel|RemoveSubLabel($1)]]'''
   
   
  $R = Result
  $1 = Label
$1 = Value 1
$2 = Value 2


=== Condition ===
=== SetLabelListProperty ===


Evaluate a condition specified in a dialog
Sets a property of a label list


  '''[[Condition|$R = Condition($F)]]'''
  '''[[SetLabelListProperty|SetLabelListProperty($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = LabelList
  $F = Set using
  $2 = Property
$3 = Value


=== EQ ( == ) ===
=== TestLabelIndex ===


Determines if 2 values are numerically close to each other
Tests whether an index has been used in a label list


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


=== GE ( >= ) ===
=== AppendToLabel ===


Determines if the first value is greater than or equal to the second
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.


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


=== GT ( > ) ===
=== CreateLabelAlias ===


Determines if the first value is significantly greater than the second value
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.


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


=== LE ( <= ) ===
=== CreateMD5Hash ===


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


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


=== LT ( < ) ===
=== CropToCharacters ===


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


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


=== NEQ ( != ) ===
=== ExtractIntoFormat ===


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


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


== Message ==
=== FileSHA ===


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


Sends a broadcast to the entire model, optionally including the item's attributes
'''[[FileSHA|$R = FileSHA($1,$2)]]'''
$R = Result
$1 = File
$2 = TextFile


'''[[Broadcast|Broadcast($1,$2)]]'''
=== FormatIntoLabel ===
$1 = Broadcast Index
$2 = With Item Info


=== BroadcastScoped ===
Create a new label with the formatted text of the source


Sends a broadcast to a specified dynamic panel and all under it, optionally including the item's attributes
  '''[[FormatIntoLabel|FormatIntoLabel($R,$1)]]'''
 
  '''[[BroadcastScoped|BroadcastScoped($1,$2,$3)]]'''
   
   
  $1 = Broadcast Index
  $R = Result
  $2 =  With Item Info
  $1 = Source
$3 = Send To Subsystem


=== BroadcastToPanel ===
=== FormatIntoLabelIndex ===


Sends a broadcast to a specified dynamic panel, optionally including the item's attributes
Creates a label from the text of source and using the provided index


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


=== ImmediateMessage ===
=== FormatNameIntoLabel ===


Send a message whilst the item waits at the change object
Creates a label from the name of the given object


  '''[[ImmediateMessage|ImmediateMessage($1)]]'''
  '''[[FormatNameIntoLabel|$R = FormatNameIntoLabel($1)]]'''
   
   
  $1 = Message Target
$R = Result
  $1 = Source


=== ImmediateMessageNamed ===
=== FormattedLabelIndex ===


Send a message to a specified portal with a specific name whilst the item waits at the change object
Determines if the source text is a label and returns its index if it is


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


=== ReleaseWaitingItem ===
=== FormattedWidth ===


Used to signal a waiting dispatcher on the target panel that a given item should be released
Returns how many characters the referenced data has when it is formatted for display


  '''[[ReleaseWaitingItem|$R = ReleaseWaitingItem($1,$2)]]'''
  '''[[FormattedWidth|$R = FormattedWidth($1)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Item Index
  $1 = Width Of
$2 = Scope Panel


=== ReverseItemDirection ===
=== FormatTitleIntoLabel ===


Searches spatial links for the item and if found, reverses the direction of the item
Creates a label from the title text of the given object


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


== Numeric ==
=== GetAppDataName ===


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


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


=== max ===
=== GetCharacter ===


Determines the greater of 2 values
Extracts a character from the formatted value provided and returns the ascii code


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


=== min ===
=== GetMyDocumentsName ===


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


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


=== mod ===
=== GetProgramName ===


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


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


=== random ===
=== GetSharedAppDataName ===


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


  '''[[random|$R = random($F)]]'''
  '''[[GetSharedAppDataName|$R = GetSharedAppDataName($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Folder
$2 = Filename


=== round ===
=== LogMessage ===


Integer closest to the value
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.


  '''[[round|$R = round($1)]]'''
  '''[[LogMessage|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.
 
'''[[RemapName|$R = RemapName($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Round Value
  $1 = Source Text


=== RoundToN ===
=== RemoveFileExtention ===


Round value to the specified number of digits of precision
Crop label to remove trailing dot and text


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


=== trunc ===
=== RenameLabel ===


Integer equal or lower than the value
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.


  '''[[trunc|$R = trunc($1)]]'''
  '''[[RenameLabel|$R = RenameLabel($1)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Truncate
  $1 = Source


== Paint ==
=== RenameObject ===


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


Enables a paint object to be copied, optionally keeping it inherited from the given master
  '''[[RenameObject|RenameObject($1,$2)]]'''
 
  '''[[CopyPaintObject|$R = CopyPaintObject($1,$2,$3)]]'''
   
   
$R = New Paint Label     
  $1 = Object
  $1 = Original Paint Label
  $2 = New Name
  $2 = Destination Panel 
$3 = Inherit The Copy   


=== CopyPaintProperties ===
=== SetFreeTextTitle ===


Copies the graphical properties between paint objects
Sets title of free text editor dialog


  '''[[CopyPaintProperties|CopyPaintProperties($1,$2)]]'''
  '''[[SetFreeTextTitle|SetFreeTextTitle($1)]]'''
   
   
  $1 = Paint Object To Update
  $1 = Title Text
$2 = Original Paint Object


=== DeleteAllPaintObjects ===
== Logical ==


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


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


=== DeleteInheritedPaintObjects ===
=== BitOR ===


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


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


=== DeletePaintObject ===
=== BitXOR ===


Deletes a paint object
Treat values as integers and bitwise XORs them (limited to 14 bits of precision)


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


=== GetPaintProperty ===
=== EQ ( == ) ===


Read a property of a paint object
Determines if 2 values are numerically close to each other


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


=== InheritPaintObjects ===
=== GE ( >= ) ===


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


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


=== InterpolateColor ===
=== GT ( > ) ===


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


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


=== SetNoteVisible ===
=== LE ( <= ) ===


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


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


=== SetPaintImage ===
=== LT ( < ) ===


Sets the image of a paint object
Determines if the first value is significantly less than the second value


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


=== SetPaintPosition ===
=== NEQ ( != ) ===


Moves a paint object to a new position
Determines if 2 values are not numerically close to each otherclose to each other


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


=== SetPaintProperty ===
=== Broadcast ===


Set a property of a paint object directly
Sends a broadcast to the entire model. Options can be 0 or a combination of values from the Broadcast Options label list.


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


=== SetPaintText ===
=== BroadcastLocal ===


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


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


=== SetPaintTip ===
=== BroadcastScoped ===


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


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


== Route ==
=== BroadcastToPanel ===


=== AssignRoute ===
Sends a broadcast to a specified dynamic panel. Options can be 0 or a combination of values from the Broadcast Options label list.


Sets an item's track route from a route table
  '''[[BroadcastToPanel|BroadcastToPanel($1,$2,$3)]]'''
 
  '''[[AssignRoute|AssignRoute($1)]]'''
   
   
  $1 = Timetable Source
  $1 = Broadcast Index
$2 = Broadcast Options
$3 = Send To Subsystem


=== ClearRoute ===
=== ImmediateMessage ===


Clear an item's routing database
Send a message whilst the item waits at the change object


  '''[[ClearRoute|ClearRoute()]]'''
  '''[[ImmediateMessage|ImmediateMessage($1)]]'''
   
   
$1 = Message Target


=== EnableTrackCheckNext ===
=== ImmediateMessageNamed ===


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.
Send a message to a specified portal with a specific name whilst the item waits at the change object


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


=== FillRouteSteps ===
=== ReleaseWaitingItem ===


Fills in all intermediate portals and loops in an item's track route
Used to signal a waiting dispatcher on the target panel that a given item should be released


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


=== InsertRouteStep ===
=== ReverseItemDirection ===


Insert a track route step into an item's internal routing database
Searches spatial links for the item and if found, reverses the direction of the item


  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
  '''[[ReverseItemDirection|$R = ReverseItemDirection($1,$2)]]'''
   
   
  $1 = Route Step
$R = Result
  $2 = Route Location
  $1 = Item Index
  $2 = Scope Panel
 
== Numeric ==


=== ReadRoute ===
=== abs ===


Reads an item's track route into a table
Magnitude of a value, without the sign


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


=== RegisterBlockedTrain ===
=== Convolve ===


Register the item (train) into the track blocked list
Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.”


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


=== RoadsInTrackSection ===
=== fmod ===


Returns how many roads a given track section has been configured for
Floating point modulus of $1 over base $2


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


=== TrackSectionType ===
=== max ===


Returns the type of a track section (_section_types label list)
Determines the greater of 2 values


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


=== UnblockTrain ===
=== min ===


Attempt unblock of specific train id or all blocked trains if id is 0
Determines the lesser of 2 values


  '''[[UnblockTrain|UnblockTrain($1)]]'''
  '''[[min|$R = min($1,$2)]]'''
   
   
  $1 = Item ID
  $R = Result
$1 = Value 1
$2 = Value 2


== Row/Column ==
=== mod ===


=== Average ===
Integer modulus of $1 over base $2


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


=== MaxIndex ===
=== Normalise ===


Determines the index of the highest value in a row or column
Rescales data in column so they add up to 1


  '''[[MaxIndex|$R = MaxIndex($1,$2,$3)]]'''
  '''[[Normalise|Normalise($1)]]'''
   
   
$R = Result
  $1 = Column
  $1 = Max of
$2 = From
$3 = To


=== MinIndex ===
=== random ===


Determines the index of the lowest value in a row or column
Random value between 0 and 1


  '''[[MinIndex|$R = MinIndex($1,$2,$3)]]'''
  '''[[random|$R = random($F)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Min of
  $F = Set to
$2 = From
$3 = To


=== StdDev ===
=== round ===


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


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


=== Sum ===
=== RoundToN ===


Determines the sum of values in a row or column
Round value to the specified number of digits of precision


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


=== SumSquared ===
=== trunc ===


Determines the sum of squares of values in a row or column
Integer equal or lower than the value


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


== Scientific ==
== Paint ==


=== arccos ===
=== BlendColors ===


Inverse cosine function, returns radians
Returns the resulting colour (always opaque) you would get if a black surface was painted with Color1 then Color2.


  '''[[arccos|$R = arccos($1)]]'''
  '''[[BlendColors|$R = BlendColors($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Value
  $1 = Color1
$2 = Color2


=== arcsin ===
=== CopyPaintObject ===


Inverse sine function, returns radians
Enables a paint object to be copied


  '''[[arcsin|$R = arcsin($1)]]'''
  '''[[CopyPaintObject|$R = CopyPaintObject($1,$2)]]'''
   
   
  $R = Result
  $R = New Paint Label     
  $1 = Value
  $1 = Original Paint Label
$2 = Destination Panel 


=== arctan ===
=== CopyPaintProperties ===


Inverse tan function, returns radians
Copies the graphical properties between paint objects


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


=== atan2 ===
=== CreateTiles ===


Determines angle (in radians) given x and y displacement
Creates a tileset from an image. (0,0) is the center of image. Existing tileset file is deleted. Returns 0 on success.


  '''[[atan2|$R = atan2($1,$2)]]'''
  '''[[CreateTiles|$R = CreateTiles($1,$2,$3,$4)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Numerator (Y)
  $1 = Image File
  $2 = Denominator (X)
  $2 = Tile Set
$3 = MaxZoom
$4 = Margin Colour


=== cos ===
=== DeleteAllPaintObjects ===


Cosine function, value in radians
Delete all paint objects on the given panel


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


=== DegToRad ===
=== DeleteInheritedPaintObjects ===


Converts degrees to radians
Removes all paint objects which inherit from a given panel


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


=== exp ===
=== DeletePaintObject ===


Calculates $1 to the power of E
Deletes a paint object


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


=== hypot ===
=== FitPaint ===


Hypotenuse of right angled triangle with given sides
Fits a paint object to its contents.


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


=== log10 ===
=== GetPaintProperty ===


Calculates the decimal logarithm of the value
Read a property of a paint object


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


=== logN ===
=== InheritPaintObjects ===


Calculates the natural logarithm of the value
Enables a panel to be populated with paint objects from another panel


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


=== pow ===
=== InterpolateColor ===


Calculates $1 to the power of $2
Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)


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


=== RadToDeg ===
=== LinkPaintObjects ===


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


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


=== sin ===
=== LongLatToXY ===


Sine function, value in radians
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


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


=== sqr ===
=== MakeRangeVisible ===


Value multiplied by itself
Adjusts the map co-ordinates to make the range of co-ordinates visible regardless of the map view's aspect ratio


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


=== sqrt ===
=== PositionPaintObject ===


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


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


=== tan ===
=== RepaintPaintObject ===


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


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


== Spatial Link ==
=== ScaleColor ===


=== AddBendPoint ===
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.
 
Adds a bend point to a spatial link between the two objects specified


  '''[[AddBendPoint|AddBendPoint($R,$1,$2,$3)]]'''
  '''[[ScaleColor|$R = ScaleColor($1,$2,$3)]]'''
   
   
  $R = From Object
  $R = Result
  $1 = To Object
  $1 = Color
  $2 = X Position
  $2 = Scale
  $3 = Y Position
  $3 = Offset


=== AddDirectionalLink ===
=== SetLongLatXY ===


Adds a spatial link between objects which can only be traversed in the forward direction
Sets paint map to show the given co-ordinate as close as possible to the panel (x,y) point.


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


=== AddSpatialLink ===
=== SetNoteVisible ===


Add a spatial link between the two objects labels specified
Shows or hides an RTF note


  '''[[AddSpatialLink|AddSpatialLink($1,$2)]]'''
  '''[[SetNoteVisible|SetNoteVisible($1,$2)]]'''
   
   
  $1 = From Object
  $1 = Paint Object Label
  $2 = To Object
  $2 = Visibility       


=== ClearSpatialCache ===
=== SetPaintImage ===


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


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


=== CopySpatialLink ===
=== SetPaintProperty ===


Creates a spatial link between objects, copying an existing link's properties
Set a property of a paint object directly


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


=== DeletePanelSpatialLinks ===
=== SetPaintText ===


Deletes all spatial links on a given panel
Sets the text of a paint object


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


=== RemoveSpatialLink ===
=== SetPaintTip ===


Removes any spatial links from and to the specified object labels (directional)
Sets the tool tip text of a paint object


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


=== SetItemTransitTarget ===
=== SetPaintXY ===


Sets the destination an item will look for once it enters a spatial link
Moves a paint object so a given edge/corner is at (X,Y). Edge=1..9 (1=topleft, 2=topcenter, 5=center, 7=bottomleft etc.)


  '''[[SetItemTransitTarget|SetItemTransitTarget($1)]]'''
  '''[[SetPaintXY|SetPaintXY($1,$2,$3,$4)]]'''
   
   
  $1 = To Target
  $1 = Paint Object Label
$2 = X Pos
$3 = Y Pos
$4 = Edge


=== SetItemTransitTime ===
=== SetTransparency ===


Sets the time an item will take to reach its destination once it enters a spatial link
Sets the transparency (alpha) value of a colour


  '''[[SetItemTransitTime|SetItemTransitTime($1)]]'''
  '''[[SetTransparency|$R = SetTransparency($1,$2)]]'''
   
   
  $1 = To Time
$R = Result
  $1 = Color
$2 = Transparency


=== SetLinkColor ===
=== XYToLongLat ===


Sets the color of a spatial link between 2 given objects
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


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


=== SetLinkCost ===
=== AddPipe ===


Sets the link cost of a spatial link (normally computed from the link's distance)
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.


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


=== SetSpatialLinkWidth ===
=== RemovePipe ===


Sets the width of a spatial link between two objects
Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.


  '''[[SetSpatialLinkWidth|SetSpatialLinkWidth($1,$2,$3)]]'''
  '''[[RemovePipe|RemovePipe($1,$2)]]'''
   
   
  $1 = From Object
  $1 = From
  $2 = To Object
  $2 = To
$3 = Width   
 
== 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.


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


=== ---| Only During Move |--- ===
=== AddTrack ===


Enables the modeller to specifically mark that the following routine lines do not execute during lookahead
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.


  '''[[---| Only During Move |---||----- Following Only During Move -----|]]'''
  '''[[AddTrack|$R = AddTrack($1,$2,$3)]]'''
   
   
$R = New Track
$1 = From
$2 = To
$3 = Track Type


=== BREAKPOINTIF ===
=== AssignRoute ===


If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state
Sets an item's track route from a route table


  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
  '''[[AssignRoute|AssignRoute($1)]]'''
   
   
  $1 = Enable Break
  $1 = Timetable Source


=== CallDLL ===
=== AssignRouteFrom ===


Enables a Planimate compatible DLL to be called
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.


  '''[[CallDLL|$R = CallDLL($F)]]'''
  '''[[AssignRouteFrom|$R = AssignRouteFrom($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $F = Set to
  $1 = Starting Cell
$2 = Step Count


=== CallRoutine ===
=== CancelLoopEntryDelay ===


Calls a subroutine
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.


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


=== Comment (//) ===
=== ClearRoute ===


A comment line
Clear an item's routing database


  '''[[Comment|Comment]]'''
  '''[[ClearRoute|ClearRoute()]]'''
   
   


=== CopyFont ===
=== ClearTrailList ===


Copies the font properties between cells and columns
Clears a train's history of sections it has traversed


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


=== CopyFormat ===
=== CreateRoute ===


Copies the format/unit type/label reference between cells, columns and attributes
Creates a route of all steps between the two locations. Returns non zero and sets s.TrackFillRouteError on error.


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


=== DescribeRoutineData ===
=== EnableTrackCheckNext ===


Describe the data accessed by a change object routine
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.


  '''[[DescribeRoutineData|DescribeRoutineData($1,$2,$3)]]'''
  '''[[EnableTrackCheckNext|EnableTrackCheckNext()]]'''
   
   
$1 = Routine Panel
$2 = Object Name
$3 = Output Filename


=== EncodeRGB ===
=== FillRouteSteps ===


Encodes red, green and blue components (0..255) into a single value used to specify any color
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


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


=== FormatForList ===
=== GenerateTrackTable ===


Formats the result object to reference a label list with the given name
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.


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


=== GetFormat ===
=== HoldSectionRoad ===


Returns the value format of the data
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.


  '''[[GetFormat|$R = GetFormat($1)]]'''
  '''[[HoldSectionRoad|HoldSectionRoad($1,$2,$3,$4)]]'''
   
   
  $R = Result
  $1 = SectionID
  $1 = Data To Test
$2 = Road#
  $3 = Item ID
$4 = Item Object


=== GetFormatListName ===
=== InsertRouteStep ===


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


  '''[[GetFormatListName|GetFormatListName($R,$1)]]'''
  '''[[InsertRouteStep|InsertRouteStep($1,$2)]]'''
   
   
  $R = Result
  $1 = Route Step
  $1 = Data To Test
  $2 = Route Location


=== ListRoutineCode ===
=== ListBlockedTrains ===


Write a change object routine code to a file
Clears table and adds a row for each blocked train. Columns are filled in this order: Item ID, Blocked Time, Blocked Location


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


=== LoadDataSet ===
=== PolyPathFinder ===


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


  '''[[LoadDataSet|LoadDataSet($1,$2)]]'''
  '''[[PolyPathFinder|$R = PolyPathFinder($1,$2,$3,$4,$5,$6,$7)]]'''
   
   
  $1 = Data Set #
$R = Result
  $2 = File Name
  $1 = StartX
  $2 = StartY
$3 = EndX
$4 = EndY
$5 = PolyPoints
$6 = WayPoints
$7 = UsingLongLat


=== LoadDataSet2 ===
=== ReadRoute ===


Load a version 2 dataset
Reads an item's track route into a table


  '''[[LoadDataSet2|$R = LoadDataSet2($1,$2,$3)]]'''
  '''[[ReadRoute|ReadRoute($R)]]'''
   
   
  $R = Result
  $R = Timetable Target
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase


=== ObjectType ===
=== RegisterBlockedTrain ===


Returns the type of the object that the object label refers to
Register the item (train) into the track blocked list


  '''[[ObjectType|$R = ObjectType($1)]]'''
  '''[[RegisterBlockedTrain|RegisterBlockedTrain()]]'''
   
   
$R = Result
$1 = Object


=== SaveDataSet ===
=== RemoveStaticRoute ===


Initiates saving of a given data set to a file name specified as a label
Removes any static route with the given ID. Do not remove a static route which is being used by any items.


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


=== SaveDataSet2 ===
=== RemoveTrack ===


Save a version 2 dataset
Removes any track between portals From and To. If From is a track label then it is used and To is ignored.


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


=== SetFormat ===
=== ResetLoopDelayTime ===


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


  '''[[SetFormat|SetFormat($1,$2,$3)]]'''
  '''[[ResetLoopDelayTime|ResetLoopDelayTime()]]'''
   
   
$1 = Data To Set
$2 = Format
$3 = List Name


=== SetLastDataFile ===
=== RoadsInTrackSection ===


Sets the last data filename, optionally visible in the titlebar
Returns how many roads a given track section has been configured for


  '''[[SetLastDataFile|SetLastDataFile($1)]]'''
  '''[[RoadsInTrackSection|$R = RoadsInTrackSection($1)]]'''
   
   
  $1 = Name
$R = Target
  $1 = Section


=== StartScheduledEntries ===
=== SectionRoadAvail ===


Signals that scheduled entries should start (if options deferred them starting when the model was run)
Returns where a track section road is available for an item/train to use


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


== Table ==
=== SectionRoadTrain ===


=== AdvancedSort ===
Returns item ID of train in a track section road or -1 if no item


Performs a sort on a table using another table to define the sort criteria
  '''[[SectionRoadTrain|$R = SectionRoadTrain($1,$2)]]'''
 
  '''[[AdvancedSort|AdvancedSort($R,$1)]]'''
   
   
  $R = Target 
  $R = Result
  $1 = Sort Info
  $1 = SectionID
$2 = Road#


=== AllocateTableRowMemory ===
=== SetPreviousTailData ===


Enables memory to be reserved for a table which is expected to grow to a large number of rows
Enables taildata to be set for a road/length multiserver that a train has just left. This is useful when taildata information is not known until the front of the train leaves the road/multiserver. WhichData is 1..4 (TailData1..TailData4).


  '''[[AllocateTableRowMemory|AllocateTableRowMemory($R,$1)]]'''
  '''[[SetPreviousTailData|SetPreviousTailData($1,$2)]]'''
   
   
  $R = Target Table
  $1 = WhichData
  $1 = Allocate Rows
  $2 = Value


=== AppendCol ===
=== SetRoadCheckFilter ===


Append a column to a table
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.


  '''[[AppendCol|AppendColumn($R)]]'''
  '''[[SetRoadCheckFilter|SetRoadCheckFilter($1)]]'''
   
   
  $R = Target
  $1 = Start Cell


=== AppendRow ===
=== SetRoadColor ===


Append a row to the table
Sets color of road in track section


  '''[[AppendRow|AppendRow($R)]]'''
  '''[[SetRoadColor|SetRoadColor($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = SectionID
$2 = Road#
$3 = Color   


=== BlockMove ===
=== TrackSectionType ===


Block copy a range of cells to another table
Returns the type of a track section (_section_types label list)


  '''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
  '''[[TrackSectionType|$R = TrackSectionType($1)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Source
  $1 = Section
$2 = # of Rows
$3 = # of Cols


=== CopyToClipboard ===
=== UnblockTrain ===


Copy table to clipboard using its clipboard settings and the option modifiers
Attempt unblock of specific train id or all blocked trains if id is 0


  '''[[CopyToClipboard|CopyToClipboard($R,$1)]]'''
  '''[[UnblockTrain|UnblockTrain($1)]]'''
   
   
$R = From Table
  $1 = Item ID
  $1 = Options


=== CreateSortIndex ===
=== UpdateLoopEntryDelay ===


Creates an ordered list of row numbers if the given column was sorted alphabetically
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.


  '''[[CreateSortIndex|CreateSortIndex($R,$1)]]'''
  '''[[UpdateLoopEntryDelay|UpdateLoopEntryDelay($1)]]'''
   
   
$R = Target Column
  $1 = Loop Delay
  $1 = Column To Sort


=== DeleteCol ===
== Row/Column ==


Delete a range of columns from a table
=== Average ===
 
Determines the average of values in a row or column


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


=== DeleteRow ===
=== MaxIndex ===


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


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


=== EnableColumnEditing ===
=== MinIndex ===


Controls whether a given table column can be edited
Determines the index of the lowest value in a row or column


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


=== GetColumnProperty ===
=== StdDev ===


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


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


=== InsertCol ===
=== Sum ===


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


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


=== InsertRow ===
=== SumSquared ===


Insert a number of rows at a given row in a table
Determines the sum of squares of values in a row or column


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


=== OutOfScopeWrite ===
=== arccos ===


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


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


=== PasteFromClipboard ===
=== arcsin ===


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


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


=== PurgeDuplicateRows ===
=== arctan ===


Removes any identical rows from the given table
Inverse tan function, returns radians


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


=== RegenerateBillboardTable ===
=== atan2 ===


Regenerate a billboard table to reflect changes in the model
Determines angle (in radians) given x and y displacement


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Shift the columns in a table
Square root of value


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


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


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


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


=== Sort ===
== Spatial Link ==


Sort table by up to 3 columns
=== AddBendPoint ===


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


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


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


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


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


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


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


== Table View ==
=== ClearLinkCache ===


=== ClearFilter ===
Instructs Planimate to update spatial link information after links are created or objects are moved
 
Clear filter settings for a table view


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


=== CopyFromView ===
=== CopyLink ===


Copies the current cell or selection from a specified table view just as if CTRL-C was pressed
Creates a spatial link between objects, copying an existing link's properties


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


=== GetFilteredRows ===
=== DeletePanelLinks ===


Retrieves the filter mapping of view rows to actual rows into the list table
Deletes all spatial links on a given panel


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


=== GetTableView ===
=== GetBendPoints ===


Read columns of a table view into another table
Reads bend points into table Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.


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


=== PasteIntoView ===
=== GetNextLinkObject ===


Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success
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.


  '''[[PasteIntoView|$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)]]'''
  '''[[GetNextLinkObject|$R = GetNextLinkObject($1,$2)]]'''
   
   
  $R = Error Result
  $R = Location
  $1 = Table
  $1 = From Portal
  $2 = Panel
  $2 = To Portal
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read


=== ReFilterTableView ===
=== LinkDistance ===


Reapply any active filters to the current data in the table
Determine the spatial link travel distance between 2 portals.


  '''[[ReFilterTableView|ReFilterTableView($1,$2)]]'''
  '''[[LinkDistance|$R = LinkDistance($1,$2)]]'''
$R = Distance
$1 = From
$2 = To
 
=== QueryLinkItems ===
 
Sets table to rows describing every item on the link. Required columns are  ItemID, TotalTime, Ratio, Direction and Stopped. Ratio corresponds to the position on the link, 0 being the start of the link and 1 being the end. Direction is 0 for forward and 1 for reverse.
 
'''[[QueryLinkItems|QueryLinkItems($1,$2)]]'''
   
   
  $1 = Table
  $1 = Table
  $2 = Panel
  $2 = Link


=== SetTableView ===
=== RemoveLink ===


Set columns that a table view will display
Removes any spatial links from and to the specified object labels (directional)


  '''[[SetTableView|SetTableView($1,$2,$3)]]'''
  '''[[RemoveLink|RemoveLink($1,$2)]]'''
   
   
  $1 = View Table
  $1 = From Object
  $2 = View Panel
  $2 = To Object
$3 = Config Table


=== SetTableViewColScroll ===
=== SetBendPoints ===


Sets the column scroll of a view for a table on a given panel
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.


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


=== SetTableViewRowScroll ===
=== SetItemLinkTarget ===


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


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


=== TableViewColScroll ===
=== SetItemLinkTime ===


Reads the column scroll of a view for a table on a given panel
Sets the time an item will take to reach its destination once it enters a spatial link


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


=== TableViewRows ===
=== SetLinkColor ===


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
Sets the color of a spatial link between 2 given objects


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


=== TableViewRowScroll ===
=== SetLinkCost ===


Reads the row scroll of a view for a table on a given panel
Sets the link cost of a spatial link (normally computed from the link's distance)


  '''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
  '''[[SetLinkCost|SetLinkCost($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = From Object
  $1 = Table
  $2 = To Object
  $2 = Panel
  $3 = Cost     


=== TableViewVisibleCols ===
=== SetLinkRoads ===


Reads the number of visible columns in a table view
Sets the number of roads and road spacing for a spatial link.


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


=== TableViewVisibleRows ===
=== SetLinkWidth ===


Reads the number of visible rows in a table view
Sets the width of a spatial link between two objects


  '''[[TableViewVisibleRows|$R = TableViewVisibleRows($1,$2)]]'''
  '''[[SetLinkWidth|SetLinkWidth($1,$2,$3)]]'''
   
   
  $R = Target
  $1 = From Object
  $1 = Table
  $2 = To Object
  $2 = Panel
  $3 = Width   


== Time ==
=== UpdateLinkItems ===


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


Returns the day of the month, starting at 1
'''[[UpdateLinkItems|UpdateLinkItems($1,$2)]]'''
$1 = Table
$2 = Link


'''[[DayOfMonth|$R = DayOfMonth($1)]]'''
== Special ==
$R = Result
$1 = Time


=== DayOfWeek ===
=== ---| Only During Move |--- ===


Returns the day of the week, starting at 1 for Sunday
Enables the modeller to specifically mark that the following routine lines do not execute during lookahead


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


=== DaysInDateMonth ===
=== Beep ===


Returns how many days in the month of the absolute time
Plays a tone through the sound card, Frequency in Hz, Duration in milliseconds


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


=== FormDate ===
=== BREAKPOINTIF ===


Computes the absolute time representing midnight on the given date
If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state


  '''[[FormDate|$R = FormDate($1,$2,$3)]]'''
  '''[[BREAKPOINTIF|BREAKPOINTIF ($1)]]'''
   
   
$R = Result
  $1 = Enable Break
  $1 = Date
$2 = Month
$3 = Year


=== HourOfDay ===
=== BrowseKey ===


Returns the hour into the current day of the time, starting at 0
Give user chance to browse for another key. Returns non zero if a different key was selected which is acceptable.


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


=== HourOfDay+1 ===
=== CallRoutine ===


Returns the hour into the current day of the time, starting at 1 instead of 0
Calls a subroutine


  '''[[HourOfDay+1|$R = HourOfDay_1($1)]]'''
  '''[[CallRoutine|CallRoutine($F)]]'''
   
   
  $R = Result
  $F = Call
$1 = Time


=== IncrementByMonths ===
=== CLRDelete ===


Increments the date by one or more months, attempting to keep the same day of month
Deletes a managed object created by New().


  '''[[IncrementByMonths|IncrementByMonths($R,$1)]]'''
  '''[[CLRDelete|CLRDelete($1)]]'''
   
   
$R = Result
  $1 = Handle
  $1 = # of months


=== MonthOfYear ===
=== CLRGetProperty ===


Returns the month of the year, starting at 1 for January
Enables reading a dynamically named property of a managed class.


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


=== TimeOfDay ===
=== CLRNew ===


Returns the number of seconds into the current day of the time
Creates a new instance of a managed object. Requires result be an Instance formatted attribute.


  '''[[TimeOfDay|$R = TImeOfDay($1)]]'''
  '''[[CLRNew|$R = CLRNew($1)]]'''
   
   
  $R = Result
  $R = Target
  $1 = Time
  $1 = DLLClass


=== WeekOfYear ===
=== CLRSetOwner ===


Returns the week of the year, starting at 1
Sets owning window of a class, can specify a paint object or 0 to use current panel.


  '''[[WeekOfYear|$R = WeekOfYear($1)]]'''
  '''[[CLRSetOwner|CLRSetOwner($1,$2)]]'''
   
   
  $R = Result
  $1 = Handle
  $1 = Time
  $2 = PaintID


=== YearOfDate ===
=== CLRSetProperty ===


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


  '''[[YearOfDate|$R = YearOfDate($1)]]'''
  '''[[CLRSetProperty|CLRSetProperty($1,$2,$3)]]'''
   
   
  $R = Result
  $1 = Handle
  $1 = Time
$2 = Name
  $3 = Value


== Tuple ==
=== Comment (//) ===


=== DecodeMultiLabelToTuple ===
A comment line


Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label
  '''[[Comment|Comment]]'''
 
  '''[[DecodeMultiLabelToTuple|DecodeMultiLabelToItem($R)]]'''
   
   
$R = Target


=== EncodeItemToMultiLabel ===
=== CopyFont ===


Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label
Copies the font properties between cells and columns


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


=== MatchedCopyRow ===
=== CopyFormat ===


Copy rows between tables where the column names match
Copies the format/unit type/label reference between cells, columns and attributes


  '''[[MatchedCopyRow|MatchedCopyRow($R,$1)]]'''
  '''[[CopyFormat|CopyFormat($R,$1)]]'''
   
   
  $R = Result
  $R = Format Result
  $1 = Set To
  $1 = Format From


=== TupleAppendFromCarried ===
=== CopyPortal ===


Append a row to the table and for it, set table columns from a carried item's attributes with the same name
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.


  '''[[TupleAppendFromCarried|TupleAppendFromCarried($R,$1)]]'''
  '''[[CopyPortal|$R = CopyPortal($1,$2,$3,$4,$5)]]'''
   
   
  $R = Table
  $R = New Portal
  $1 = Carried Index
  $1 = Original Portal
$2 = New Panel
$3 = X
$4 = Y
$5 = New Name


=== TupleAppendFromItem ===
=== DescribeRoutineData ===


Append a row into the table and for it, set table columns from item attributes with the same name
Describe the data accessed by a change object routine


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


=== TupleCarriedToRow ===
=== DragGanttBlock ===


For the specified row, set table columns from a carried item's attributes with the same name
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).


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


=== TupleDecrementToRow ===
=== EncodeARGB ===


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


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


=== TupleExtractToCarried ===
=== EncodeRGB ===


For the specified row, set a carried item's attributes from table columns with the same name then delete the row
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.


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


=== TupleExtractToItem ===
=== FollowItemRemote ===


For the specified row, set item attributes from table columns with the same name then delete the row
Searches spatial links for the item and if found, sets the 'followitem property.


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


=== TupleIncrementToRow ===
=== FormatForList ===


For the specified row, increment cells with the values of item attributes with matching names
Formats the result object to reference a label list with the given name


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


=== TupleInsertFromCarried ===
=== GanttPopup ===


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


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


=== TupleInsertFromItem ===
=== GetFormat ===


Insert a row into the table and for it, set table columns from item attributes with the same name
Returns the value format of the data


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


=== TupleItemToRow ===
=== GetFormatListName ===


For the specified row, set table columns from item attributes with the same name
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


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


=== TupleRowToCarried ===
=== InfoPanelRemote ===


For the specified row, set a carried item's attributes from table columns with the same name
Searches spatial links for the item and if found, sets the s.ItemShowInfoPanel property.


  '''[[TupleRowToCarried|TupleRowToCarried($R,$1)]]'''
  '''[[InfoPanelRemote|$R = InfoPanelRemote($1,$2,$3)]]'''
   
   
  $R = Row
  $R = Result
  $1 = Carried Index
  $1 = Item Info
$2 = Scope Panel
$3 = Show State


=== TupleRowToItem ===
=== ListRoutineCode ===


For the specified row, set item attributes from table columns with the same name
Write a change object routine code to a file


  '''[[TupleRowToItem|TupleRowToItem($R)]]'''
  '''[[ListRoutineCode|ListRoutineCode($1,$2,$3)]]'''
   
   
  $R = Row
  $1 = Routine Panel
$2 = Object Name
$3 = Output Filename
 
=== LoadDataSet2 ===
 
Load a version 2 dataset


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


=== AddListToMenu ===
=== LoadedAssemblies ===


Appends a new menu to the modeller custom menu bar
Display Loaded Assemblies dialog for debugging.


  '''[[AddListToMenu|AddListToMenu($1,$2)]]'''
  '''[[LoadedAssemblies|LoadedAssemblies()]]'''
   
   
$1 = Menu Name
$2 = Item List
=== BrowseFile ===
Browse for a file. Returns non zero if one chosen. $1 sets an initial file, $2 enables a save-style dialog. Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.
'''[[BrowseFile|$R = BrowseFile($1,$2)]]'''
$R = File Chosen
$1 = File Spec
$2 = Save Mode


=== ClearCustomMenubar ===
=== LoadModel ===
 
Stops current run and loads another model. For PBA, the PBA is reloaded regardless of name.
 
'''[[LoadModel|LoadModel($1)]]'''
$1 = Model Name
 
=== ObjectType ===
 
Returns the type of the object that the object label refers to
 
'''[[ObjectType|$R = ObjectType($1)]]'''
$R = Result
$1 = Object
 
=== OpenRoutineWindow ===
 
Opens/closes the current routine window depending on command.
 
'''[[OpenRoutineWindow|OpenRoutineWindow($1)]]'''
$1 = Command
 
=== QueryNetwork ===
 
Sets table to rows describing every link on Panel between portals (track,spatial,pipe). 4 columns are required; From, To, Type and ID. From and To are the object Ids of the portals at the end points. Type is the type of link and is formatted to the “_link_type” label list. ID is the object id of the link.
 
'''[[QueryNetwork|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|RealTimeCallBack($1,$2)]]'''
$1 = Interval (ms)
$2 = Scope Panel
 
=== RemovePortal ===
 
Deletes the portal and its contents from the model
 
'''[[RemovePortal|RemovePortal($1)]]'''
$1 = Portal ID
 
=== SaveDataSet2 ===
 
Save a version 2 dataset
 
'''[[SaveDataSet2|$R = SaveDataSet2($1,$2,$3)]]'''
$R = Result
$1 = Definition Table
$2 = File Name
$3 = Pass Phrase
 
=== SetDirectory ===
 
Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure
 
'''[[SetDirectory|$R = SetDirectory($1)]]'''
$R = Result
$1 = Path
 
=== SetFormat ===
 
Sets format of $1 to mode $2, with $3 being the label list name if its a label format
 
'''[[SetFormat|SetFormat($1,$2,$3)]]'''
$1 = Data To Set
$2 = Format
$3 = List Name
 
=== SetLastDatasetFile ===
 
Sets the last dataset filename, optionally visible in the titlebar. A relative filename will have a full path created as would be used in a file operation with the name.
 
'''[[SetLastDatasetFile|SetLastDatasetFile($1)]]'''
$1 = Name
 
=== ShowHelp ===
 
Open a HTML help window. Help File can be empty for default.
 
'''[[ShowHelp|ShowHelp($1,$2)]]'''
$1 = Help File
$2 = Section
 
=== SignFile ===
 
Digitally signs a file.
 
'''[[SignFile|$R = SignFile($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = File Name
$2 = Cert
$3 = Password
$4 = Subject
$5 = Time Server
 
=== StartScheduledEntries ===
 
Signals that scheduled entries should start (if options deferred them starting when the model was run)
 
'''[[StartScheduledEntries|StartScheduledEntries]]'''
 
=== UserKeyBrowse ===
 
Presents a dialog enabling the user to either paste an application license or browse to a license file. On success in either case the license text is returned. You can specify a default filename and browse directory.
 
'''[[UserKeyBrowse|$R = UserKeyBrowse($1,$2,$3)]]'''
$R = License Text
$1 = FileName
$2 = BrowseFolder
$3 = AppName
 
=== UserKeyLoadFile ===
 
Attempts to load a user license key from a file, returns zero on success.
 
'''[[UserKeyLoadFile|$R = UserKeyLoadFile($1,$2,$3)]]'''
$R = Target
$1 = File Name
$2 = Password
$3 = PublicKey
 
=== UserKeyLoadText ===
 
Attempts to load a user license key from the supplied text, returns zero on success.
 
'''[[UserKeyLoadText|$R = UserKeyLoadText($1,$2,$3)]]'''
$R = Target
$1 = Key Text
$2 = Password
$3 = PublicKey
 
=== UserKeyLookup ===
 
Looks up a setting in a loaded key file. Returns -1 on error or empty string if LHS is text.
 
'''[[UserKeyLookup|$R = UserKeyLookup($1)]]'''
$R = Value
$1 = Name
 
=== WatchListAdd ===
 
Add portal, routine or item attribute to watch list for debugging
 
'''[[WatchListAdd|WatchListAdd($1)]]'''
$1 = Attribute
 
=== WatchListRemove ===
 
Remove portal, routine or item attribute from watch list
 
'''[[WatchListRemove|WatchListRemove($1)]]'''
$1 = Attribute
 
== String ==
 
=== GetNoteRTF ===
 
Retrieves RTF text of note
 
'''[[GetNoteRTF|$R = GetNoteRTF($1)]]'''
$R = String
$1 = Paint ID
 
=== GetNoteText ===
 
Retrieves plain text of note
 
'''[[GetNoteText|$R = GetNoteText($1)]]'''
$R = String
$1 = Paint ID
 
=== SetNoteRTF ===
 
Sets RTF text of note
 
'''[[SetNoteRTF|SetNoteRTF($1,$2)]]'''
$1 = Paint ID
$2 = Text
 
=== SetNoteText ===
 
Sets plain text of note
 
'''[[SetNoteText|SetNoteText($1,$2)]]'''
$1 = Paint ID
$2 = Text
 
=== SetText ( $= ) ===
 
Set a free text attribute or table cell to another text attribute, literal text or a the formatted text of a value
 
'''[[SetText|$R $= $1]]'''
$R = Result
$1 = Set To
 
== Table ==
 
=== AddTable ===
 
Adds table to panel, returning data object label. If a table with that name already exists, 0 is returned.
 
'''[[AddTable|$R = AddTable($1,$2)]]'''
$R = Result
$1 = Panel
$2 = Name
 
=== AdvancedSort ===
 
Performs a sort on a table using another table to define the sort criteria, the sort info table should have  columns for column, asc/desc,num/alpha and optionally filter if you intend to use row filtering. ColumnAsText interprets and matches entries in column 1 textually instead of numerically.
 
'''[[AdvancedSort|AdvancedSort($R,$1,$2,$3)]]'''
$R = Target 
$1 = Sort Info
$2 = Filter
$3 = ColumnAsText
 
=== AllocateTableRowMemory ===
 
Enables memory to be reserved for a table which is expected to grow to a large number of rows
 
'''[[AllocateTableRowMemory|AllocateTableRowMemory($R,$1)]]'''
$R = Target Table
$1 = Allocate Rows
 
=== AppendColumn ===
 
Append a column to a table
 
'''[[AppendColumn|AppendColumn($R,$1)]]'''
$R = Target
$1 = Col Count
 
=== AppendRow ===
 
Append a row to the table
 
'''[[AppendRow|AppendRow($R,$1)]]'''
$R = Target
$1 = Row Count
 
=== BinarySearch ===
 
Perform a binary search over the range First Index to Last Index. Assumes the data compared is sorted ascending and the comparison is for equality. Multiple comparisons can be combined only with AND. Returns 1 + last index or 0 if Zero On Fail is set.
 
'''[[BinarySearch|$R = BinarySearch($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== BlockMove ===
 
Block copy a range of cells to another table
 
'''[[BlockMove|BlockMove($R,$1,Range[$2][$3])]]'''
$R = Result
$1 = Source
$2 = # of Rows
$3 = # of Cols
 
=== CheckTableSorted ===
 
Determines if a table is sorted by the sort criteria. Return 0 if OK or the first unsorted row number. This can be more efficient than calling Sort which is very slow if the table is already sorted.
 
'''[[CheckTableSorted|$R = CheckTableSorted($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = Table
$2 = Column 1
$3 = Column 2
$4 = Column 3
$5 = Column 4
 
=== CompareTables ===
 
Compares rows in tables, returns row number of first difference. Only numerical values are compared, not Text strings.
 
'''[[CompareTables|$R = CompareTables($1,$2)]]'''
$R = Result
$1 = Table 1
$2 = Table 2
 
=== CopyTable ===
 
Replaces all data columns in the target table so it is a copy of Original.
 
'''[[CopyTable|$R = CopyTable($1)]]'''
$R = Target
$1 = Original Table
 
=== CopyToClipboard ===
 
Copy table to clipboard using its clipboard settings and the option modifiers
 
'''[[CopyToClipboard|CopyToClipboard($R,$1)]]'''
$R = From Table
$1 = Options
 
=== CountIFMatch ===
 
Counts rows where Match Column matches Match Key
 
'''[[CountIFMatch|$R = CountIFMatch($1,$2)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
 
=== CreateSortIndex ===
 
Creates an ordered list of row numbers if the given column was sorted alphabetically
 
'''[[CreateSortIndex|CreateSortIndex($R,$1)]]'''
$R = Target Column
$1 = Column To Sort
 
=== DeleteColumn ===
 
Delete a range of columns from a table
 
'''[[DeleteColumn|DeleteColumn($R,$1,$2)]]'''
$R = Target Table
$1 = First Col
$2 = Col Count
 
=== DeleteRow ===
 
Delete a number of rows starting at a given row in a table
 
'''[[DeleteRow|DeleteRow($R,$1,$2)]]'''
$R = Target Table
$1 = First Row
$2 = Row Count
 
=== EnableColumnEditing ===
 
Controls whether a given table column can be edited
 
'''[[EnableColumnEditing|EnableColumnEditing($R,$1)]]'''
$R = Target Column
$1 = Edit Control
 
=== FindColumnLabel ===
 
Searches columns in table $1 for one with a label which matches formatted $2 and returns the index or 0 if none found
 
'''[[FindColumnLabel|$R = FindColumnLabel($1,$2)]]'''
$R = Result
$1 = Table
$2 = Find String
 
=== FindColumnTitle ===
 
Searches columns in table $1 for one with a title which matches formatted $2 and returns the index or 0 if none found
 
'''[[FindColumnTitle|$R = FindColumnTitle($1,$2)]]'''
$R = Result
$1 = Table
$2 = Find String
 
=== FindDuplicates ===
 
Finds duplicated rows in Table, storing the duplicate row number pairs in the first two columns of table Duplicates. Existing rows in Duplicates are removed. Only values are compared, not text.
 
'''[[FindDuplicates|FindDuplicates($R,$1)]]'''
$R = Duplicates
$1 = Table
 
=== GenerateUnique ===
 
First column of the target table is set to a unique subset of the passed column. Text or numbers are supported, with the target column being reformatted if required. If the target does not contain a column, it is created. The output column is sorted using natural ordering.
 
'''[[GenerateUnique|$R = GenerateUnique($1)]]'''
$R = Result
$1 = Column
 
=== GetCellBackgroundColor ===
 
Returns ARGB or index value for a cell's background color. Will be null index (255) if not set for the cell
 
'''[[GetCellBackgroundColor|$R = GetCellBackgroundColor($1)]]'''
$R = Result
$1 = Table Cell
 
=== GetCellTextColor ===
 
Returns ARGB or index value for a cell's text color. Will be null index (255) if not set for the cell
 
'''[[GetCellTextColor|$R = GetCellTextColor($1)]]'''
$R = Result
$1 = Table Cell
 
=== GetColSecondTitle ===
 
Sets the target to a label of the second title row for the given column
 
'''[[GetColSecondTitle|GetColumnSecondTitle($R,$1)]]'''
$R = Result
$1 = Column
 
=== GetColumnProperty ===
 
Read a property of a table column
 
'''[[GetColumnProperty|$R = GetColumnProperty($1,$2)]]'''
$R = Result
$1 = Table Column
$2 = Property Label   
 
=== GetColumnTip ===
 
Sets the target (text or label) to the tip text for the given column
 
'''[[GetColumnTip|GetColumnTip($R,$1)]]'''
$R = Result
$1 = Column
 
=== ImportFromClipboard ===
 
Performs import of table data/structure from clipboard as available in the table editor
 
'''[[ImportFromClipboard|$R = ImportFromClipboard($1,$2)]]'''
$R = Result
$1 = Target Table
$2 = Configure 
 
=== InsertColumn ===
 
Insert columns into a table with the option of copying formatting from another column
 
'''[[InsertColumn|InsertColumn($R,$1,$2,$3)]]'''
$R = Target Table
$1 = Insert Pos.
$2 = Col Count
$3 = Copy Format
 
=== InsertRow ===
 
Insert a number of rows at a given row in a table
 
'''[[InsertRow|InsertRow($R,$1,$2)]]'''
$R = Target Table
$1 = Insert Pos.
$2 = Row Count
 
=== MatchMultipleKeys ===
 
Searches table from the top for the first instance where the given columns have the given values. Returns row number or 0 if no match. Column 3 may be zero for a 2 column search.
 
'''[[MatchMultipleKeys|$R = MatchMultipleKeys($1,$2,$3,$4,$5,$6,$7,$8)]]'''
$R = Result
$1 = Table
$2 = Start Row
$3 = Column 1
$4 = Match 1
$5 = Column 2
$6 = Match 2
$7 = Column 3
$8 = Match 3
 
=== MaxIndexIFMatch ===
 
Returns first row with maximum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
 
'''[[MaxIndexIFMatch|$R = MaxIndexIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== MinIndexIFMatch ===
 
Returns first row with minimum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.
 
'''[[MinIndexIFMatch|$R = MinIndexIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== OutOfScopeWrite ===
 
Enable writing to item table reference $1 even if it is not in scope
 
'''[[OutOfScopeWrite|OutOfScopeWrite($1)]]'''
$1 = Item Table Ref
 
=== PositionLastRow ===
 
Intended for use after a single row has been appended to an already-sorted table, this will efficiently move that last row to the position to maintain the sort. Table must already be sorted by the sort criteria.
 
'''[[PositionLastRow|PositionLastRow($R,$1,$2,$3,$4)]]'''
$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4
 
=== PurgeDuplicateRows ===
 
Removes any identical rows from the given table. Text formatted columns are not compared and should not be present in the table in cases of 100k or more rows for performance reasons.
 
'''[[PurgeDuplicateRows|PurgeDuplicateRows($R)]]'''
$R = Target
 
=== ReverseSearch ===
 
Decrement the result attribute from first to last until the condition is true. If the search fails, returns last_index-1 or 0 if the Zero On Fail option is non zero.
 
'''[[ReverseSearch|$R = ReverseSearch($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== Search ===
 
Increment the result attribute from first to last until the condition is true. If the search fails, returns 1+last_index or 0 if the Zero On Fail option is non zero.
 
'''[[Search|$R = Search($F,$1,$2,$3)]]'''
$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition
 
=== SetCellBackgroundColor ===
 
Sets the background color for the cell.
 
'''[[SetCellBackgroundColor|SetCellBackgroundColor($1,$2)]]'''
$1 = Table Cell
$2 = Color Value
 
=== SetCellFreeText ===
 
Sets the free text (not bound by label text rules) for a table cell
 
'''[[SetCellFreeText|SetCellFreeText($R,$1)]]'''
$R = Target Cell
$1 = Source Cell
 
=== SetCellTextColor ===
 
Sets the text color for the cell
 
'''[[SetCellTextColor|SetCellTextColor($1,$2)]]'''
$1 = Table Cell
$2 = Color Value
 
=== SetColAlignment ===
 
Enables a column's text alignment to be changed
 
'''[[SetColAlignment|SetColumnAlignment($R,$1)]]'''
$R = Target Column
$1 = Align Mode 
 
=== SetColSecondTitle ===
 
Sets the text of the second title row for the given column
 
'''[[SetColSecondTitle|SetColumnSecondTitle($R,$1)]]'''
$R = Target Column
$1 = Title Text
 
=== SetColTitle ===
 
Set the title text of a table column
 
'''[[SetColTitle|SetColumnTitle($R,$1)]]'''
$R = Target Column
$1 = Title Text
 
=== SetColTupleName ===
 
Sets the name used to internally identify a column
 
'''[[SetColTupleName|SetColumnTupleName($R,$1)]]'''
$R = Target Column
$1 = Tuple Text
 
=== SetColumnProperty ===
 
Set a property of a table column
 
'''[[SetColumnProperty|SetColumnProperty($1,$2,$3)]]'''
$1 = Table Column
$2 = Property Label   
$3 = Property Value   
 
=== SetColumnTip ===
 
Sets the tool tip of a table column
 
'''[[SetColumnTip|SetColumnTip($R,$1)]]'''
$R = Column
$1 = Tip Text
 
=== SetColWidth ===
 
Sets the formatting width of a table column
 
'''[[SetColWidth|SetColWidth($R,$1)]]'''
$R = Target Column
$1 = Column Width
 
=== SetTableRowHeight ===
 
Sets the height of table rows
 
'''[[SetTableRowHeight|SetTableRowHeight($1,$2)]]'''
$1 = Target Table
$2 = Row Height
 
=== SetTableTitle ===
 
Set the title text of the table from the label
 
'''[[SetTableTitle|SetTableTitle($R,$1)]]'''
$R = Target Table
$1 = Title Text
 
=== ShiftCol ===
 
Shift the columns in a table
 
'''[[ShiftCol|ShiftColumn($R,$1,$2)]]'''
$R = Result
$1 = Source
$2 = Shift <+ ->
 
=== ShiftRow ===
 
Shift the rows in a table
 
'''[[ShiftRow|ShiftRow($R,$1,$2)]]'''
$R = Result
$1 = Source
$2 = Shift ^+ -v
 
=== Sort ===
 
Sort table by up to 4 columns. If the column index is -ve, it reverses the sort order for that column.
 
'''[[Sort|Sort($R,$1,$2,$3,$4)]]'''
$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4
 
=== SumIFMatch ===
 
Sums values in Data Column for rows where Match Column matches Match Key
 
'''[[SumIFMatch|$R = SumIFMatch($1,$2,$3)]]'''
$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column
 
=== TableReferenceSet ===
 
Returns non zero if the reference resolves to a table
 
'''[[TableReferenceSet|$R = TableReferenceSet($1)]]'''
$R = Result
$1 = Item Table Ref
 
=== TableSortDialog ===
 
Enables the user to set up and perform a sort using the table sort dialog
 
'''[[TableSortDialog|TableSortDialog($R)]]'''
$R = Target
 
=== UpdateColumnRefs ===
 
Re-initialises column labels for references to a table
 
'''[[UpdateColumnRefs|UpdateColumnRefs($1)]]'''
$1 = Table
 
== Table View ==
 
=== ClearFilter ===
 
Clear filter settings for a table view
 
'''[[ClearFilter|ClearFilter($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== CopyAllFromView ===
 
Copies the entire contents of a table view. Any current selection is ignored and left intact.
 
'''[[CopyAllFromView|CopyAllFromView($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Col Labels
 
=== CopyFromView ===
 
Copies the current cell or selection from a specified table view just as if CTRL-C was pressed
 
'''[[CopyFromView|CopyFromView($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== DeleteView ===
 
Deletes view during run. Data is the table, attribute the view is for. Panel is where the view is located.
 
'''[[DeleteView|DeleteView($1,$2,$3,$4)]]'''
$1 = Data
$2 = Panel
$3 = View Type
$4 = Index
 
=== GetColumnFilter ===
 
Gets any active column filter for a table view
 
'''[[GetColumnFilter|$R = GetColumnFilter($1,$2)]]'''
$R = Text/Label
$1 = Column
$2 = Panel
 
=== GetFilteredRows ===
 
Retrieves the filter mapping of view rows to actual rows into the list table
 
'''[[GetFilteredRows|GetFilteredRows($1,$2,$3)]]'''
$1 = Filter List
$2 = Table
$3 = Panel
 
=== GetTableView ===
 
Read columns of a table view into another table
 
'''[[GetTableView|GetTableView($1,$2,$3)]]'''
$1 = View Table
$2 = View Panel
$3 = Config Table
 
=== GetViewProperty ===
 
Retrieves a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.
 
'''[[GetViewProperty|$R = GetViewProperty($1,$2,$3,$4,$5)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = Property
$4 = View Type
$5 = Index
 
=== NearestPoint ===
 
Returns the row of the closest point on a Log Driven Display. If Overlay is non zero, only that overlay is checked. Max Distance sets the largest distance that will be considered in the matching. With no match, the function returns 0.
 
'''[[NearestPoint|$R = NearestPoint($1,$2,$3,$4,$5,$6)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y
$5 = Overlay
$6 = Max Distance
 
=== PasteIntoView ===
 
Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success
 
'''[[PasteIntoView|$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)]]'''
$R = Error Result
$1 = Table
$2 = Panel
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read
 
=== ReFilterTableView ===
 
Reapply any active filters to the current data in the table
 
'''[[ReFilterTableView|ReFilterTableView($1,$2)]]'''
$1 = Table
$2 = Panel
 
=== SetCellColor ===
 
Set text and background colours for cells, supporting doing entire columns, rows or tables as well. In all cases the per cell colour is set.
 
'''[[SetCellColor|SetCellColor($1,$2,$3)]]'''
$1 = Cell
$2 = TextColor
$3 = BackColor
 
=== SetColumnFilter ===
 
Sets a column filter text for a table view. The filter needs to be reapplied once all the columns have been set.
 
'''[[SetColumnFilter|SetColumnFilter($R,$1,$2)]]'''
$R = Column
$1 = Text
$2 = Panel
 
=== SetTableView ===
 
Set columns that a table view will display
 
'''[[SetTableView|SetTableView($1,$2,$3)]]'''
$1 = View Table
$2 = View Panel
$3 = Config Table
 
=== SetTableViewColScroll ===
 
Sets the column scroll of a view for a table on a given panel
 
'''[[SetTableViewColScroll|SetTableViewColScroll($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Value
 
=== SetTableViewRowScroll ===
 
Sets the row scroll of a view for a table on a given panel
 
'''[[SetTableViewRowScroll|SetTableViewRowScroll($1,$2,$3)]]'''
$1 = Table
$2 = Panel
$3 = Value
 
=== SetViewFilterRows ===
 
Sets the rows that a table view on a panel will display. Filter List is a column of row numbers.
 
'''[[SetViewFilterRows|SetViewFilterRows(($1,$2,$3)]]'''
$1 = Filter List
$2 = Table
$3 = Panel
 
=== SetViewProperty ===
 
Sets a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.
 
'''[[SetViewProperty|SetViewProperty($1,$2,$3,$4,$5,$6)]]'''
$1 = Table
$2 = Panel
$3 = Property
$4 = Value
$5 = View Type
$6 = Index
 
=== TableViewColScroll ===
 
Reads the column scroll of a view for a table on a given panel
 
'''[[TableViewColScroll|$R = TableViewColScroll($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewRows ===
 
Reads the number of rows in a table view. If a filter is set, this may differ from the number of rows in the table
 
'''[[TableViewRows|$R = TableViewRows($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewRowScroll ===
 
Reads the row scroll of a view for a table on a given panel
 
'''[[TableViewRowScroll|$R = TableViewRowScroll($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewVisibleCols ===
 
Reads the number of visible columns in a table view
 
'''[[TableViewVisibleCols|$R = TableViewVisibleCols($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
=== TableViewVisibleRows ===
 
Reads the number of visible rows in a table view
 
'''[[TableViewVisibleRows|$R = TableViewVisibleRows($1,$2)]]'''
$R = Target
$1 = Table
$2 = Panel
 
== Time ==
 
=== AdvanceToTimeDialog ===
 
Enables user to use the advance to time dialog. If Absolute is set, it defaults to an absolute time advance otherwise it defaults to a relative interval. Time is interpreted accordingly depending on Absolute, as an interval or as an absolute time. For an Absolute advance, if its zero, the clock value is the default instead of the model start time.
 
'''[[AdvanceToTimeDialog|AdvanceToTimeDialog($1,$2)]]'''
$1 = Absolute
$2 = Time
 
=== DayOfMonth ===
 
Returns the day of the month, starting at 1
 
'''[[DayOfMonth|$R = DayOfMonth($1)]]'''
$R = Result
$1 = Time
 
=== DayOfWeek ===
 
Returns the day of the week, starting at 1 for Sunday
 
'''[[DayOfWeek|$R = DayOfWeek($1)]]'''
$R = Result
$1 = Time
 
=== DaysInDateMonth ===
 
Returns how many days in the month of the absolute time
 
'''[[DaysInDateMonth|$R = DaysInDateMonth($1)]]'''
$R = Result
$1 = Time
 
=== FormDate ===
 
Computes the absolute time representing midnight on the given date
 
'''[[FormDate|$R = FormDate($1,$2,$3)]]'''
$R = Result
$1 = Date
$2 = Month
$3 = Year
 
=== GetDate ===
 
Extracts the date from a date/time
 
'''[[GetDate|$R = GetDate($1)]]'''
$R = Result
$1 = Date/Time
 
=== HourOfDay ===
 
Returns the hour into the current day of the time, starting at 0
 
'''[[HourOfDay|$R = HourOfDay($1)]]'''
$R = Result
$1 = Time
 
=== HourOfDay+1 ===
 
Returns the hour into the current day of the time, starting at 1 instead of 0
 
'''[[HourOfDay+1|$R = HourOfDay_1($1)]]'''
$R = Result
$1 = Time
 
=== IncrementByMonths ===
 
Increments the date by one or more months, attempting to keep the same day of month
 
'''[[IncrementByMonths|IncrementByMonths($R,$1)]]'''
$R = Result
$1 = # of months
 
=== MonthOfYear ===
 
Returns the month of the year, starting at 1 for January
 
'''[[MonthOfYear|$R = MonthOfYear($1)]]'''
$R = Result
$1 = Time
 
=== TimeOfDay ===
 
Returns the number of seconds into the current day of the time
 
'''[[TimeOfDay|$R = TimeOfDay($1)]]'''
$R = Result
$1 = Time
 
=== WeekOfYear ===
 
Returns the week of the year, starting at 1
 
'''[[WeekOfYear|$R = WeekOfYear($1)]]'''
$R = Result
$1 = Time
 
=== YearOfDate ===
 
Returns the year of the given calendar time
 
'''[[YearOfDate|$R = YearOfDate($1)]]'''
$R = Result
$1 = Time
 
== Tuple ==
 
=== DecodeMultiLabelToTuple ===
 
Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label
 
'''[[DecodeMultiLabelToTuple|DecodeMultiLabelToItem($R)]]'''
$R = Target
 
=== EncodeItemToMultiLabel ===
 
Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label
 
'''[[EncodeItemToMultiLabel|EncodeItemToMultiLabel($R)]]'''
$R = Target
 
=== MatchedCopyRow ===
 
Copy rows between tables where the column names match
 
'''[[MatchedCopyRow|MatchedCopyRow($R,$1)]]'''
$R = Result
$1 = Set To
 
=== TupleAppendFromCarried ===
 
Append a row to the table and for it, set table columns from a carried item's attributes with the same name
 
'''[[TupleAppendFromCarried|TupleAppendFromCarried($R,$1)]]'''
$R = Table
$1 = Carried Index
 
=== TupleAppendFromItem ===
 
Append a row into the table and for it, set table columns from item attributes with the same name
 
'''[[TupleAppendFromItem|TupleAppendFromItem($R)]]'''
$R = Table
 
=== TupleCarriedToRow ===
 
For the specified row, set table columns from a carried item's attributes with the same name
 
'''[[TupleCarriedToRow|TupleCarriedToRow($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleDecrementToRow ===
 
For the specified row, decrement cells with the values of item attributes with matching names
 
'''[[TupleDecrementToRow|TupleDecrementFromRow($R)]]'''
$R = Row
 
=== TupleExtractToCarried ===
 
For the specified row, set a carried item's attributes from table columns with the same name then delete the row
 
'''[[TupleExtractToCarried|TupleExtractToCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleExtractToItem ===
 
For the specified row, set item attributes from table columns with the same name then delete the row
 
'''[[TupleExtractToItem|TupleExtractToItem($R)]]'''
$R = Row
 
=== TupleIncrementToRow ===
 
For the specified row, increment cells with the values of item attributes with matching names
 
'''[[TupleIncrementToRow|TupleIncrementToRow($R)]]'''
$R = Row
 
=== TupleInsertFromCarried ===
 
Insert a row into the table and for it, set table columns from a carried item's attributes with the same name
 
'''[[TupleInsertFromCarried|TupleInsertFromCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleInsertFromItem ===
 
Insert a row into the table and for it, set table columns from item attributes with the same name
 
'''[[TupleInsertFromItem|TupleInsertFromItem($R)]]'''
$R = Row
 
=== TupleItemToRow ===
 
For the specified row, set table columns from item attributes with the same name
 
'''[[TupleItemToRow|TupleItemToRow($R)]]'''
$R = Row
 
=== TupleRowToCarried ===
 
For the specified row, set a carried item's attributes from table columns with the same name
 
'''[[TupleRowToCarried|TupleRowToCarried($R,$1)]]'''
$R = Row
$1 = Carried Index
 
=== TupleRowToItem ===
 
For the specified row, set item attributes from table columns with the same name
 
'''[[TupleRowToItem|TupleRowToItem($R)]]'''
$R = Row
 
== UI ==
 
=== AddListToMenu ===
 
Appends a new menu to the modeller custom menu bar
 
'''[[AddListToMenu|AddListToMenu($1,$2)]]'''
$1 = Menu Name
$2 = Item List
 
=== BringToFront ===
 
If a panel is open in a popup window, bring that popup to the front in the window z-order.
 
'''[[BringToFront|BringToFront($1)]]'''
$1 = Panel
 
=== BrowseFile ===
 
Browse for a file. Returns non zero if one chosen. FileName sets an initial file, Options can combine:1 to enable a save-style dialog (default is load) and 2 to enable stay in directory (default is to return to working directory). Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.
 
'''[[BrowseFile|$R = BrowseFile($1,$2)]]'''
$R = File Chosen
$1 = FileName
$2 = Options
 
=== BrowseFolder ===
 
Browse for a folder. Returns non zero if one chosen. Name sets an initial path,  Use s.LastAccessedDataFilePath to access the path selected.
 
'''[[BrowseFolder|$R = BrowseFolder($1,$2)]]'''
$R = Folder Chosen
$1 = StartFolder
$2 = Title
 
=== ClearCustomMenubar ===
 
Removes all menu items from the modeller custom menu bar
 
'''[[ClearCustomMenubar|ClearCustomMenubar]]'''
 
=== DescribeFont ===
 
Retrieves a CSV text field describing the properties of the font for the specified column or table cell.
 
'''[[DescribeFont|$R = DescribeFont($1)]]'''
$R = Result
$1 = Data
 
=== Dialog ===
 
Show a dialog box for the user to interact with
 
'''[[Dialog|$R = Dialog($F)]]'''
$R = Result
$F = Dialog
 
=== DragIcon ===
 
Displays an icon and enables user to position it. X and Y are the starting position (center) in panel co-ordinates. If a move is performed, new co-ordinates are written to these values. Icon selects an image which defines the bounding box. Returns non zero if the move was not cancelled. Supports being invoked with mouse down or up. Keys also supported.
 
'''[[DragIcon|$R = DragIcon($1,$2,$3,$4)]]'''
$R = result
$1 = X Value
$2 = Y Value
$3 = Panel
$4 = Icon Name
 
=== GetCellXY ===
 
Retrieves the co-ordinates of a given corner of a cell that is visible in a table view. Co-ordinates are relative to the top left of the main panel window and can be used for ShowPopupPanel(). Corner is 1..9, 1 = top left.The cell is specified in view cells. Result is non zero on error, for example the cell is not visible. Otherwise X and Y are set.
 
'''[[GetCellXY|$R = GetCellXY($1,$2,$3,$4,$5,$6,$7,$8)]]'''
$R = Result
$1 = Table
$2 = Panel
$3 = View Index
$4 = View Row
$5 = View Column
$6 = Corner
$7 = X
$8 = Y
 
=== HandlePopupMenu ===
 
Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled
 
'''[[HandlePopupMenu|$R = HandlePopupMenu($1)]]'''
$R = Result
$1 = Table
 
=== InitiateFieldEdit ===
 
Starts editing attribute/cell views on a panel, as if the user clicked on the first one
 
'''[[InitiateFieldEdit|InitiateFieldEdit($1)]]'''
$1 = Target Panel
 
=== MessageBox ===
 
Displays a standard message box with an OK button
 
'''[[MessageBox|MessageBox($1,$2)]]'''
$1 = Text
$2 = Title
 
=== MessageBoxConfirm ===
 
Displays a standard message box with OK (1) / Cancel (0) Buttons
 
'''[[MessageBoxConfirm|$R = MessageBoxConfirm($1,$2)]]'''
$R = Result
$1 = Text
$2 = Title
 
=== MessageBoxYN ===


Removes all menu items from the modeller custom menu bar
Displays a standard message box with Yes (1) / No (0) Buttons


  '''[[ClearCustomMenubar|ClearCustomMenubar]]'''
  '''[[MessageBoxYN|$R = MessageBoxYN($1,$2)]]'''
 
=== Dialog ===
 
Show a dialog box for the user to interact with
 
'''[[Dialog|$R = Dialog($F)]]'''
   
   
  $R = Result
  $R = Result
  $F = Dialog
  $1 = Text
$2 = Title


=== HandlePopupMenu ===
=== MessageBoxYNC ===


Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled
Displays a standard message box with Yes (1) / No (0) / Cancel (-1) buttons


  '''[[HandlePopupMenu|$R = HandlePopupMenu($1)]]'''
  '''[[MessageBoxYNC|$R = MessageBoxYNC($1,$2)]]'''
   
   
  $R = Result
  $R = Result
  $1 = Table
  $1 = Text
 
  $2 = Title
=== InitiateFieldEdit ===
 
Starts editing attribute/cell views on a panel, as if the user clicked on the first one
 
'''[[InitiateFieldEdit|InitiateFieldEdit($1)]]'''
  $1 = Target Panel


=== SetMenuBar ===
=== SetMenuBar ===
Line 2,581: Line 4,197:
   
   
  $1 = Table
  $1 = Table
[[Category:Routine]] [[Category:Data]]

Latest revision as of 16:08, 14 September 2020

This page lists all of the routine operations available in Planimate as of 8.54.0. The operations all link to pages with their name but most of these pages will not exist. Where an operation warrants further discussion, these links can be followed and the pages created.

This page is automatically created using Planimate 12.0.0.

Please do not edit it.

Arithmetic

Add

Add two values/rows/columns/tables

$R = Add($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Clear

Set the target value to its initialising value

$R = CLEAR

$R = Clear

Dec ( -= )

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

$R -= $1

$R = Result
$1 = Decr. by

Div

Divide values/rows/columns/tables

$R = Div($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Inc ( += )

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

$R += $1

$R = Result
$1 = Incr. by

InterpolateValue

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

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

$R = Result
$1 = Value1
$2 = Value2
$3 = Ratio

Mul

Multiply values/rows/columns/tables

$R = Mul($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

RemapValue

Remaps value through table, interpolating To Column values according to value's position in From Column. A row range can be specified, To Row of 0 uses the last row in the table.

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

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

Scale ( *= )

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

$R *= $1

$R = Result
$1 = Scale by

Set ( = )

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

$R = $1

$R = Result
$1 = Set To

Sub

Subtract two values/rows/columns/tables

$R = Sub($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Control

BREAKLOOP

Immediately exits an ITERATE loop

BREAKLOOP

CASE

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

CASE ($F)

$F = CASE

CONTINUE

Immediately processes the next iteration in a loop/while, skipping the rest of the code

CONTINUE

DEFAULT

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

DEFAULT

ELSE

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

ELSE

ENDIF

Marks the end of an IF block

ENDIF

ENDLOOP

Marks the end of an ITERATE block

ENDLOOP

ENDSELECT

Marks the end of a SELECT block

ENDSELECT

ENDWHILE

Marks the end of a WHILE block

ENDWHILE

IF

Executes lines following only if the condition is true

IF ($F)

$F = IF

ITERATE

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

ITERATE ($R,$1,$2)

$R = Index Using
$1 = First Value
$2 = Last Value

ITERATEROWS

Iterate Row Index over all the rows in the table

ITERATEROWS ($R,$1)

$R = Row Index
$1 = Table     

RETURN

Returns from the routine

RETURN

REVERSEITERATE

Iterate the result attribute over the given range in descending order

REVERSEITERATE ($R,$1,$2)

$R = Index Using
$1 = First Value
$2 = Last Value

SELECT

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

SELECT

WHILE

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

WHILE ($F)

$F = WHILE

Display

Animate

Animate a model object to a new screen position

Animate($1,$2,$3)

$1 = Object
$2 = X Pos
$3 = Y Pos

ChooseColor

Enables selection of a colour

$R = ChooseColor($1)

$R = Selected Colour
$1 = Initial Colour

ChoosePaletteColor

Shows the colour palette selector dialog to select a given palette colour

$R = ChoosePaletteColor($1)

$R = Result
$1 = Selection Color

ColorPaletteEntry

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

$R = ColorPaletteEntry($1)

$R = Result       
$1 = Palette Index

FitPanelToArea

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

FitPanelToArea($1,$2)

$1 = Target Panel
$2 = Margin

ForceRepaint

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

ForceRepaint

ForceRepaintPanel

Repaints the specified panel

ForceRepaintPanel($1)

$1 = Panel

GetPanelProperty

Read a property of a panel, specified using _panel_properties list

$R = GetPanelProperty($1,$2)

$R = Result
$1 = Panel
$2 = Property Label

GetSystemColorRGB

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

$R = GetSystemColorRGB($1)

$R = Result
$1 = Value

GetViewportScrollX

Get the x scroll of a viewport on a given panel

$R = GetViewportScrollX($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GetViewportScrollY

Get the y scroll of a viewport on a given panel

$R = GetViewportScrollY($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GetViewportZoom

Get the zoom factor of a viewport on a given panel

$R = GetViewportZoom($1,$2)

$R = Result
$1 = Panel With Viewport  
$2 = Panel Inside Viewport

GraphXOffset

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

$R = GraphXOffset($1,$2)

$R = Target
$1 = Table
$2 = Panel

GraphXWidth

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

$R = GraphXWidth($1,$2)

$R = Target
$1 = Table
$2 = Panel

HidePanel

Hides any popup for the given panel

HidePanel($1)

$1 = Target Panel

HideTableEditor

Close any open table editor for the given table

HideTableEditor($1)

$1 = Table

MakeVisible

Makes the specified panel the active panel on the main window

MakeVisible($1)

$1 = Target Subsystem

PanelWindowLeft

Returns the left window co-ordinate of a popup panel

$R = PanelWindowLeft($1)

$R = Result
$1 = Panel

PanelWindowTop

Returns the top window co-ordinate of a popup panel

$R = PanelWindowTop($1)

$R = Result
$1 = Panel

PrintPanel

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

PrintPanel($1)

$1 = Target Subsystem

ReFitPopup

Resize an already open popup to panel's changed size

ReFitPopup($1)

$1 = Panel

RepaintObjects

Initiates a repaint of dynamic object icons and the animation layer only; faster than a full force repaint and intended for animation. 'Panel' can be used to specify a viewport etc, if zero the current panel is used. If 'SpeedRegulate' is non zero, checks are performed to prevent successive repaints occurring faster than about 60 frames a second.

RepaintObjects($1,$2)

$1 = Panel
$2 = SpeedRegulate

RepaintView

Repaints contents of a view

RepaintView($1,$2,$3,$4)

$1 = Table
$2 = Panel
$3 = View Type
$4 = Index

SetActivityString

Sets text in the status bar activity area

SetActivityString($1)

$1 = Activity Text

SetColorPaletteEntry

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

SetColorPaletteEntry($1,$2)

$1 = Palette Index
$2 = RGB Value    

SetGraphXOffset

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

SetGraphXOffset($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetGraphXWidth

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

SetGraphXWidth($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetIconRemote

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

SetIconRemote($1,$2,$3)

$1 = Item ID
$2 = Location
$3 = Icon Name

SetObjectPos

Sets the position and scaling of a dynamic object in one operation. The position is the centre of the object and the scaling is a percentage which should normally be 100 for no scaling.

SetObjectPos($1,$2,$3,$4,$5)

$1 = Object
$2 = X Pos
$3 = Y Pos
$4 = X Scale
$5 = Y Scale

SetPanelColor

Sets the background color of a panel

SetPanelColor($1,$2)

$1 = Panel
$2 = Color

SetPanelProperty

Set a property of a panel, specified using _panel_properties list

SetPanelProperty($1,$2,$3)

$1 = Panel
$2 = Property Label
$3 = Value

SetPanelSize

Sets the panel area size. Useful when the panel is not configured to automatically size.

SetPanelSize($1,$2,$3)

$1 = Panel
$2 = Width
$3 = Height

SetPanelTransparency

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

SetPanelTransparency($1,$2)

$1 = Panel
$2 = Transparency

SetPortalIcon

Sets icon for portal's current state.

SetPortalIcon($1,$2)

$1 = Portal ID
$2 = Icon Name

SetPortalTip

Sets tip text for Portal to Text

SetPortalTip($1,$2)

$1 = Portal ID
$2 = Text

SetStatusItemAreaString

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

SetStatusItemAreaString($1)

$1 = Item Area Text

SetViewportScroll

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

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

$R = Panel With Viewport  
$1 = Panel Inside Viewport
$2 = X Offset
$3 = Y Offset

SetViewportTarget

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

SetViewportTarget($1,$2,$3)

$1 = Viewport or its Panel
$2 = Current Target (or 0)
$3 = New Target Panel

SetViewportZoom

Set the zoom factor of a viewport on a given panel

SetViewportZoom($R,$1,$2)

$R = Panel With Viewport  
$1 = Panel Inside Viewport
$2 = Zoom Value

SetWindowTitle

Sets the title of the main window

SetWindowTitle($1)

$1 = Title Text

ShowAboutBox

Shows the Planimate about box

ShowAboutBox()

ShowPopupPanel

Opens the given panel in a separate window at the specified window co-ordinates

ShowPopupPanel($1,$2,$3)

$1 = Target Panel
$2 = X Position
$3 = Y Position

ShowTableEditor

Open table editor for the given table

ShowTableEditor($1)

$1 = Table

SwapPopupPanel

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

SwapPopupPanel($1,$2)

$1 = Target Panel
$2 = Replace With

File

AcquireFileLock

Returns zero if file lock acquired, otherwise if target is text its text is set to the lock failure reason

$R = AcquireFileLock($1,$2)

$R = Result
$1 = File
$2 = New Lock Text

CopyFile

Copies file

$R = CopyFile($1,$2)

$R = Result
$1 = From
$2 = To

CreateFolder

Create folder, if create path set then upper levels created as well

$R = CreateFolder($1,$2)

$R = Result
$1 = File
$2 = Create Path

DeleteFile

Deletes file

$R = DeleteFile($1)

$R = Result
$1 = File

DeleteFolder

Deletes empty folder, if subfolders set then empty subfolders also deleted

$R = DeleteFolder($1,$2)

$R = Result
$1 = File
$2 = Subfolders

ExtractFileExtention

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

$R = ExtractFileExtention($1)

$R = Result   
$1 = Path/File

ExtractFileName

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

$R = ExtractFileName($1)

$R = Result   
$1 = Path/File

ExtractPathName

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

$R = ExtractPathName($1)

$R = Result   
$1 = Path/File

FileColumns

Number of columns in file or -1. Supports TAB or comma delimited data.

$R = FileColumns($1,$2)

$R = Result
$1 = File
$2 = Comma Delimit

FileLines

Number of lines in file or -1

$R = FileLines($1)

$R = Result
$1 = File

FilesInFolder

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

$R = FilesInFolder($1)

$R = Target List
$1 = Path/Wildcard  

FilesInHierarchy

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

$R = FilesInHierarchy($1)

$R = Target List
$1 = Path/File

FileSize

Returns size of file or -1 if not found

$R = FileSize($1)

$R = Result
$1 = File

FolderExists

Returns non zero if the specified directory folder exists.

$R = FolderExists($1)

$R = Result
$1 = Path

PlaySound

Play windows sound file. Will extract WAV files from DB if required.

PlaySound($1,$2)

$1 = Sound File
$2 = Wait Finish

ReadFromFile

Reads the reference from file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.

$R = ReadFromFile($1,$2,$3,$4,$5,$6,$7)

$R = Result
$1 = File
$2 = Data
$3 = Options
$4 = File Row
$5 = File Column
$6 = Row Limit
$7 = Column Limit

ReadViewFromFile

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

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

$R = Result
$1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options

ReleaseFileLock

Returns zero if file lock is released (it must be yours to release) otherwise if target is text its text is set to the lock failure reason

$R = ReleaseFileLock($1)

$R = Result
$1 = File

RenameFile

Renames file

$R = RenameFile($1,$2)

$R = Result
$1 = From
$2 = To

RunCommand

Runs a new process or opens a file via the shell

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

$R = Result
$1 = Command
$2 = Use shell
$3 = Minimised
$4 = Wait Complete
$5 = Keep Front

SaveImage

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

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

$R = Result
$1 = File
$2 = Panel
$3 = In-Memory

WriteToFile

Writes the reference to file. Data can be a direct reference or a data object label. Options can be a combination of values from the _fileoptions label list.

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

$R = Result
$1 = File
$2 = Data
$3 = Options

WriteViewToFile

Writes table view to file. The table reference can be direct or a data object. The options can be a combination of values from the _fileoptions label list.

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

$R = Result
$1 = File
$2 = Table
$3 = Panel
$4 = View Index
$5 = Options

Label

AddLabelDialog

Show a dialog so the user can add a label to the given label list

AddLabelDialog($R)

$R = Result

AddSubLabel

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

AddSubLabel($R,$1)

$R = Result
$1 = Label

ClearLabelList

Removes all labels from a label list

ClearLabelList($1)

$1 = Clear Label List

CreateLabelList

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

CreateLabelList($R,$1)

$R = Format Result
$1 = List Name

CreateLabelListFromColumn

Uses the provided column to provide text for creating a new label list

CreateLabelListFromColumn($R,$1)

$R = Target List  
$1 = Source Column

CreatePanelPortalLabel

Creates a panel label for the subsystem of the given portal object label

$R = CreatePanelPortalLabel($1)

$R = New Panel Label    
$1 = Portal Object Label

CreateSubLabelList

Creates an empty sub label list of an existing label list and formats an attribute to reference it

CreateSubLabelList($R,$1,$2)

$R = Format Result
$1 = List Name
$2 = Parent List

CreateSubsystemObjectLabel

Creates an object label for the portal owning the panel of this routine

$R = CreateSubsystemObjectLabel()

$R = New Object Label

DeleteLabel

Deletes the given label from its labellist

DeleteLabel($1)

$1 = Label

GetLabelListProperty

Retrieves a property of a label list

$R = GetLabelListProperty($1,$2)

$R = Result
$1 = LabelList
$2 = Property

LabelCount

Returns how many labels in the given label list

$R = LabelCount($1)

$R = Result
$1 = Label Count

MaxLabelIndex

Returns the highest allocated label index in the given label list

$R = MaxLabelIndex()

$R = Result

MinLabelIndex

Returns the lowest allocated label index in the given label list

$R = MinLabelIndex()

$R = Result

NextLabelIndex

The next allocated label index for the list or -1 if none

$R = NextLabelIndex($1)

$R = Result
$1 = Label Index

PrevLabelIndex

The previous allocated label index for the list or -1 if none

$R = PrevLabelIndex($1)

$R = Result
$1 = Label Index

RedirectLabelList

Globally changes all references to label list 'from' to point to list 'to'. Lists are referenced by name.

RedirectLabelList($1,$2)

$1 = From Name
$2 = To Name

ReIndexLabelList

Re-indexes all members in a label list so they have ascending and continuous index values

ReIndexLabelList($1)

$1 = Re-index Label List

ReIndexLabels

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

ReIndexLabels($1,$2,$3)

$1 = Re-index List    
$2 = From Values (Col)
$3 = To Values (Col)  

RemoveSubLabel

Removes the sublabel as a member of the sublabel list

RemoveSubLabel($1)

$1 = Label

SetLabelListProperty

Sets a property of a label list

SetLabelListProperty($1,$2,$3)

$1 = LabelList
$2 = Property
$3 = Value

TestLabelIndex

Tests whether an index has been used in a label list

$R = TestLabelIndex($1,$2)

$R = Result
$1 = Index Value
$2 = Label List

Label String

AppendToLabel

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

$R = AppendToLabel($1)

$R = Result
$1 = Source

CreateLabelAlias

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

$R = CreateLabelAlias($1,$2)

$R = Error Result
$1 = Text
$2 = Target Label

CreateMD5Hash

Uses the 3 text sources to create an unpredictable hash string

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

$R = Result
$1 = Text
$2 = Salt 1
$3 = Salt 2

CropToCharacters

Crop a label to a subset of its text

CropToCharacters($R,$1,$2)

$R = Result
$1 = From Char
$2 = To Char

ExtractIntoFormat

Extracts a substring from a formatted value/label and interprets it in the format of the target. If the target is a label list, it gets added as a label if its not already in that list.

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

$R = Result
$1 = Label
$2 = From Char
$3 = To Char

FileSHA

Creates 64 character checksum for file using SHA256. If text_file is 1 then the file is expected to be text and CR characters, if present, are ignored.

$R = FileSHA($1,$2)

$R = Result
$1 = File
$2 = TextFile

FormatIntoLabel

Create a new label with the formatted text of the source

FormatIntoLabel($R,$1)

$R = Result
$1 = Source

FormatIntoLabelIndex

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

$R = FormatIntoLabelIndex($1,$2)

$R = Result
$1 = Source
$2 = Index

FormatNameIntoLabel

Creates a label from the name of the given object

$R = FormatNameIntoLabel($1)

$R = Result
$1 = Source

FormattedLabelIndex

Determines if the source text is a label and returns its index if it is

$R = FormattedLabelIndex($1)

$R = Result
$1 = Source

FormattedWidth

Returns how many characters the referenced data has when it is formatted for display

$R = FormattedWidth($1)

$R = Target
$1 = Width Of

FormatTitleIntoLabel

Creates a label from the title text of the given object

$R = FormatTitleIntoLabel($1)

$R = Result
$1 = Source

GetAppDataName

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

$R = GetAppDataName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

GetCharacter

Extracts a character from the formatted value provided and returns the ascii code

$R = GetCharacter($1,$2)

$R = Target   
$1 = String
$2 = Character

GetMyDocumentsName

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

$R = GetMyDocumentsName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

GetProgramName

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

$R = GetProgramName($1)

$R = Result
$1 = Filename

GetSharedAppDataName

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

$R = GetSharedAppDataName($1,$2)

$R = Result
$1 = Folder
$2 = Filename

LogMessage

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

LogMessage($1)

$1 = Text

RemapName

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

$R = RemapName($1)

$R = Result
$1 = Source Text

RemoveFileExtention

Crop label to remove trailing dot and text

RemoveFileExtention($R)

$R = Result

RenameLabel

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

$R = RenameLabel($1)

$R = Result
$1 = Source

RenameObject

Sets the display name of an object. The name may be adjusted if it is not unique on the panel for that kind of object.

RenameObject($1,$2)

$1 = Object
$2 = New Name

SetFreeTextTitle

Sets title of free text editor dialog

SetFreeTextTitle($1)

$1 = Title Text

Logical

BitAND

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

$R = BitAND($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

BitOR

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

$R = BitOR($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

BitXOR

Treat values as integers and bitwise XORs them (limited to 14 bits of precision)

$R = BitXOR($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

EQ ( == )

Determines if 2 values are numerically close to each other

$R = $1 == $2

$R = Result
$1 = Value 1
$2 = Value 2

GE ( >= )

Determines if the first value is greater than or equal to the second

$R = $1 >= $2

$R = Result
$1 = Value 1
$2 = Value 2

GT ( > )

Determines if the first value is significantly greater than the second value

$R = $1 > $2

$R = Result
$1 = Value 1
$2 = Value 2

LE ( <= )

Determines if the first value is less than or equal to the second

$R = $1 <= $2

$R = Result
$1 = Value 1
$2 = Value 2

LT ( < )

Determines if the first value is significantly less than the second value

$R = $1 < $2

$R = Result
$1 = Value 1
$2 = Value 2

NEQ ( != )

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

$R = $1 != $2

$R = Result
$1 = Value 1
$2 = Value 2

Message

Broadcast

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

Broadcast($1,$2)

$1 = Broadcast Index
$2 = Broadcast Options

BroadcastLocal

Sends the broadcast scoped to the portal containing the object sending it, with item attributes. The broadcast is initiated immediately.

BroadcastLocal($1)

$1 = Broadcast

BroadcastScoped

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

BroadcastScoped($1,$2,$3)

$1 = Broadcast Index
$2 = Broadcast Options
$3 = Send To Subsystem

BroadcastToPanel

Sends a broadcast to a specified dynamic panel. Options can be 0 or a combination of values from the Broadcast Options label list.

BroadcastToPanel($1,$2,$3)

$1 = Broadcast Index
$2 = Broadcast Options
$3 = Send To Subsystem

ImmediateMessage

Send a message whilst the item waits at the change object

ImmediateMessage($1)

$1 = Message Target

ImmediateMessageNamed

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

ImmediateMessageNamed($1,$2)

$1 = Message Target
$2 = Message Name   

ReleaseWaitingItem

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

$R = ReleaseWaitingItem($1,$2)

$R = Result
$1 = Item Index
$2 = Scope Panel

ReverseItemDirection

Searches spatial links for the item and if found, reverses the direction of the item

$R = ReverseItemDirection($1,$2)

$R = Result
$1 = Item Index
$2 = Scope Panel

Numeric

abs

Magnitude of a value, without the sign

$R = abs($1)

$R = Result
$1 = Value 1

Convolve

Performs a convolution between two columns into a preallocated result column. This is useful for combining distributions.”

Convolve($R,$1,$2)

$R = Result
$1 = Column 1
$2 = Column 2

fmod

Floating point modulus of $1 over base $2

$R = fmod($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

max

Determines the greater of 2 values

$R = max($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

min

Determines the lesser of 2 values

$R = min($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

mod

Integer modulus of $1 over base $2

$R = mod($1,$2)

$R = Result
$1 = Value 1
$2 = Value 2

Normalise

Rescales data in column so they add up to 1

Normalise($1)

$1 = Column

random

Random value between 0 and 1

$R = random($F)

$R = Result
$F = Set to

round

Integer closest to the value

$R = round($1)

$R = Result
$1 = Round Value

RoundToN

Round value to the specified number of digits of precision

$R = RoundToN($1,$2)

$R = Result
$1 = Round Value
$2 = Sig. Digits

trunc

Integer equal or lower than the value

$R = trunc($1)

$R = Result
$1 = Truncate

Paint

BlendColors

Returns the resulting colour (always opaque) you would get if a black surface was painted with Color1 then Color2.

$R = BlendColors($1,$2)

$R = Result
$1 = Color1
$2 = Color2

CopyPaintObject

Enables a paint object to be copied

$R = CopyPaintObject($1,$2)

$R = New Paint Label       
$1 = Original Paint Label
$2 = Destination Panel   

CopyPaintProperties

Copies the graphical properties between paint objects

CopyPaintProperties($1,$2)

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

CreateTiles

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

$R = CreateTiles($1,$2,$3,$4)

$R = Result
$1 = Image File
$2 = Tile Set
$3 = MaxZoom
$4 = Margin Colour

DeleteAllPaintObjects

Delete all paint objects on the given panel

DeleteAllPaintObject($1)

$1 = Target Panel

DeleteInheritedPaintObjects

Removes all paint objects which inherit from a given panel

DeleteInheritedPaintObjects($1,$2)

$1 = Target Pane     
$2 = Un Inherit Panel

DeletePaintObject

Deletes a paint object

DeletePaintObject($1,$2)

$1 = Paint Label   
$2 = With Inherited

FitPaint

Fits a paint object to its contents.

FitPaint($1)

$1 = Paint ID

GetPaintProperty

Read a property of a paint object

$R = GetPaintProperty($1,$2)

$R = Result
$1 = Paint Object Label
$2 = Property Label    

InheritPaintObjects

Enables a panel to be populated with paint objects from another panel

InheritPaintObjects($1,$2)

$1 = Target Panel      
$2 = Inherit From Panel

InterpolateColor

Interpolates an RGB color between color1 and color2 based on ratio (0.0 gives color1, 1.0 gives color2)

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

$R = Result
$1 = Color1
$2 = Color2
$3 = Ratio

LinkPaintObjects

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

LinkPaintObjects($1,$2,$3,$4,$5,$6,$7)

$1 = Parent
$2 = Linked
$3 = Parent Edge
$4 = Linked Edge
$5 = Offset X
$6 = Offset Y
$7 = Options

LongLatToXY

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

LongLatToXY($1,$2)

$1 = Paint Map Label
$2 = Table

MakeRangeVisible

Adjusts the map co-ordinates to make the range of co-ordinates visible regardless of the map view's aspect ratio

MakeRangeVisible($1,$2,$3,$4,$5)

$1 = Paint Map Label
$2 = Long From
$3 = Lat From
$4 = Long To
$5 = Lat To

PositionPaintObject

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

PositionPaintObject($1,$2,$3,$4,$5,$6)

$1 = Parent
$2 = Paint
$3 = Parent Edge
$4 = Paint Edge
$5 = Offset X
$6 = Offset Y

RepaintPaintObject

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

RepaintPaintObject($1,$2)

$1 = Paint Label   
$2 = Clear Color

ScaleColor

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

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

$R = Result
$1 = Color
$2 = Scale
$3 = Offset

SetLongLatXY

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

SetLongLatXY($1,$2,$3,$4,$5)

$1 = Paint Map Label
$2 = Longitude
$3 = Latitude
$4 = X
$5 = Y

SetNoteVisible

Shows or hides an RTF note

SetNoteVisible($1,$2)

$1 = Paint Object Label
$2 = Visibility        

SetPaintImage

Sets the image of a paint object

SetPaintImage($1,$2,$3)

$1 = Paint Object Label
$2 = Set Image To
$3 = All States

SetPaintProperty

Set a property of a paint object directly

SetPaintProperty($1,$2,$3)

$1 = Paint Object Label
$2 = Property Label    
$3 = Property Value    

SetPaintText

Sets the text of a paint object

SetPaintText($1,$2,$3)

$1 = Paint Object Label
$2 = Set Text/File To  
$3 = For All States    

SetPaintTip

Sets the tool tip text of a paint object

SetPaintTip($1,$2,$3)

$1 = Paint Object Label
$2 = Set Tip To  
$3 = For All States    

SetPaintXY

Moves a paint object so a given edge/corner is at (X,Y). Edge=1..9 (1=topleft, 2=topcenter, 5=center, 7=bottomleft etc.)

SetPaintXY($1,$2,$3,$4)

$1 = Paint Object Label
$2 = X Pos
$3 = Y Pos
$4 = Edge

SetTransparency

Sets the transparency (alpha) value of a colour

$R = SetTransparency($1,$2)

$R = Result
$1 = Color
$2 = Transparency

XYToLongLat

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

XYToLongLat($1,$2)

$1 = Paint Map Label
$2 = Table

Pipe

AddPipe

Creates a pipe between From and To if one doesn't exist and allocates an object label for the new pipe, which is returned. If Copy Pipe is a valid pipe object label then its properties are copied.

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

$R = New Pipe
$1 = From
$2 = To
$3 = Copy Pipe

RemovePipe

Removes any pipe between portals From and To (non directional). If From is a pipe label then it is used and To is ignored.

RemovePipe($1,$2)

$1 = From
$2 = To

Route

AddStaticRoute

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

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

$R = Result
$1 = Name
$2 = Route ID
$3 = Starting Cell
$4 = Step Count
$5 = Fill Steps

AddTrack

Creates a track between From and To if one doesn't exist and an object label is created and returned for the new track section.

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

$R = New Track
$1 = From
$2 = To
$3 = Track Type

AssignRoute

Sets an item's track route from a route table

AssignRoute($1)

$1 = Timetable Source

AssignRouteFrom

Sets an item's track route from locations specified by cells working down from start, stopping when either count is reached or a zero cell. Returns 0 if no error.

$R = AssignRouteFrom($1,$2)

$R = Result
$1 = Starting Cell
$2 = Step Count

CancelLoopEntryDelay

Cancels a loop entry delay which is initiated for any item that may dwell at a location and is normally cancelled only if the item leaves the location immediately. This enables just a loop exit delay to occur without an associated loop entry delay.

CancelLoopEntryDelay()

ClearRoute

Clear an item's routing database

ClearRoute()

ClearTrailList

Clears a train's history of sections it has traversed

ClearTrailList()

CreateRoute

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

$R = CreateRoute($1,$2)

$R = Result
$1 = From
$2 = To

EnableTrackCheckNext

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

EnableTrackCheckNext()

FillRouteSteps

Fills in all intermediate portals in an item's track route. Returns non zero on error in which case s.FillRouteError is set to a description

$R = FillRouteSteps()

$R = Result

GenerateTrackTable

Updates the Track Network Details table for the panel inside portal Location. This can change the rows in the track table. Result is non zero if an error occured.

$R = GenerateTrackTable($1)

$R = Result
$1 = Location

HoldSectionRoad

Places the road of a track section into waiting for an item state, preventing any other item using it. If Item ID is >= 0 it is used for the item ID otherwise the current item is used. Item Object is used to locate the item if Item ID is set.

HoldSectionRoad($1,$2,$3,$4)

$1 = SectionID
$2 = Road#
$3 = Item ID
$4 = Item Object

InsertRouteStep

Insert a track route step into an item's internal routing database

InsertRouteStep($1,$2)

$1 = Route Step
$2 = Route Location

ListBlockedTrains

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

ListBlockedTrains($1)

$1 = Table

PolyPathFinder

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

$R = PolyPathFinder($1,$2,$3,$4,$5,$6,$7)

$R = Result
$1 = StartX
$2 = StartY
$3 = EndX
$4 = EndY
$5 = PolyPoints
$6 = WayPoints
$7 = UsingLongLat

ReadRoute

Reads an item's track route into a table

ReadRoute($R)

$R = Timetable Target

RegisterBlockedTrain

Register the item (train) into the track blocked list

RegisterBlockedTrain()

RemoveStaticRoute

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

RemoveStaticRoute($1)

$1 = Route ID

RemoveTrack

Removes any track between portals From and To. If From is a track label then it is used and To is ignored.

RemoveTrack($1,$2)

$1 = From
$2 = To

ResetLoopDelayTime

Resets the loop entry time for an item, useful for enabling some time to be spent in a track location without a loop exit delay being triggered. This does not affect any loop entry delay under way, it will complete at its scheduled time.

ResetLoopDelayTime()

RoadsInTrackSection

Returns how many roads a given track section has been configured for

$R = RoadsInTrackSection($1)

$R = Target
$1 = Section

SectionRoadAvail

Returns where a track section road is available for an item/train to use

$R = SectionRoadAvail($1,$2)

$R = Result
$1 = SectionID
$2 = Road#

SectionRoadTrain

Returns item ID of train in a track section road or -1 if no item

$R = SectionRoadTrain($1,$2)

$R = Result
$1 = SectionID
$2 = Road#

SetPreviousTailData

Enables taildata to be set for a road/length multiserver that a train has just left. This is useful when taildata information is not known until the front of the train leaves the road/multiserver. WhichData is 1..4 (TailData1..TailData4).

SetPreviousTailData($1,$2)

$1 = WhichData
$2 = Value

SetRoadCheckFilter

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

SetRoadCheckFilter($1)

$1 = Start Cell

SetRoadColor

Sets color of road in track section

SetRoadColor($1,$2,$3)

$1 = SectionID
$2 = Road#
$3 = Color     

TrackSectionType

Returns the type of a track section (_section_types label list)

$R = TrackSectionType($1)

$R = Target
$1 = Section

UnblockTrain

Attempt unblock of specific train id or all blocked trains if id is 0

UnblockTrain($1)

$1 = Item ID

UpdateLoopEntryDelay

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

UpdateLoopEntryDelay($1)

$1 = Loop Delay

Row/Column

Average

Determines the average of values in a row or column

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

$R = Result
$1 = Average of
$2 = From
$3 = To

MaxIndex

Determines the index of the highest value in a row or column

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

$R = Result
$1 = Max of
$2 = From
$3 = To

MinIndex

Determines the index of the lowest value in a row or column

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

$R = Result
$1 = Min of
$2 = From
$3 = To

StdDev

Determines the Standard Deviation of values in a row or column

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

$R = Result
$1 = StdDev of
$2 = From
$3 = To

Sum

Determines the sum of values in a row or column

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

$R = Result
$1 = Sum of
$2 = From
$3 = To

SumSquared

Determines the sum of squares of values in a row or column

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

$R = Result
$1 = Sum/Sqr of
$2 = From
$3 = To

Scientific

arccos

Inverse cosine function, returns radians

$R = arccos($1)

$R = Result
$1 = Value

arcsin

Inverse sine function, returns radians

$R = arcsin($1)

$R = Result
$1 = Value

arctan

Inverse tan function, returns radians

$R = arctan($1)

$R = Result
$1 = Value

atan2

Determines angle (in radians) given x and y displacement

$R = atan2($1,$2)

$R = Result
$1 = Numerator (Y)
$2 = Denominator (X)

cos

Cosine function, value in radians

$R = cos($1)

$R = Result
$1 = Value

DegToRad

Converts degrees to radians

$R = DegToRad($1)

$R = Result
$1 = Value

exp

Calculates $1 to the power of E

$R = exp($1)

$R = Result
$1 = Value

hypot

Hypotenuse of right angled triangle with given sides

$R = hypot($1,$2)

$R = Result
$1 = X Value
$2 = Y Value

log10

Calculates the decimal logarithm of the value

$R = log10($1)

$R = Result
$1 = Value

logN

Calculates the natural logarithm of the value

$R = logN($1)

$R = Result
$1 = Value

pow

Calculates $1 to the power of $2

$R = pow($1,$2)

$R = Result
$1 = Value
$2 = Power

RadToDeg

Converts radians to degrees

$R = RadToDeg($1)

$R = Result
$1 = Value

sin

Sine function, value in radians

$R = sin($1)

$R = Result
$1 = Value

sqr

Value multiplied by itself

$R = sqr($1)

$R = Result
$1 = Value

sqrt

Square root of value

$R = sqrt($1)

$R = Result
$1 = Value

tan

Tan function, value in radians

$R = tan($1)

$R = Result
$1 = Value

Spatial Link

AddBendPoint

Adds a bend point to a spatial link between the two objects specified

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

$R = From Object
$1 = To Object
$2 = X Position
$3 = Y Position

AddDirectionalLink

Adds a spatial link between objects which can only be traversed in the forward direction

$R = AddDirectionalLink($1,$2)

$R = Link ID
$1 = From Object
$2 = To Object

AddLink

Add a spatial link between the two objects labels specified

$R = AddLink($1,$2)

$R = Link ID
$1 = From Object
$2 = To Object

ClearLinkCache

Instructs Planimate to update spatial link information after links are created or objects are moved

ClearLinkCache()

CopyLink

Creates a spatial link between objects, copying an existing link's properties

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

$R = Link ID
$1 = From Object
$2 = To Object
$3 = Copy Link

DeletePanelLinks

Deletes all spatial links on a given panel

DeletePanelLinks($1)

$1 = Panel

GetBendPoints

Reads bend points into table Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.

GetBendPoints($1,$2,$3)

$1 = Bend Table
$2 = Panel
$3 = Link Type

GetNextLinkObject

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

$R = GetNextLinkObject($1,$2)

$R = Location
$1 = From Portal
$2 = To Portal

LinkDistance

Determine the spatial link travel distance between 2 portals.

$R = LinkDistance($1,$2)

$R = Distance
$1 = From
$2 = To

QueryLinkItems

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

QueryLinkItems($1,$2)

$1 = Table
$2 = Link

RemoveLink

Removes any spatial links from and to the specified object labels (directional)

RemoveLink($1,$2)

$1 = From Object
$2 = To Object

SetBendPoints

Deletes all bend points and recreates them from the Bend Table. Link Type determines the type of link acted on. Bend Table Columns: from, to, x, y. Link Type: from _link_types label list.

SetBendPoints($1,$2,$3)

$1 = Bend Table
$2 = Panel
$3 = Link Type

SetItemLinkTarget

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

SetItemLinkTarget($1,$2,$3)

$1 = Target Object
$2 = Total Time
$3 = Road

SetItemLinkTime

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

SetItemLinkTime($1)

$1 = To Time

SetLinkColor

Sets the color of a spatial link between 2 given objects

SetLinkColor($1,$2,$3,$4)

$1 = From Object
$2 = To Object
$3 = Color     
$4 = Road

SetLinkCost

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

SetLinkCost($1,$2,$3)

$1 = From Object
$2 = To Object
$3 = Cost      

SetLinkRoads

Sets the number of roads and road spacing for a spatial link.

SetLinkRoads($1,$2,$3,$4)

$1 = From Object
$2 = To Object
$3 = Roads
$4 = Spacing

SetLinkWidth

Sets the width of a spatial link between two objects

SetLinkWidth($1,$2,$3)

$1 = From Object
$2 = To Object
$3 = Width     

UpdateLinkItems

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

UpdateLinkItems($1,$2)

$1 = Table
$2 = Link

Special

---| Only During Move |---

Enables the modeller to specifically mark that the following routine lines do not execute during lookahead

 Only During Move |---||----- Following Only During Move -----|

Beep

Plays a tone through the sound card, Frequency in Hz, Duration in milliseconds

Beep($1,$2)

$1 = Frequency
$2 = Duration

BREAKPOINTIF

If the parameter is true, this interrupts the routine and displays a debugging dialog enabling inspection of the models state

BREAKPOINTIF ($1)

$1 = Enable Break

BrowseKey

Give user chance to browse for another key. Returns non zero if a different key was selected which is acceptable.

$R = BrowseKey()

$R = Result

CallRoutine

Calls a subroutine

CallRoutine($F)

$F = Call

CLRDelete

Deletes a managed object created by New().

CLRDelete($1)

$1 = Handle

CLRGetProperty

Enables reading a dynamically named property of a managed class.

$R = CLRGetProperty($1,$2)

$R = Target
$1 = Handle
$2 = Name

CLRNew

Creates a new instance of a managed object. Requires result be an Instance formatted attribute.

$R = CLRNew($1)

$R = Target
$1 = DLLClass

CLRSetOwner

Sets owning window of a class, can specify a paint object or 0 to use current panel.

CLRSetOwner($1,$2)

$1 = Handle
$2 = PaintID

CLRSetProperty

Enables setting a dynamically named property of a managed class

CLRSetProperty($1,$2,$3)

$1 = Handle
$2 = Name
$3 = Value

Comment (//)

A comment line

Comment

CopyFont

Copies the font properties between cells and columns

CopyFont($R,$1)

$R = Format Result
$1 = Format From

CopyFormat

Copies the format/unit type/label reference between cells, columns and attributes

CopyFormat($R,$1)

$R = Format Result
$1 = Format From

CopyPortal

Makes a copy of a portal and places it on Panel. If the name text is not “-” or an empty string, the new portal uses that name.

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

$R = New Portal
$1 = Original Portal
$2 = New Panel
$3 = X
$4 = Y
$5 = New Name

DescribeRoutineData

Describe the data accessed by a change object routine

DescribeRoutineData($1,$2,$3)

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

DragGanttBlock

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

$R = DragGanttBlock($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Panel
$3 = Drag Type
$4 = Start Row
$5 = End Row
$6 = Min Time
$7 = Max Time
$8 = Increment

EncodeARGB

Encodes alpha, red, green and blue components (0..255) into a single 4 byte value used to specify any color/transparency in Planimate.

$R = EncodeARGB($1,$2,$3,$4)

$R = Result
$1 = Alpha Value
$2 = Red Value
$3 = Green Value
$4 = Blue Value

EncodeRGB

Encodes red, green and blue components (0..255) into a single 4 byte value used to specify any color in Planimate. The top byte of the value (alpha) is set to 255.

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

$R = Result
$1 = Red Value
$2 = Green Value
$3 = Blue Value

FollowItemRemote

Searches spatial links for the item and if found, sets the 'followitem property.

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

$R = Result
$1 = Item Index
$2 = Scope Panel
$3 = Follow State

FormatForList

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

FormatForList($R,$1)

$R = Format Result
$1 = List Name

GanttPopup

Pops up the default gantt popup window as if a gantt block was clicked. This is useful when processing a gantt click broadcast. (x/y) are panel co-ordinates as read from the mouse. Returns non zero on success or zero if there wasn't a gantt block under the co-ordinates supplied.

$R = GanttPopup($1,$2,$3,$4)

$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y

GetFormat

Returns the value format of the data

$R = GetFormat($1)

$R = Result
$1 = Data To Test

GetFormatListName

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

GetFormatListName($R,$1)

$R = Result
$1 = Data To Test

InfoPanelRemote

Searches spatial links for the item and if found, sets the s.ItemShowInfoPanel property.

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

$R = Result
$1 = Item Info
$2 = Scope Panel
$3 = Show State

ListRoutineCode

Write a change object routine code to a file

ListRoutineCode($1,$2,$3)

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

LoadDataSet2

Load a version 2 dataset

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

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

LoadedAssemblies

Display Loaded Assemblies dialog for debugging.

LoadedAssemblies()

LoadModel

Stops current run and loads another model. For PBA, the PBA is reloaded regardless of name.

LoadModel($1)

$1 = Model Name

ObjectType

Returns the type of the object that the object label refers to

$R = ObjectType($1)

$R = Result
$1 = Object

OpenRoutineWindow

Opens/closes the current routine window depending on command.

OpenRoutineWindow($1)

$1 = Command

QueryNetwork

Sets table to rows describing every link on Panel between portals (track,spatial,pipe). 4 columns are required; From, To, Type and ID. From and To are the object Ids of the portals at the end points. Type is the type of link and is formatted to the “_link_type” label list. ID is the object id of the link.

QueryNetwork($1,$2)

$1 = Table
$2 = Panel

RealTimeCallBack

This will schedule a _Real Time Tick broadcast at a given real interval, in milliseconds. Note that any previous event is cancelled when this is re-invoked. Interval can be between 10 and 5000ms.

RealTimeCallBack($1,$2)

$1 = Interval (ms)
$2 = Scope Panel

RemovePortal

Deletes the portal and its contents from the model

RemovePortal($1)

$1 = Portal ID

SaveDataSet2

Save a version 2 dataset

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

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

SetDirectory

Sets the working directory for the model. Use only for compiled applications. Returns non zero on failure

$R = SetDirectory($1)

$R = Result
$1 = Path

SetFormat

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

SetFormat($1,$2,$3)

$1 = Data To Set
$2 = Format
$3 = List Name

SetLastDatasetFile

Sets the last dataset filename, optionally visible in the titlebar. A relative filename will have a full path created as would be used in a file operation with the name.

SetLastDatasetFile($1)

$1 = Name

ShowHelp

Open a HTML help window. Help File can be empty for default.

ShowHelp($1,$2)

$1 = Help File
$2 = Section

SignFile

Digitally signs a file.

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

$R = Result
$1 = File Name
$2 = Cert
$3 = Password
$4 = Subject
$5 = Time Server

StartScheduledEntries

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

StartScheduledEntries

UserKeyBrowse

Presents a dialog enabling the user to either paste an application license or browse to a license file. On success in either case the license text is returned. You can specify a default filename and browse directory.

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

$R = License Text
$1 = FileName
$2 = BrowseFolder
$3 = AppName

UserKeyLoadFile

Attempts to load a user license key from a file, returns zero on success.

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

$R = Target
$1 = File Name
$2 = Password
$3 = PublicKey

UserKeyLoadText

Attempts to load a user license key from the supplied text, returns zero on success.

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

$R = Target
$1 = Key Text
$2 = Password
$3 = PublicKey

UserKeyLookup

Looks up a setting in a loaded key file. Returns -1 on error or empty string if LHS is text.

$R = UserKeyLookup($1)

$R = Value
$1 = Name

WatchListAdd

Add portal, routine or item attribute to watch list for debugging

WatchListAdd($1)

$1 = Attribute

WatchListRemove

Remove portal, routine or item attribute from watch list

WatchListRemove($1)

$1 = Attribute

String

GetNoteRTF

Retrieves RTF text of note

$R = GetNoteRTF($1)

$R = String
$1 = Paint ID

GetNoteText

Retrieves plain text of note

$R = GetNoteText($1)

$R = String
$1 = Paint ID

SetNoteRTF

Sets RTF text of note

SetNoteRTF($1,$2)

$1 = Paint ID
$2 = Text

SetNoteText

Sets plain text of note

SetNoteText($1,$2)

$1 = Paint ID
$2 = Text

SetText ( $= )

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

$R $= $1

$R = Result
$1 = Set To

Table

AddTable

Adds table to panel, returning data object label. If a table with that name already exists, 0 is returned.

$R = AddTable($1,$2)

$R = Result
$1 = Panel
$2 = Name

AdvancedSort

Performs a sort on a table using another table to define the sort criteria, the sort info table should have columns for column, asc/desc,num/alpha and optionally filter if you intend to use row filtering. ColumnAsText interprets and matches entries in column 1 textually instead of numerically.

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

$R = Target   
$1 = Sort Info
$2 = Filter
$3 = ColumnAsText

AllocateTableRowMemory

Enables memory to be reserved for a table which is expected to grow to a large number of rows

AllocateTableRowMemory($R,$1)

$R = Target Table
$1 = Allocate Rows

AppendColumn

Append a column to a table

AppendColumn($R,$1)

$R = Target
$1 = Col Count

AppendRow

Append a row to the table

AppendRow($R,$1)

$R = Target
$1 = Row Count

BinarySearch

Perform a binary search over the range First Index to Last Index. Assumes the data compared is sorted ascending and the comparison is for equality. Multiple comparisons can be combined only with AND. Returns 1 + last index or 0 if Zero On Fail is set.

$R = BinarySearch($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

BlockMove

Block copy a range of cells to another table

BlockMove($R,$1,Range[$2][$3])

$R = Result
$1 = Source
$2 = # of Rows
$3 = # of Cols

CheckTableSorted

Determines if a table is sorted by the sort criteria. Return 0 if OK or the first unsorted row number. This can be more efficient than calling Sort which is very slow if the table is already sorted.

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

$R = Result
$1 = Table
$2 = Column 1
$3 = Column 2
$4 = Column 3
$5 = Column 4

CompareTables

Compares rows in tables, returns row number of first difference. Only numerical values are compared, not Text strings.

$R = CompareTables($1,$2)

$R = Result
$1 = Table 1
$2 = Table 2

CopyTable

Replaces all data columns in the target table so it is a copy of Original.

$R = CopyTable($1)

$R = Target
$1 = Original Table

CopyToClipboard

Copy table to clipboard using its clipboard settings and the option modifiers

CopyToClipboard($R,$1)

$R = From Table
$1 = Options

CountIFMatch

Counts rows where Match Column matches Match Key

$R = CountIFMatch($1,$2)

$R = Result
$1 = Match Column
$2 = Match Key

CreateSortIndex

Creates an ordered list of row numbers if the given column was sorted alphabetically

CreateSortIndex($R,$1)

$R = Target Column
$1 = Column To Sort

DeleteColumn

Delete a range of columns from a table

DeleteColumn($R,$1,$2)

$R = Target Table
$1 = First Col
$2 = Col Count

DeleteRow

Delete a number of rows starting at a given row in a table

DeleteRow($R,$1,$2)

$R = Target Table
$1 = First Row
$2 = Row Count

EnableColumnEditing

Controls whether a given table column can be edited

EnableColumnEditing($R,$1)

$R = Target Column
$1 = Edit Control

FindColumnLabel

Searches columns in table $1 for one with a label which matches formatted $2 and returns the index or 0 if none found

$R = FindColumnLabel($1,$2)

$R = Result
$1 = Table
$2 = Find String

FindColumnTitle

Searches columns in table $1 for one with a title which matches formatted $2 and returns the index or 0 if none found

$R = FindColumnTitle($1,$2)

$R = Result
$1 = Table
$2 = Find String

FindDuplicates

Finds duplicated rows in Table, storing the duplicate row number pairs in the first two columns of table Duplicates. Existing rows in Duplicates are removed. Only values are compared, not text.

FindDuplicates($R,$1)

$R = Duplicates
$1 = Table

GenerateUnique

First column of the target table is set to a unique subset of the passed column. Text or numbers are supported, with the target column being reformatted if required. If the target does not contain a column, it is created. The output column is sorted using natural ordering.

$R = GenerateUnique($1)

$R = Result
$1 = Column

GetCellBackgroundColor

Returns ARGB or index value for a cell's background color. Will be null index (255) if not set for the cell

$R = GetCellBackgroundColor($1)

$R = Result
$1 = Table Cell

GetCellTextColor

Returns ARGB or index value for a cell's text color. Will be null index (255) if not set for the cell

$R = GetCellTextColor($1)

$R = Result
$1 = Table Cell

GetColSecondTitle

Sets the target to a label of the second title row for the given column

GetColumnSecondTitle($R,$1)

$R = Result
$1 = Column

GetColumnProperty

Read a property of a table column

$R = GetColumnProperty($1,$2)

$R = Result
$1 = Table Column
$2 = Property Label    

GetColumnTip

Sets the target (text or label) to the tip text for the given column

GetColumnTip($R,$1)

$R = Result
$1 = Column

ImportFromClipboard

Performs import of table data/structure from clipboard as available in the table editor

$R = ImportFromClipboard($1,$2)

$R = Result
$1 = Target Table
$2 = Configure   

InsertColumn

Insert columns into a table with the option of copying formatting from another column

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

$R = Target Table
$1 = Insert Pos.
$2 = Col Count
$3 = Copy Format

InsertRow

Insert a number of rows at a given row in a table

InsertRow($R,$1,$2)

$R = Target Table
$1 = Insert Pos.
$2 = Row Count

MatchMultipleKeys

Searches table from the top for the first instance where the given columns have the given values. Returns row number or 0 if no match. Column 3 may be zero for a 2 column search.

$R = MatchMultipleKeys($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Start Row
$3 = Column 1
$4 = Match 1
$5 = Column 2
$6 = Match 2
$7 = Column 3
$8 = Match 3

MaxIndexIFMatch

Returns first row with maximum Data Column value for rows where Match Column matches Match Key. Returns 0 if no rows match.

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

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

MinIndexIFMatch

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

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

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

OutOfScopeWrite

Enable writing to item table reference $1 even if it is not in scope

OutOfScopeWrite($1)

$1 = Item Table Ref

PositionLastRow

Intended for use after a single row has been appended to an already-sorted table, this will efficiently move that last row to the position to maintain the sort. Table must already be sorted by the sort criteria.

PositionLastRow($R,$1,$2,$3,$4)

$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4

PurgeDuplicateRows

Removes any identical rows from the given table. Text formatted columns are not compared and should not be present in the table in cases of 100k or more rows for performance reasons.

PurgeDuplicateRows($R)

$R = Target

ReverseSearch

Decrement the result attribute from first to last until the condition is true. If the search fails, returns last_index-1 or 0 if the Zero On Fail option is non zero.

$R = ReverseSearch($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

Search

Increment the result attribute from first to last until the condition is true. If the search fails, returns 1+last_index or 0 if the Zero On Fail option is non zero.

$R = Search($F,$1,$2,$3)

$R = Result
$1 = First Index
$2 = Last Index
$3 = Zero On Fail
$F = Condition

SetCellBackgroundColor

Sets the background color for the cell.

SetCellBackgroundColor($1,$2)

$1 = Table Cell
$2 = Color Value

SetCellFreeText

Sets the free text (not bound by label text rules) for a table cell

SetCellFreeText($R,$1)

$R = Target Cell
$1 = Source Cell

SetCellTextColor

Sets the text color for the cell

SetCellTextColor($1,$2)

$1 = Table Cell
$2 = Color Value

SetColAlignment

Enables a column's text alignment to be changed

SetColumnAlignment($R,$1)

$R = Target Column
$1 = Align Mode   

SetColSecondTitle

Sets the text of the second title row for the given column

SetColumnSecondTitle($R,$1)

$R = Target Column
$1 = Title Text

SetColTitle

Set the title text of a table column

SetColumnTitle($R,$1)

$R = Target Column
$1 = Title Text

SetColTupleName

Sets the name used to internally identify a column

SetColumnTupleName($R,$1)

$R = Target Column
$1 = Tuple Text

SetColumnProperty

Set a property of a table column

SetColumnProperty($1,$2,$3)

$1 = Table Column
$2 = Property Label    
$3 = Property Value    

SetColumnTip

Sets the tool tip of a table column

SetColumnTip($R,$1)

$R = Column
$1 = Tip Text

SetColWidth

Sets the formatting width of a table column

SetColWidth($R,$1)

$R = Target Column
$1 = Column Width

SetTableRowHeight

Sets the height of table rows

SetTableRowHeight($1,$2)

$1 = Target Table
$2 = Row Height

SetTableTitle

Set the title text of the table from the label

SetTableTitle($R,$1)

$R = Target Table
$1 = Title Text

ShiftCol

Shift the columns in a table

ShiftColumn($R,$1,$2)

$R = Result
$1 = Source
$2 = Shift <+ ->

ShiftRow

Shift the rows in a table

ShiftRow($R,$1,$2)

$R = Result
$1 = Source
$2 = Shift ^+ -v

Sort

Sort table by up to 4 columns. If the column index is -ve, it reverses the sort order for that column.

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

$R = Target
$1 = Column 1
$2 = Column 2
$3 = Column 3
$4 = Column 4

SumIFMatch

Sums values in Data Column for rows where Match Column matches Match Key

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

$R = Result
$1 = Match Column
$2 = Match Key
$3 = Data Column

TableReferenceSet

Returns non zero if the reference resolves to a table

$R = TableReferenceSet($1)

$R = Result
$1 = Item Table Ref

TableSortDialog

Enables the user to set up and perform a sort using the table sort dialog

TableSortDialog($R)

$R = Target

UpdateColumnRefs

Re-initialises column labels for references to a table

UpdateColumnRefs($1)

$1 = Table

Table View

ClearFilter

Clear filter settings for a table view

ClearFilter($1,$2)

$1 = Table
$2 = Panel

CopyAllFromView

Copies the entire contents of a table view. Any current selection is ignored and left intact.

CopyAllFromView($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Col Labels

CopyFromView

Copies the current cell or selection from a specified table view just as if CTRL-C was pressed

CopyFromView($1,$2)

$1 = Table
$2 = Panel

DeleteView

Deletes view during run. Data is the table, attribute the view is for. Panel is where the view is located.

DeleteView($1,$2,$3,$4)

$1 = Data
$2 = Panel
$3 = View Type
$4 = Index

GetColumnFilter

Gets any active column filter for a table view

$R = GetColumnFilter($1,$2)

$R = Text/Label
$1 = Column
$2 = Panel

GetFilteredRows

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

GetFilteredRows($1,$2,$3)

$1 = Filter List
$2 = Table
$3 = Panel

GetTableView

Read columns of a table view into another table

GetTableView($1,$2,$3)

$1 = View Table
$2 = View Panel
$3 = Config Table

GetViewProperty

Retrieves a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.

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

$R = Result
$1 = Table
$2 = Panel
$3 = Property
$4 = View Type
$5 = Index

NearestPoint

Returns the row of the closest point on a Log Driven Display. If Overlay is non zero, only that overlay is checked. Max Distance sets the largest distance that will be considered in the matching. With no match, the function returns 0.

$R = NearestPoint($1,$2,$3,$4,$5,$6)

$R = Result
$1 = Table
$2 = Panel
$3 = X
$4 = Y
$5 = Overlay
$6 = Max Distance

PasteIntoView

Pastes the system clipboard into a table view starting at the specified Top Left cell. Returns zero on success

$R = PasteIntoView($1,$2,$3,$4,$5,$6,$7)

$R = Error Result
$1 = Table
$2 = Panel
$3 = TL Row
$4 = TL Col
$5 = Options
$6 = Rows Read
$7 = Cols Read

ReFilterTableView

Reapply any active filters to the current data in the table

ReFilterTableView($1,$2)

$1 = Table
$2 = Panel

SetCellColor

Set text and background colours for cells, supporting doing entire columns, rows or tables as well. In all cases the per cell colour is set.

SetCellColor($1,$2,$3)

$1 = Cell
$2 = TextColor
$3 = BackColor

SetColumnFilter

Sets a column filter text for a table view. The filter needs to be reapplied once all the columns have been set.

SetColumnFilter($R,$1,$2)

$R = Column
$1 = Text
$2 = Panel

SetTableView

Set columns that a table view will display

SetTableView($1,$2,$3)

$1 = View Table
$2 = View Panel
$3 = Config Table

SetTableViewColScroll

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

SetTableViewColScroll($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetTableViewRowScroll

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

SetTableViewRowScroll($1,$2,$3)

$1 = Table
$2 = Panel
$3 = Value

SetViewFilterRows

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

SetViewFilterRows(($1,$2,$3)

$1 = Filter List
$2 = Table
$3 = Panel

SetViewProperty

Sets a property of a view of a table on a given panel. Index specifies which view and is useful when multiple exist.

SetViewProperty($1,$2,$3,$4,$5,$6)

$1 = Table
$2 = Panel
$3 = Property
$4 = Value
$5 = View Type
$6 = Index

TableViewColScroll

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

$R = TableViewColScroll($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewRows

Reads the number of rows in a table view. If a filter is set, this may differ from the number of rows in the table

$R = TableViewRows($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewRowScroll

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

$R = TableViewRowScroll($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewVisibleCols

Reads the number of visible columns in a table view

$R = TableViewVisibleCols($1,$2)

$R = Target
$1 = Table
$2 = Panel

TableViewVisibleRows

Reads the number of visible rows in a table view

$R = TableViewVisibleRows($1,$2)

$R = Target
$1 = Table
$2 = Panel

Time

AdvanceToTimeDialog

Enables user to use the advance to time dialog. If Absolute is set, it defaults to an absolute time advance otherwise it defaults to a relative interval. Time is interpreted accordingly depending on Absolute, as an interval or as an absolute time. For an Absolute advance, if its zero, the clock value is the default instead of the model start time.

AdvanceToTimeDialog($1,$2)

$1 = Absolute
$2 = Time

DayOfMonth

Returns the day of the month, starting at 1

$R = DayOfMonth($1)

$R = Result
$1 = Time

DayOfWeek

Returns the day of the week, starting at 1 for Sunday

$R = DayOfWeek($1)

$R = Result
$1 = Time

DaysInDateMonth

Returns how many days in the month of the absolute time

$R = DaysInDateMonth($1)

$R = Result
$1 = Time

FormDate

Computes the absolute time representing midnight on the given date

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

$R = Result
$1 = Date
$2 = Month
$3 = Year

GetDate

Extracts the date from a date/time

$R = GetDate($1)

$R = Result
$1 = Date/Time

HourOfDay

Returns the hour into the current day of the time, starting at 0

$R = HourOfDay($1)

$R = Result
$1 = Time

HourOfDay+1

Returns the hour into the current day of the time, starting at 1 instead of 0

$R = HourOfDay_1($1)

$R = Result
$1 = Time

IncrementByMonths

Increments the date by one or more months, attempting to keep the same day of month

IncrementByMonths($R,$1)

$R = Result
$1 = # of months

MonthOfYear

Returns the month of the year, starting at 1 for January

$R = MonthOfYear($1)

$R = Result
$1 = Time

TimeOfDay

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

$R = TimeOfDay($1)

$R = Result
$1 = Time

WeekOfYear

Returns the week of the year, starting at 1

$R = WeekOfYear($1)

$R = Result
$1 = Time

YearOfDate

Returns the year of the given calendar time

$R = YearOfDate($1)

$R = Result
$1 = Time

Tuple

DecodeMultiLabelToTuple

Extracts the fields of a multi-label to item attributes with names matching the label lists in the multi-label

DecodeMultiLabelToItem($R)

$R = Target

EncodeItemToMultiLabel

Combines item attributes to form a multi-label, for item attributes with names matching the label lists in the multi-label

EncodeItemToMultiLabel($R)

$R = Target

MatchedCopyRow

Copy rows between tables where the column names match

MatchedCopyRow($R,$1)

$R = Result
$1 = Set To

TupleAppendFromCarried

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

TupleAppendFromCarried($R,$1)

$R = Table
$1 = Carried Index

TupleAppendFromItem

Append a row into the table and for it, set table columns from item attributes with the same name

TupleAppendFromItem($R)

$R = Table

TupleCarriedToRow

For the specified row, set table columns from a carried item's attributes with the same name

TupleCarriedToRow($R,$1)

$R = Row
$1 = Carried Index

TupleDecrementToRow

For the specified row, decrement cells with the values of item attributes with matching names

TupleDecrementFromRow($R)

$R = Row

TupleExtractToCarried

For the specified row, set a carried item's attributes from table columns with the same name then delete the row

TupleExtractToCarried($R,$1)

$R = Row
$1 = Carried Index

TupleExtractToItem

For the specified row, set item attributes from table columns with the same name then delete the row

TupleExtractToItem($R)

$R = Row

TupleIncrementToRow

For the specified row, increment cells with the values of item attributes with matching names

TupleIncrementToRow($R)

$R = Row

TupleInsertFromCarried

Insert a row into the table and for it, set table columns from a carried item's attributes with the same name

TupleInsertFromCarried($R,$1)

$R = Row
$1 = Carried Index

TupleInsertFromItem

Insert a row into the table and for it, set table columns from item attributes with the same name

TupleInsertFromItem($R)

$R = Row

TupleItemToRow

For the specified row, set table columns from item attributes with the same name

TupleItemToRow($R)

$R = Row

TupleRowToCarried

For the specified row, set a carried item's attributes from table columns with the same name

TupleRowToCarried($R,$1)

$R = Row
$1 = Carried Index

TupleRowToItem

For the specified row, set item attributes from table columns with the same name

TupleRowToItem($R)

$R = Row

UI

AddListToMenu

Appends a new menu to the modeller custom menu bar

AddListToMenu($1,$2)

$1 = Menu Name
$2 = Item List

BringToFront

If a panel is open in a popup window, bring that popup to the front in the window z-order.

BringToFront($1)

$1 = Panel

BrowseFile

Browse for a file. Returns non zero if one chosen. FileName sets an initial file, Options can combine:1 to enable a save-style dialog (default is load) and 2 to enable stay in directory (default is to return to working directory). Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.

$R = BrowseFile($1,$2)

$R = File Chosen
$1 = FileName
$2 = Options

BrowseFolder

Browse for a folder. Returns non zero if one chosen. Name sets an initial path, Use s.LastAccessedDataFilePath to access the path selected.

$R = BrowseFolder($1,$2)

$R = Folder Chosen
$1 = StartFolder
$2 = Title

ClearCustomMenubar

Removes all menu items from the modeller custom menu bar

ClearCustomMenubar

DescribeFont

Retrieves a CSV text field describing the properties of the font for the specified column or table cell.

$R = DescribeFont($1)

$R = Result
$1 = Data

Dialog

Show a dialog box for the user to interact with

$R = Dialog($F)

$R = Result
$F = Dialog

DragIcon

Displays an icon and enables user to position it. X and Y are the starting position (center) in panel co-ordinates. If a move is performed, new co-ordinates are written to these values. Icon selects an image which defines the bounding box. Returns non zero if the move was not cancelled. Supports being invoked with mouse down or up. Keys also supported.

$R = DragIcon($1,$2,$3,$4)

$R = result
$1 = X Value
$2 = Y Value
$3 = Panel
$4 = Icon Name

GetCellXY

Retrieves the co-ordinates of a given corner of a cell that is visible in a table view. Co-ordinates are relative to the top left of the main panel window and can be used for ShowPopupPanel(). Corner is 1..9, 1 = top left.The cell is specified in view cells. Result is non zero on error, for example the cell is not visible. Otherwise X and Y are set.

$R = GetCellXY($1,$2,$3,$4,$5,$6,$7,$8)

$R = Result
$1 = Table
$2 = Panel
$3 = View Index
$4 = View Row
$5 = View Column
$6 = Corner
$7 = X
$8 = Y

HandlePopupMenu

Interprets columns in table as depth/name/index and generates a popup menu. Returns index of selected item or 0 if cancelled

$R = HandlePopupMenu($1)

$R = Result
$1 = Table

InitiateFieldEdit

Starts editing attribute/cell views on a panel, as if the user clicked on the first one

InitiateFieldEdit($1)

$1 = Target Panel

MessageBox

Displays a standard message box with an OK button

MessageBox($1,$2)

$1 = Text
$2 = Title

MessageBoxConfirm

Displays a standard message box with OK (1) / Cancel (0) Buttons

$R = MessageBoxConfirm($1,$2)

$R = Result
$1 = Text
$2 = Title

MessageBoxYN

Displays a standard message box with Yes (1) / No (0) Buttons

$R = MessageBoxYN($1,$2)

$R = Result
$1 = Text
$2 = Title

MessageBoxYNC

Displays a standard message box with Yes (1) / No (0) / Cancel (-1) buttons

$R = MessageBoxYNC($1,$2)

$R = Result
$1 = Text
$2 = Title

SetMenuBar

Interprets columns in table as depth/name/index and builds a custom menu bar

SetMenuBar($1)

$1 = Table