System Attribute: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== System Attributes <br> ==
System Attributes provide a way to access many important numeric and text parameters provided by the Planimate® platform. They are accessed using references beginning with "s." such as s.Clock. They are often used in routine code but can also be used anywhere a data reference is used, such as in numerical distributions and parameters to objects.


System Attributes are where Planimate® manages various attributes to run the model.  
This page was automatically generated using Planimate 8.99.3. Do not edit the content below.


These attributes (e.g. the clock time), may be referenced. In some cases they may be set by the modeller in a Routine.
== Time ==


Attributes related to simulation time within the model, the computer system clock and timers.


=== AdvanceToTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Setting this to a time in the future (ie: greater than s.Clock) will cause the engine to rapidly advance the model without animation. Setting it to s.Clock will stop any advance.


=== Uses for System Attributes  ===
=== Clock ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Current simulated time in seconds. Starts at zero for a run.


System Attributes are always available.  
=== ClockDayCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Days elapsed at the current simulation time (starts at 1).


You can derive information about time spent in various states or regions of the model.  
=== ClockDayOfMonth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Day of month of the current simulated time (1..31) for calendar time mode only.


They give access to time variables useful in developing or monitoring schedules of activity.
=== ClockDayOfWeek ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Day of week of the current simulation time (1..7). In calendar time mode, 1 = Sunday.


== Time-Related System Attributes  ==
=== ClockDaysInMonth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Days in the month of the current simulation time (28..31) for calendar mode only.


{{Breakout|Time-Related System Attributes}}
=== ClockHourOfDay ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Hour within the current simulated day, 0..23


== Item Related System Attributes  ==
=== ClockHourOfDay_1 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Hour within the current simulated day plus 1, 1..24, useful as a table index.


{{Breakout|Item Related System Attributes}}
=== ClockMonthCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Months elapsed at the current simulation time (starts at 1). In relative time mode, 30 days a month is used.


== Item Animation Related System Attributes  ==
=== ClockMonthOfYear ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Month of year of the current simulation time (1..12) for calendar time mode only.


{{Breakout|Item Animation Related System Attributes}}
=== ClockTimeOfDay ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Time within the current simulated day, in seconds since midnight of the day.


== Owning Portal Object Related System Attributes  ==
=== ClockWeekCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Weeks elapsed at the current simulation time (starts at 1).


These system attributes enable a subsystem to access its owning portals graphics without having to use a label list
=== ClockWeekOfYear ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Week of year of the current simulation time (1..52) for calendar time mode only.


Name Read / Write Description
=== ClockYear ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Year of the current simulation time (calendar time mode only).


Current Screen Status R/W This is the Current State Value of the Portal Object above the subsystem in which this attribute is set or read. In this case, this Portal does not have to be part of the _Model Objects List, but it has to have its States customized.  
=== RunEndTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
The time at which to force an end the current run.


Owning Portal Location R Returns you the index of the first portal above you in the hierarchy that is part of the _Model Objects system Label List (i.e. that has been exported).  
=== RunInRealTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Controls the real-time run mode of the engine, where the simulation clock is stepped along  system real time clock. A 'continue' message occurs silently twice a second to process events.


Current Portal X/Y R/W Setting these attributes will move a Portal into a new position. There are other mechanisms to do this kind of repositioning also, which may be more appropriate. To make use of this attribute, you have to be inside the actual portal itself. Usually you will message or broadcast into the portal to get it move. Its main usefulness is that you can move a portal without having to export its identity into the _Model Objects label list.  
=== RunStartTimeReference ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
For calendar time mode models, this enables the run start date to be changed. A change will force a restart of a model, so use with care. A new calendar datetime is specified as an offset in seconds to the currently active model run start date.


Current Portal Width &amp; Height R/W Setting these attributes will tell you the current size of the Portal.  
=== SystemMultimediaTimer ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Returns a millisecond level counter in the operating system. This is useful for profiling. Not this wraps after reaching 2^32 (about every 50 days).


Current Portal X Scale, Current Portal Y Scale R/W These enable a Portal’s image to be scaled in the x and y direction. They are specified as a percentage, normally 100. Be wary of large values, you will run out of memory and probably kill win95.  
=== SystemRealTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The real date/time as reported by the computer. This is represented as the offset in seconds to the model's run start date. Requires the Time Field Format is set to Actual Calendar Times.


=== SystemRealTimeOfDay ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The real time of day in seconds since midnight, as read from the computers's real time clock.


=== TimeZoneCorrectionMIN ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Offset in minutes to calendar times. Useful when UTC is used and you want to display/input times in a dynamic region, leaving the internal values as UTC, eg: +600 displays UTC dates in Brisbane time.


== System String Related System Attributes  ==
== Item ==


These system attributes provide information to assist with File input and output and management.  
Predefined properties specific to the item triggering routine code or references to data. These are separate to modeller defined item attributes.


Name Read / Write Description
=== FollowLimit ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Limits follow broadcasts, modeller must explicitly set this to a non-zero value to receive subsequent follow broadcasts.


<br>
=== ItemActAsCarrier ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
If this is set non zero, an item takes the role of a carrier at a pick up or drop off object.


ModelName
=== ItemClassInfoHide ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Hides all item info panels for the current item's class.


R
=== ItemClassScale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
A percentage value that sets an overall scaling of item icons for the current item's class.


Numerically these return zero but if referenced in a form field OR using the new "Format Into Label" routine operation, the names can be made accessible to the modeller for display.  
=== ItemDelayLeft ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Delay remaining for item in a delay. This should be set before using a Throw Exit to remotely place an item. Only set this AFTER setting s.ItemTotalDelay.


<br>
=== ItemFollow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
When this is set non zero, the item's position is broadcast (FollowItem broadcast) as it moves.


ScenarioName
=== ItemID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
Unique ID for the current item in a run, starts at 0.


R
=== ItemLinkRoad ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
The road on a spatial link an item will use.


Numerically these return zero but if referenced in a form field OR using the new "Format Into Label" routine operation, the names can be made accessible to the modeller for display.  
=== ItemLocation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Index of the location an item is in (_Model_Objects list). Set this to the target before using a Throw Exit.


<br>
=== ItemLocationDetail ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This is used as a counter when sending broadcasts or iterating messages over carried items.


DatasetFileAndPath
=== ItemOwningItemID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The item ID of the original item when the current item is a message item or -1 if no associated owner.


R
=== ItemPriority ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Priority value, used some dispatcher queue modes.


This returns the path and filename of the last loaded/saved '''dataset1''' "scenario", where the file browser was integrated into the scenario load process.  
=== ItemRotation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Rotation in degrees of item icon.


Modellers can also explicitly set it using routine operation "SetLastDataFile".
=== ItemRouteSectionID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
For a train item which is on a route, this returns the section object label index that the train would take if it went through a portal exit. Returns 0 if the section has no object index or if a viable section could not be found. Note the section is not tested for availability.


HINT: The "Include Scenario Name In Titlebar" system option shows the filename component of this in the titlebar of an application, useful in an application to remind users which data they have loaded. <br>
=== ItemsCarried ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
Number of Items an item is carrying (eg: due to Pick Up object).


<br>
=== ItemShowInfoPanel ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Enables the item's Info Panel to be hidden/shown on an item by item basis.


LastAccessedDataFile
=== ItemTotalDelay ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Total delay an item will experience in a delay. This should be set before using a Throw Exit to remotely place an item.


R
=== ItemTraceAnimation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Enables tracing movement of this item as it traverses flows on different panels.


Stores last file read/written at change object.  
=== ItemTransitDistance ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This is set when an item first enters a spatial link after a spatial link target is set. It is the total distance to the specified target, the sum of all link costs which by default are computed based on the pixel length of the link lines.


<br>
=== ItemTransitTarget ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This reads or sets the destination for an item about to enter a spatial link. You can use SetItemLinkTarget() to set this and the transit time.


LastAccessedDataFilePath
=== ItemTransitTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This reads or sets the total travel time to the target location for an item about to enter a spatial link. SetItemLinkTarget() sets this and the target object.


R
=== ItemTransparency ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Transparency (0..255, 255 is opaque) of item icon.


Stores the path to the last file read/written at change object.
== Item Animation ==


<br>
Item properties that control how a specific item appears and animates.


LastLockFileError
=== ItemImageTimeStepMS ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Controls how stepping through multiple images (for multi-icons like GIF or name@01,name@02 notation) is affected by the passing of actual time. This value is in milliseconds and enables an icon to change regardless of how fast it is moving.


R
=== ItemImageXStep ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Controls how stepping through multiple images is performed (for multi-icons like GIF or name@01,name@02 notation. For a non zero value, the x co-ordiante divided by the value is used to index an image, eg: a value of 8 changes the image every 8 screen pixels the item moves.


If the lock is successful, the error result target is set to 0, otherwise a non zero error code (see below) is set. If an error occurs, detail of this error is available as a string in this system attribute. If the error is that another user has the lock, then this attribute will contain the "tag" and should be displayed to the user.  
=== ItemImageYStep ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Controls how stepping through multiple images is performed (for multi-icons like GIF or name@01,name@02 notation. For a non zero value, the y co-ordiante divided by the value is used to index an image as the item moves.


<br>
=== ItemXScale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Enables scaling of an item's icon in the X axis. This is a percentage, the default value of 100 is no scaling.


LocalComputerName
=== ItemYScale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Enables scaling of an item's icon in the y axis. This is a percentage, the default value of 100 is no scaling.


R
== Track ==


Provides the Network Name of the Computer the Model is being run on.
Track related properties specific to a train item, including automatically logged values and control over road allocation.


== Model Run Engine Related System Attributes  ==
=== ItemLength ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Length value of the item, used with track models where length is used instead of loop delays.


These system attributes provide information to assist you in how to respond to activities and events in the Model during a Run.  
=== ItemRouteDir ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Direction of a train item along a track, Forward (1) or Reverse (2).


Name <br>
=== ItemRouteID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Route ID when item has been assigned a globally defined track/rail route.


Read / Write <br>
=== ItemRouteLocationID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The object index (_Model_Objects list) of the next location specified by the train item's route.


Description
=== ItemRouteSectionRoad ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
Enables a location to determine which road within a section a train has been assigned to.


<br>
=== ItemRouteStep ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Track route step number (from 1), Always indicates the next location when the item is at a portal.


RunNumber<br>
=== ItemRouteStepCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The number of steps in the current route of an item on a track network.


R <br>
=== ItemTrackForwardColumn ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This sets the column that is used to look up a train's forward direction section running time. It needs to be set for each new train.


Is the number that is appended to the Log files produced by Planimate®.  
=== ItemTrackReverseColumn ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
This sets the column that is used to look up a train's reverse direction section running time. It needs to be set for each new train.


<br>
=== ItemTrailColor ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Colour of the trail used to represent a train's length.


MultipleRunCount <br>
=== ItemTrailWidth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Width of the trail line used to represent a train's length.


R <br>
=== LookThroughBlock ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
Set non zero at the time a multi-server's delay time is evaluated if the look-through option is enabled and the entering item would be blocked from leaving the multi-server. This can be used to extend the delay time.


is 0 for normal runs is the # of multiple runs for a multiple-run session
=== LoopDelayOverride ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enables a model to override the track portal loop delay testing/assignment (when an item performs a TestEnter on a portal exit leading up to the track). It is useful when advanced lookahead is used in evaluating possible train routes. Planimate will revert any changes made to this attribute during lookahead. Ensure any 'Move' code does not leave this attribute in a non-zero value or portal loop delays will fail.


<br>
=== MultiServerLookThrough ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Set if a multi-server is performing a look-through (lookahead past itself as an item enters it.


ContinueRun <br>
=== RouteTestRow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The row of a Route Selection table that is being tested. Useful when the Change Route multiple test capability is being used. This value is set only during lookahead for Change Objects immediately downstream of the object testing the routes. Otherwise this value should not be relied upon for any purpose.


R/W <br>
=== TrackFillStepError ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Textual description of any last track fill step error, after FillRouteStep() or CreateRoute().


Sets continue mode so a user event broadcast (eg: portal click) can continue the run. Equivalent to the user button "continue" option.  
=== TrackLastSectionID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The _Model_Objects index of the last section the train entered. This is also set during lookahead so a node can determine the section the train item will potentially arrive from.


<br>
=== TrackLastSectionRoad ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The road number a train used on the section it last exitted.


RoutineInLookahead<br>
=== TrackLineWidth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
The line width of track lines.


R <br>
=== TrackLoopEntryEnd ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
This is the time that the train completed arrival at a location. If the Portal Option 'Track:Does Loop Delays' is set, but there was no entry delay, this time will be the same as the TrackLoopEntryStart time.


Reading this allows a Routine to control the flow of operations based on whether the execution of the routine is happening during a Lookahead as opposed to a Move. Useful when calling DLL’s.  
=== TrackLoopEntryStart ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
This is the time that a train arrived at a location. If the Portal Option 'Track:Does Loop Delays' is set, and a loop entry delay was required, this is the start time of the loop entry delay period.
During the Loop Entry Delay period, the section remains unavailable and the train cannot begin to leave the Portal.


This will also be set for messages sent from a routine in lookahead.<br><br>
=== TrackLoopExitEnd ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
This is the time that a train actually began to move in the previous section (after it completed its Loop Exit Delay). If the Portal Option 'Track:Does Loop Delays' is set, but there is no exit delay, this time will be the same as the TrackLoopExitStart time.


DoingTrackCheckNext <br>
=== TrackLoopExitStart ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
This is the time that a train began to leave the previous location. If the portal Option 'Track:Does Loop Delays' is set and a loop exit delay was required, this is the start time of the loop exit delay.


R <br>
=== TrackRoadSpacing ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
The spacing between track roads, in pixels.


By testing this system attribute the modeller can give a controlled response to the CheckNext tests that the track network propagates. Using this flag a modeller can tell the track system whether a portal is safe to consider moving towards, even if the train is some distance back and not directly "TestEntering".  
=== TrackSectionNominalTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || Yes
|}
The nominal running time for the Track section that the train last used. This may different to the actual running time which could be modified by section restrictions.


<br>
=== TrainTailData1 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Data set here at a location will be broadcast to the current location in item attribute _taildata1 when the tail of the train enters it.


HandlingBroadcastOnly <br>
=== TrainTailData2 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Data set here at a location will be broadcast to the current location in item attribute _taildata2 when the tail of the train enters it.


R <br>
=== TrainTailData3 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Data set here at a location will be broadcast to the current location in item attribute _taildata3 when the tail of the train enters it.


Set to non zero if the current run is being performed as result of a broadcast without initialisation. This enables a model to catch when a broadcast button has been clicked *during* a run vs. when clicking it initiates the run.  
=== TrainTailData4 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || Yes
|}
Data set here at a location will be broadcast to the current location in item attribute _taildata4 when the tail of the train enters it.


<br>
== Owning Portal ==


HaveCurrentPendingEvents <br>
These enable code in a sub-system to access properties of the portal owning that sub-system which is particularly useful when those portals are nodes or locations on a network. They work by proximity in the hierarchy and do not require use of an object label.


R <br>
=== CurrentPanelStatus ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
The object state of the portal owning the panel on which this attribute is referenced. The portal doesn't need an object label but it must be configured for custom states.


Returns true if the FEC has any events scheduled to occur at exactly the current time - meaning that there is some unfinished activity at the current epoch which has not yet occurred - either because the user has paused the model or as a side effect of activity in the current thread (eg: unblocking). This is intended to enable modellers to check whether other 0-time activity is in progress when a new broadcast is initiated by the user interacting with the model. The modeller may want to prevent this second broadcast from proceeding in such circumstances.  
=== CurrentPortalHeight ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The height in pixels of the owning portal's current icon.


<br>
=== CurrentPortalWidth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The width in pixels of the owning portal's current icon.


LastRunStopReason <br>
=== CurrentPortalX ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
X position (in panel co-ordinates) of the owning portal to the panel where this executes. Does not require an object label.


R <br>
=== CurrentPortalXScale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Percentage scaling to apply to the owning portal's width, normally 100.


This returns a numeric code describing why the run/engine stopped LAST time. This can be very useful in handling error recovery and may make handling "just loaded" situations easier than using the "_model loaded" broadcast (but that BC is still available). Also very useful in handling restart dispatchers since the model can easily know that a "control" item will be present. The current codes are as follows: 0 Loaded/No Previous Run no previous run, model just loaded or created 1 User Stopped Run user selected stop from menu/keyboard 2 Model Stopped Run model self stopped (exit, posted stop message) 3 Platform Required platform stopped run (closing, load/save model/scenario, editing time ref) 4 Error In Model/Engine error in model or runtime engine 5 Broadcast Option broadcast set to stop 6 UI/Portal Click Option user interaction: portal clicks, 7 Restart Dispatcher restart dispatcher restarted the run (item preserved) A label list names these codes.  
=== CurrentPortalY ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Y position (in panel co-ordinates) of the owning portal to the panel where this executes. Does not require an object label.


<br>
=== CurrentPortalYScale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Percentage scaling to apply to the owning portal's height, normally 100.


RandomSeedOnRestart<br>
=== OwningPortalLocation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The object index (_Model_Objects list) of the first portal above the object executing this in the hierarchy that has an object label in the _Model Objects Label List. Typically this is a location on a map.


R/W <br>
== Strings ==


This enables the initial random seed for the NEXT run to be set when a run restart dispatcher is used. It also enables the random seed for the current run (single or multiple) to be read (unless the modeller has set it prior to a run/restart). Note: its OK to use incrementing seeds, internally Planimate® scrambles the initial seed to ensure the streams for the successive runs don’t trivially correlate. The seed value must be an integer between 1 and 32767 (inclusive) and a hard clamp has been introduced to ensure this.  
These are text formatted attributes, useful with string assignment ($=) and string operations such as strfind().


<br>
=== DatasetFileAndPath ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
File path and name the modeller last passed to SetLastDatasetFile().


RandomSeedImmediate <br>
=== DataSetName ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Name of file modeller last passed to SetLastDatasetFile().


R/W <br>
=== LastAccessedDataFile ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Stores the last file read/written in file operations.


Enables reinitialisation of random seed without having to restart the engine.  
=== LastAccessedDataFilePath ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Stores last path/filename read/written in file operations.


<br>
=== LastErrorFileNamePath ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Path of last file where Ctrl-V paste errors were logged.


ActiveBroadcastIndex <br>
=== LastLockFileError ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Text giving detail on a failed AcquireFileLock().


R <br>
=== LoadFileNamePath ===
{|class="wikitable"
| Type || Text
|-
| Access || Read/Write
|-
| Need Item || No
|}
Path of /DATASET command line parameter or any file name parameter (eg: via a file association) for a compiled application.


Run Engine system attribute returns label index of the currently active broadcast or 0 if none active.  
=== LocalComputerName ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Network name of the computer the model is running on.


<br>
=== ModelName ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Name of the model.


RealTimeTickEnable<br>
=== UseLocale ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Determines if internationalisation is used when comparing strings. This handles proper comparison of non English languages but is much slower.


R/W<br>
=== UserName ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
The name of the user, eg: 'John Smith'. This name is not necessarily unique. Only supported in domain environments.


Run Engine System Attribute to control fine timer tick option on/off.<br>
=== UserNameCanonical ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
The name of the user in canonical format as used on domains, eg: 'somewhere.com/sales/jsmith'. Only supported in domain environments.


<br>
=== UserNameNTCompatible ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Retrieves the name of the user in the older NT compatible format.


AnimationStartingMessage<br>
=== UserNameQualified ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
Retrieves a comma delimited list of attributes and values that uniquely define the user, eg: 'CN=John Smith, OU=sales, DC=somewhere, DC=com'. Only supported in domain environments.


R/W<br>
== Run Engine ==


Gives the modeller access to the option for whether "Animation Starting" messages will be presented to the user.  
These provide information and control over the Planimate simulation engine.


<br>
=== ActiveBroadcastIndex ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Returns the _Broadcasts label list index of a currently active broadcast or 0 if none active.


<br>
=== AdvancingToTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non zero whilst Planimate is advancing to time without animation.


AutomaticRestartAfterError<br>
=== AnimationStartingMessage ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Sets option that determines whether 'Animation Starting' dialogs are displayed after a run advance.


R/W<br>
=== AutoRestartAfterError ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Setting this causes the engine to restart a run after a model error. Requires option 'Restart When Model Stops' to be enabled. Dependence on this should be avoided. Does not work if 'Friendly Error Messages' is enabled. The usual model error dialog appears for 10 seconds then if no interaction, the model restarts. Use s.LastRunStopReason if relying on restarts.


This is an Experimental Feature
=== BatchRun ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non-zero if running in batch mode (no UI possible).


If the model sets this attribute to 1 during a run AND the "Restart When Model Stops" option is enabled, then PL will attempt to restart the model if a model error occurs.  
=== CancelClose ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set to cancel a previous stop run/close, as may have been triggered by a stop exit.


This is intended for special cases where model errors in some runs are unavoidable (eg: a modeller managing multiple runs of a network directly rather than using PL's inbuilt mechanism).  
=== ContinueCurrentTimeOnly ===
{|class="wikitable"
| Type || Value
|-
| Access || Write Only
|-
| Need Item || No
|}
Set non-zero during a broadcast to Continue the run and pause after all events at the current time have been processed. Useful with the low priority zero delay multiserver option.


It is not to be used for general modelling or catching file errors. <br>It will not work if the "Friendly Errors" dialog is enabled or any other dialog appears, apart from the standard "model error" dialog appears.  
=== ContinueRun ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Setting this non zero during the processing of a broadcast from a button press will cause the simulation to continue instead of pausing after the broadcast item completes.


When an error occurs, the model error dialog appears for 10 seconds. If the user clicks/closes the dialog then the restart will not occur, otherwise the dialog closes and the model restarts.  
=== DisableColumnRefUpdates ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set this non-zero to disable automatic updates of column references when a large number of labelled table columns are added or removed.


The modeller should check and act on the "last stop reason" system attribute (if they are relying on restarts a handler for this should already be there).  
=== DisableUndo ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Setting this non-zero during lookahead disables the revert mechanism that normally occurs when a routine is executed during lookahead (before the item actually moves). Once set, attributes and tables altered during lookahead will not be reverted. This value must be reset before the routine finishes. Modified data does not initiate dependency unblocks. For advanced routing use only.


Upon a restart this attribute gets reset to 0.  
=== DoingTrackCheckNext ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is set non-zero whilst a track capacity lookahead is being performed. Track locations use this to respond to requests for capacity, typically by presenting capacity (allow), a block (deny) or deferring to another object via a portal exit.


The modeller should only set it non zero after the code that proceeds it has been proven robust.<br><br>
=== DS2LoadObjectLabelByIndex ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
If set, DataSet2 loads will use the index of labels in lists instead of matching the text of attributes and columns formatted as label lists.


<br>
=== FECFrontEvents ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
How many events pending on the FEC at the current time.


ModelNeedsSaving<br>
=== FECFutureEvents ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
How many events pending on the FEC at future times.


R<br>
=== HaveCurrentPendingEvents ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Is non-zero if the FEC has any events scheduled to occur at the current time. This can indicate unfinished dependencies that have yet to be processed. Modellers may want to use this to avoid new actions in some cases.


The modeller can set/reset this to control whether PL will prompt to save the model upon exit.  
=== LastRunStopReason ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Reason code (from _stop_reasons list) why the run engine last stopped. Useful in handling restarts and model loaded conditions as not yet run is a reported reason.


This is only useful for models used by editors, obviously a standalone EXE isn't going to be saving any models.<br><br>
=== LastRunStopTime ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The clock value at the time the engine was last stopped.


<br>
=== ModelNeedsSaving ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
This is the changed flag for a model, a modeller can reset it. This is not used for compiled applications.


UserMode<br>
=== MultipleRunCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Zero for a normal run or the number of runs for a multiple run.


R/W<br>
=== PauseAfterAdvance ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set this to a non-zero value to make the run engine pause after an advance-to-time is performed.


This is set non zero if the editing tools are unavailable (ie: the system is in user mode or a standalone EXE).  
=== Planimate64 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non zero if running a 64 bit version of Planimate.


This enables a model to adapt its UI/operation for a developer or an end user <br><br>
=== RandomSeedImmediate ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enables reinitialisation of random generator seeds without having to restart the engine.


<br>
=== RandomSeedOnRestart ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Sets the random seed for the NEXT run, used when a run restart dispatcher is used.


DisableUndo<br>
=== RealTimeBCInEvent ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Controls if a real time broadcast is processed whilst another event is being processed.


R/W<br>
=== Rnd01 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
A uniformly distributed random balue from 0..1 for use in the distribution pattern dialog. This is useful when creating custom distributions, calling DLLs etc.


s.DisableUndo (Run Engine) enables the modeller to disable the undo/revert mechanism that normally occurs when a routine is executed during lookahead (before the item actually moves).  
=== RoutineInLookahead ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non zero if a routine is being executed in look-ahead, before an item actually moves. For very special cases only. This is always set for messages sent in lookahead.


Setting this non zero will cause attributes and tables altered during lookahead to retain whatever is done to them after the lookahead is complete.  
=== RunNumber ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Run number when multiple runs are performed, starts at 1.


The modeller must set this value back to zero before the routine finishes or an error will be reported.  
=== TestNumber ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non zero when running with /TESTRUN. Multiple tests for a given model (in TESTS.CSV for the test suite scripts) use increasing values startng at 1.


This is intended for advanced users who are hooking into Planimate's lookahead mechanism, for example in routing trains. <br>Attributes modified while DisableUndo is set do not initiate unblocks on dependent objects/views.<br><br>
=== TestResult ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
A model undergoing a test must set this to a value from l._test_results to report success or failure. Not setting this value is a failure of the test.


<br>
=== TestTarget ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
A string a model can compare against for a successful test run, typically a SHA256 hash of key output tables.


== Display Related System Attributes  ==
=== UserMode ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This is non-zero if the editing tools are unavailable (ie: the system is in user mode or a compiled EXE).


These attribute relate to what is going on concerning the currently visible panels, and status bar displays etc.
== Display/Mouse ==


Name Read / Write Description
These control display, animation and give access to the mouse co-ordinates.


Current Screen Visible R/W This can be either Read or Set. To Read: Ask the model if the screen is visible: returns 1 if visible, 2 if it is not. This way you can detect what the user is looking at, and perhaps alter the animation to suit them. To Set: Assigning a value of one to the screen visible attribute makes the screen visible! You might think of using this to jump to screens if errors or interesting behaviour occurs.  
=== ActivityBarColour ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Colour of the activity state bar in the status bar. This is either a colour index or an ARGB value.


Owner of Panel Visible R This returns true (1) if the panel containing the current panel from where the attref is scoped is visible, otherwise it returns "2" for false. This is useful for event handlers which reside in a subsystem "under" a panel which an end user sees/interacts with. It enables routine code to determine if the subsystem immediately above is visible without requiring object or panel indices.  
=== ActivityState ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
This controls a horizontal bar in the status bar which can be used to indicate progress. A value from 0..100 controls the proportion of the bar that is filled. A value of 0 removes the bar. It is auto-zeroed at the start and end of a run. As this updates even when fast-advancing without animation, avoid setting this too often to avoid impacting the run time.


Visible Portal Index R If the main visible panel is a subsystem of a portal with an object label, that label index is returned. If the top level window is visible, 0 is returned. Otherwise the value is -1
=== ActivityState0_1 ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
This is like s.ActivityState except a value from 0 to 1 controls the bar. As with s.ActivityState, do not set too often if advance to time performance is important.


Lock Drawing W Set to 1 to stop updates to the screen. Set to Zero to resume updates. May need to force a repaint after that to be sure.  
=== AnimationUpdateInterval ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Determines how often (in model time) animation updates occur, 0 prevents animation updates except when items enter or leave an object. USeful with spatial networks and tracks.


Activity State (0..100) W Shows an activity bar in the status bar. Value of 0..100 controls length of bar, 0 to reset (no bar). Automatically reset at start and end of run. Up to modeller how it gets used. Since this updates even when running without animating, use carefully to avoid model slowdown
=== CurrentPanelVisible ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
On read it returns non zero if the panel where the read is executed is visible. If a non zero value is written, the owning panel is made the active panel in the main window.


Activity State (0..1.0) W Shows an activity bar in the status bar. Value of 0..1 controls length of bar, 0 to reset (no bar). Automatically reset at start and end of run. Up to modeller how it gets used. Since this updates even when running without animating, use carefully to avoid model slowdown.  
=== EnableRepaintBC ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set this to a non-zero value to receive a _Panel_Repainted broadcast. This is automatically reset after sent.


Activity Bar Colour W Use a Value from the _Colours Label list to set the colour of the Activity bar.  
=== EnableTableCellEdit ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Setting this non-zero in a 'before edit' table cell click broadcast enables the default cell click edit to occur. This is automatically reset. The table view option Don't Defer BC on FEC' must be enabled and the broadcast handler must not change panel.


Mouse X, Mouse Y R Returns the current Mouse Position Coordinates.  
=== GanttDragAlpha ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Alpha intensity of a dragged gantt block (0..255).


Visible Panel ID R Returns the panel index of the currently visible/front most panel. (This is the _Model Panels Label List, not _Model Objects).  
=== GanttDragIntensity ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Brightness of a dragged gantt block (0..255).


Lock Portals from Drags W Enables the modeller to lock portals from being dragged at runtime even though their options setting enables this. This gives the modeller more control over when users can reposition portals in their display.  
=== ItemAnimateSpeed ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Sets the Animation Speed value which controls how fast items move on paths between objects.


Trace Animation W Set to 1 to turn on the Trace Animation debugging option. Set to Zero to turn it off again.  
=== LockDrawing ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set non zero to block updates to the window. You may need to force a repaint when resetting this value to ensure the window is properly updated.


Timer Broadcast Interval (ms) W Lets the modeller change the timing interval of the "_Real Time Tick" broadcast. A range of 10ms (100 times a second) to 1000ms (once a second) is now supported. 100 times a second will be too fast for slower systems so be careful on using the faster rates.  
=== LockPortalDrag ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enables the modeller to enable/disable dragging of portals by end users. Used in conjunction with portal specific options to enable dragging.


Enable Table Cell Edit R/W This enables the modeller to decide whether a cell edit should occur when a table cell is clicked, using the cell click broadcast. If the model sets this attribute nonzero while processing a table cell click broadcast (before edit) then the edit will actually occur. If this attribute is not set, the edit will not occur (as is current). This attribute is reset to 0 before each cell click broadcast gets sent. It is only valid to set/read this attribute in the initial thread of a cell click broadcast. For this feature to work, the table view option "Don’t Defer BC on FEC" must be enabled. This forces PL to send the BC immediately rather than waiting until a "safer" time. With this option "on" the modeller MUST NOT close the panel containing the table view as a result of the cell click broadcast, otherwise the platform will crash.  
=== MouseDownX ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Panel x co-ordinate where a mouse down occured. The mouse may have moved since.


Animation Update Interval R/W Enables a model to control how often animation updates occur (0 sets none, model advances to model events only). See note below. The way the Animation Update Interval is handled. Planimate® always delays a minimum of 15ms every animation update interval regardless of whether there is item animation or not. This makes model time flow more smoothly especially if time based portal animation is being used. If a model spends a long time without animation which you want to skip, you can now set the animation update interval system attribute to make the model advance without showing the "Advance" dialog.  
=== MouseDownY ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Panel y co-ordinate where a mouse down occured. Mouse may have moved since.


Time Scaling R/W Sets the Real Time Scaling value that is found under Run in the Menu Bar.  
=== MouseX ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Returns the current mouse X position in panel co-ordinates.


Item Animation Speed R/W Sets the Item Animation Speed value that is found under Run in the Menu Bar.  
=== MouseXOwner ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The current mouse x co-ordinate in co-ordinates of the first visible panel which owns the panel where this executes.


=== MouseXWindow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The current mouse x position in Windows screen co-ordinates..


=== MouseY ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Returns the current Mouse Y position in panel co-ordinates.


== Table Related System Attributes  ==
=== MouseYOwner ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The current mouse y co-ordinate in co-ordinates of the first visible panel which owns the panel where this executes.


Relating to the currently-referenced table in a routine operation.  
=== MouseYWindow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The current mouse y position in Windows screen co-ordinates..


Name Read / Write Description
=== PanelOwnerVisible ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Non zero if the the panel containing the current panel executing this operation is visible.


Table Rows R This gives access to the rows/column count for the table being referenced by the overall attribute reference. The advantage is that they can be used directly in a row or column index without having to use a separate temporary attribute and a separate routine line to set it. These attributes can determine a table from: direct references within an attref; dynamic table references; item table references (if item is available); implied (eg: a sort column attref in a sort knows the target table even though that table hasn't been directly specified in that attref
=== TimeScaling ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Sets the Real Time Scaling value which causes delays in a model to be reflected as delays in real time.


Table Columns R As above.  
=== TraceAnimation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set to 1/0 to enable/disable the Trace Animation debugging option, where all items are followed as they move between panels.


=== VisiblePanelID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The _Model_Panels index of the panel in the main window. This is superceded by s.VisiblePortalIndex.


=== VisiblePortalIndex ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Returns the owning portal index (_Model_Objects list) of the owning portal of the current panel, or 0 for the top level panel. If no owning portal index is assigned, it returns -1.


== Other (General) System Attributes  ==
== Referenced Table ==


These give properties of a table referenced elsewhere in a routine operation without having to re-specify the table.


=== DataErrorColumn ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Set when ReadFromFile() encounters an error to the first error row.


Name Read / Write Description
=== DataErrorRow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Set when ReadFromFile() encounters an error to the first error row.


Null W Enables dialog results etc. to be thrown away without having to create a dummy attribute.  
=== TableColumns ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Number of columns in a table being referenced in an operation.


Runtime Break Point Control W Provides convenient control of any breakpoint(s) in the model. This works in addition to modeller defined breakpoint control attributes, enabling breakpoints at complex conditions or at certain stages in a long loop to be activated.  
=== TableRows ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Number of rows in a table being referenced in an operation.


Current Object Location R Lets you get an owning portal location for an object without involving an item. In other words, it obtains the location from the object's point of view rather than going via the item. This can be useful when you need to find the subsystem that a specific object is in, perhaps so you can direct a message to this location.
== Other ==


Total Object Label Count R With this attribute, the model can query the number of objects which are in the _Model Objects label list
Miscellaneous other system attributes.r


ODBC Error Status R ODBC operations have an option to not stop the run on error. This system attribute returns whether an error in the ODBC operation occurred, non zero value indicates an error. ODBC Error Status must be read in the same thread that performs the ODBC operation.  
=== BendPointIcon ===
{|class="wikitable"
| Type || Text
|-
| Access || Read/Write
|-
| Need Item || No
|}
Name of icon to use for bendpoints instead of the default bend point cross.


Spatial link Scan Depth W Limits how deep PL will scan a spatial net looking for the closest route to the target. The attribute needs to be set each time the model is loaded, it is not saved. The default is 9999999 (ie: don’t limit search depth). Setting this value means Planimate® may not chose the shortest distance path in a spatial net if it contains more intermediate nodes than an alternative which is further in distance, and the node limit happens to be exceeded in scanning the shorter path. This will be obvious in incorrect animation but should not affect the item arrival time. In other words, reducing the search depth may cause PL to chose a route which is not the "shortest". It may also cause Planimate® not to find the correct route at all (if it has too many intermediate nodes) in which case PL will report a flow error. This attribute has to be set before firing the first item into the spatial net. It doesn't get saved with the model, it resets to a large number when the model is loaded. You can change its setting during the run but probably not something useful to do, if its too low and PL fails to find a target it will stop the model with a "no outgoing flow" type message.  
=== BendPointSize ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Pixel width/height of the default bend point cross.


User Edited Model Data R Gets set when a user edits an attribute view or table view/editor. The model can set and reset this attribute. It gets reset when the model is saved. Tables and attribute views have an option to not set this bit when they are edited
=== ButtonPaintID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Set while a paint object checks its visibility/state attribute reference. If the object is in the _Paint_Objects label list, it can be used to assist in looking up visibility for that paint object.


Button Paint ID R Set while a paint object checks its visibility/state attribute reference. If the object is in the paint label list, it can be used to assist in looking up visibility for that paint object. <br>
=== CPUID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
A value identifying the type and revision of the CPU. This is not a unique identifier as modern cpus do not support this.


[[Category:Attribute]]
=== CurrentObjectLocation ===
[[Category:Runtime Engine]]
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Index of the location of the object triggering this. Does not require an item.
 
=== EnableDebugLogger ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enable the event logger/debugger system. This is useful where a modeller wants to start logging in a specific condition.
 
=== JobID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This gives access to the string passed using the command line /JobID option.
 
=== KeyDate ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The date (based on the run calendar time reference) that the active key file was created.
 
=== KeyFlags ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
key bits for the current license keys, BitAnd with 7 for custom PBA sub-code.
 
=== KeyName ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
The user name for the active key file.
 
=== KeyOrg ===
{|class="wikitable"
| Type || Text
|-
| Access || Read Only
|-
| Need Item || No
|}
The organisation name for the active key file.
 
=== KeySerial ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The serial number of the active key file.
 
=== LineTestMargin ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Threshold used to detect clicks near lines (eg: spatial links).
 
=== NullAttribute ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
A null location enabling data to be ignored, typically used for return results. Some operations report errors instead of returning the error code if their target is this.
 
=== ODBCErrorStatus ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
ODBC operations have an option to not stop the run on error. A non zero value indicates an error in the most recent ODBC operation. This must be read immediately after code that performs the ODBC operation.
 
=== PBA ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Is non-zero if running as a compiled exe.
 
=== PipeTableRow ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
Pipe table row for use with pipe properties only. Enables a pipe to reference its own configuration row within its properties.
 
=== PrintOrientation ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enables setting the page orientation before a print. Use a value from the _print_orientation label list. The value is set to the actual orientation after a printout.
 
=== PrintPaperSize ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Enables setting the paper size for printing. Use a value from the _print_papersize label list. The vlaue is set to the actual paper size code after a printout.
 
=== RuntimeBreakPointControl ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Provides control of any breakpoint(s) in the model. This works in addition to modeller defined breakpoint control conditions, and is useful where a remote condition determiens whether existing breakpoints in the code should be active.
 
=== SpatialLinkScanDepth ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Limits how deep the engine will scan a spatial link network looking for the closest route to the target. This value is not saved with the model. The default is not to limit the search which may create problems with dense complex networks. This only impacts animation, not simulation result as the time to target is explicitly set.
 
=== SystemID ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
The Volume Serial Number of the drive containing the Windows system32 directory. It may be useful in determining a unique installation ID but remember users can set the volume serial number of a drive.
 
=== TotalObjectLabelCount ===
{|class="wikitable"
| Type || Value
|-
| Access || Read Only
|-
| Need Item || No
|}
This returns the number of objects which have labels registered in the _Model_Objects label list.
 
=== UserEditedData ===
{|class="wikitable"
| Type || Value
|-
| Access || Read/Write
|-
| Need Item || No
|}
Set non zero when a user edits an attribute view or table view/editor. The modeller can reset this. Is reset when the model is saved. Tables and Attribute Views have a Track Changes option to not set this when they are edited.

Latest revision as of 22:36, 29 April 2017

System Attributes provide a way to access many important numeric and text parameters provided by the Planimate® platform. They are accessed using references beginning with "s." such as s.Clock. They are often used in routine code but can also be used anywhere a data reference is used, such as in numerical distributions and parameters to objects.

This page was automatically generated using Planimate 8.99.3. Do not edit the content below.

Time

Attributes related to simulation time within the model, the computer system clock and timers.

AdvanceToTime

Type Value
Access Read/Write
Need Item No

Setting this to a time in the future (ie: greater than s.Clock) will cause the engine to rapidly advance the model without animation. Setting it to s.Clock will stop any advance.

Clock

Type Value
Access Read Only
Need Item No

Current simulated time in seconds. Starts at zero for a run.

ClockDayCount

Type Value
Access Read Only
Need Item No

Days elapsed at the current simulation time (starts at 1).

ClockDayOfMonth

Type Value
Access Read Only
Need Item No

Day of month of the current simulated time (1..31) for calendar time mode only.

ClockDayOfWeek

Type Value
Access Read Only
Need Item No

Day of week of the current simulation time (1..7). In calendar time mode, 1 = Sunday.

ClockDaysInMonth

Type Value
Access Read Only
Need Item No

Days in the month of the current simulation time (28..31) for calendar mode only.

ClockHourOfDay

Type Value
Access Read Only
Need Item No

Hour within the current simulated day, 0..23

ClockHourOfDay_1

Type Value
Access Read Only
Need Item No

Hour within the current simulated day plus 1, 1..24, useful as a table index.

ClockMonthCount

Type Value
Access Read Only
Need Item No

Months elapsed at the current simulation time (starts at 1). In relative time mode, 30 days a month is used.

ClockMonthOfYear

Type Value
Access Read Only
Need Item No

Month of year of the current simulation time (1..12) for calendar time mode only.

ClockTimeOfDay

Type Value
Access Read Only
Need Item No

Time within the current simulated day, in seconds since midnight of the day.

ClockWeekCount

Type Value
Access Read Only
Need Item No

Weeks elapsed at the current simulation time (starts at 1).

ClockWeekOfYear

Type Value
Access Read Only
Need Item No

Week of year of the current simulation time (1..52) for calendar time mode only.

ClockYear

Type Value
Access Read Only
Need Item No

Year of the current simulation time (calendar time mode only).

RunEndTime

Type Value
Access Read/Write
Need Item No

The time at which to force an end the current run.

RunInRealTime

Type Value
Access Read/Write
Need Item No

Controls the real-time run mode of the engine, where the simulation clock is stepped along system real time clock. A 'continue' message occurs silently twice a second to process events.

RunStartTimeReference

Type Value
Access Read/Write
Need Item No

For calendar time mode models, this enables the run start date to be changed. A change will force a restart of a model, so use with care. A new calendar datetime is specified as an offset in seconds to the currently active model run start date.

SystemMultimediaTimer

Type Value
Access Read Only
Need Item No

Returns a millisecond level counter in the operating system. This is useful for profiling. Not this wraps after reaching 2^32 (about every 50 days).

SystemRealTime

Type Value
Access Read Only
Need Item No

The real date/time as reported by the computer. This is represented as the offset in seconds to the model's run start date. Requires the Time Field Format is set to Actual Calendar Times.

SystemRealTimeOfDay

Type Value
Access Read Only
Need Item No

The real time of day in seconds since midnight, as read from the computers's real time clock.

TimeZoneCorrectionMIN

Type Value
Access Read/Write
Need Item No

Offset in minutes to calendar times. Useful when UTC is used and you want to display/input times in a dynamic region, leaving the internal values as UTC, eg: +600 displays UTC dates in Brisbane time.

Item

Predefined properties specific to the item triggering routine code or references to data. These are separate to modeller defined item attributes.

FollowLimit

Type Value
Access Read/Write
Need Item No

Limits follow broadcasts, modeller must explicitly set this to a non-zero value to receive subsequent follow broadcasts.

ItemActAsCarrier

Type Value
Access Read/Write
Need Item Yes

If this is set non zero, an item takes the role of a carrier at a pick up or drop off object.

ItemClassInfoHide

Type Value
Access Read/Write
Need Item Yes

Hides all item info panels for the current item's class.

ItemClassScale

Type Value
Access Read/Write
Need Item Yes

A percentage value that sets an overall scaling of item icons for the current item's class.

ItemDelayLeft

Type Value
Access Read/Write
Need Item Yes

Delay remaining for item in a delay. This should be set before using a Throw Exit to remotely place an item. Only set this AFTER setting s.ItemTotalDelay.

ItemFollow

Type Value
Access Read/Write
Need Item Yes

When this is set non zero, the item's position is broadcast (FollowItem broadcast) as it moves.

ItemID

Type Value
Access Read Only
Need Item Yes

Unique ID for the current item in a run, starts at 0.

ItemLinkRoad

Type Value
Access Read/Write
Need Item Yes

The road on a spatial link an item will use.

ItemLocation

Type Value
Access Read/Write
Need Item Yes

Index of the location an item is in (_Model_Objects list). Set this to the target before using a Throw Exit.

ItemLocationDetail

Type Value
Access Read/Write
Need Item Yes

This is used as a counter when sending broadcasts or iterating messages over carried items.

ItemOwningItemID

Type Value
Access Read Only
Need Item Yes

The item ID of the original item when the current item is a message item or -1 if no associated owner.

ItemPriority

Type Value
Access Read/Write
Need Item Yes

Priority value, used some dispatcher queue modes.

ItemRotation

Type Value
Access Read/Write
Need Item Yes

Rotation in degrees of item icon.

ItemRouteSectionID

Type Value
Access Read Only
Need Item Yes

For a train item which is on a route, this returns the section object label index that the train would take if it went through a portal exit. Returns 0 if the section has no object index or if a viable section could not be found. Note the section is not tested for availability.

ItemsCarried

Type Value
Access Read Only
Need Item Yes

Number of Items an item is carrying (eg: due to Pick Up object).

ItemShowInfoPanel

Type Value
Access Read/Write
Need Item Yes

Enables the item's Info Panel to be hidden/shown on an item by item basis.

ItemTotalDelay

Type Value
Access Read/Write
Need Item Yes

Total delay an item will experience in a delay. This should be set before using a Throw Exit to remotely place an item.

ItemTraceAnimation

Type Value
Access Read/Write
Need Item Yes

Enables tracing movement of this item as it traverses flows on different panels.

ItemTransitDistance

Type Value
Access Read/Write
Need Item Yes

This is set when an item first enters a spatial link after a spatial link target is set. It is the total distance to the specified target, the sum of all link costs which by default are computed based on the pixel length of the link lines.

ItemTransitTarget

Type Value
Access Read/Write
Need Item Yes

This reads or sets the destination for an item about to enter a spatial link. You can use SetItemLinkTarget() to set this and the transit time.

ItemTransitTime

Type Value
Access Read/Write
Need Item Yes

This reads or sets the total travel time to the target location for an item about to enter a spatial link. SetItemLinkTarget() sets this and the target object.

ItemTransparency

Type Value
Access Read/Write
Need Item Yes

Transparency (0..255, 255 is opaque) of item icon.

Item Animation

Item properties that control how a specific item appears and animates.

ItemImageTimeStepMS

Type Value
Access Read/Write
Need Item Yes

Controls how stepping through multiple images (for multi-icons like GIF or name@01,name@02 notation) is affected by the passing of actual time. This value is in milliseconds and enables an icon to change regardless of how fast it is moving.

ItemImageXStep

Type Value
Access Read/Write
Need Item Yes

Controls how stepping through multiple images is performed (for multi-icons like GIF or name@01,name@02 notation. For a non zero value, the x co-ordiante divided by the value is used to index an image, eg: a value of 8 changes the image every 8 screen pixels the item moves.

ItemImageYStep

Type Value
Access Read/Write
Need Item Yes

Controls how stepping through multiple images is performed (for multi-icons like GIF or name@01,name@02 notation. For a non zero value, the y co-ordiante divided by the value is used to index an image as the item moves.

ItemXScale

Type Value
Access Read/Write
Need Item Yes

Enables scaling of an item's icon in the X axis. This is a percentage, the default value of 100 is no scaling.

ItemYScale

Type Value
Access Read/Write
Need Item Yes

Enables scaling of an item's icon in the y axis. This is a percentage, the default value of 100 is no scaling.

Track

Track related properties specific to a train item, including automatically logged values and control over road allocation.

ItemLength

Type Value
Access Read/Write
Need Item Yes

Length value of the item, used with track models where length is used instead of loop delays.

ItemRouteDir

Type Value
Access Read/Write
Need Item Yes

Direction of a train item along a track, Forward (1) or Reverse (2).

ItemRouteID

Type Value
Access Read/Write
Need Item Yes

Route ID when item has been assigned a globally defined track/rail route.

ItemRouteLocationID

Type Value
Access Read Only
Need Item Yes

The object index (_Model_Objects list) of the next location specified by the train item's route.

ItemRouteSectionRoad

Type Value
Access Read Only
Need Item Yes

Enables a location to determine which road within a section a train has been assigned to.

ItemRouteStep

Type Value
Access Read/Write
Need Item Yes

Track route step number (from 1), Always indicates the next location when the item is at a portal.

ItemRouteStepCount

Type Value
Access Read Only
Need Item Yes

The number of steps in the current route of an item on a track network.

ItemTrackForwardColumn

Type Value
Access Read/Write
Need Item Yes

This sets the column that is used to look up a train's forward direction section running time. It needs to be set for each new train.

ItemTrackReverseColumn

Type Value
Access Read/Write
Need Item Yes

This sets the column that is used to look up a train's reverse direction section running time. It needs to be set for each new train.

ItemTrailColor

Type Value
Access Read/Write
Need Item Yes

Colour of the trail used to represent a train's length.

ItemTrailWidth

Type Value
Access Read/Write
Need Item Yes

Width of the trail line used to represent a train's length.

LookThroughBlock

Type Value
Access Read Only
Need Item Yes

Set non zero at the time a multi-server's delay time is evaluated if the look-through option is enabled and the entering item would be blocked from leaving the multi-server. This can be used to extend the delay time.

LoopDelayOverride

Type Value
Access Read/Write
Need Item No

Enables a model to override the track portal loop delay testing/assignment (when an item performs a TestEnter on a portal exit leading up to the track). It is useful when advanced lookahead is used in evaluating possible train routes. Planimate will revert any changes made to this attribute during lookahead. Ensure any 'Move' code does not leave this attribute in a non-zero value or portal loop delays will fail.

MultiServerLookThrough

Type Value
Access Read Only
Need Item No

Set if a multi-server is performing a look-through (lookahead past itself as an item enters it.

RouteTestRow

Type Value
Access Read Only
Need Item No

The row of a Route Selection table that is being tested. Useful when the Change Route multiple test capability is being used. This value is set only during lookahead for Change Objects immediately downstream of the object testing the routes. Otherwise this value should not be relied upon for any purpose.

TrackFillStepError

Type Text
Access Read Only
Need Item No

Textual description of any last track fill step error, after FillRouteStep() or CreateRoute().

TrackLastSectionID

Type Value
Access Read Only
Need Item Yes

The _Model_Objects index of the last section the train entered. This is also set during lookahead so a node can determine the section the train item will potentially arrive from.

TrackLastSectionRoad

Type Value
Access Read Only
Need Item Yes

The road number a train used on the section it last exitted.

TrackLineWidth

Type Value
Access Read/Write
Need Item No

The line width of track lines.

TrackLoopEntryEnd

Type Value
Access Read Only
Need Item Yes

This is the time that the train completed arrival at a location. If the Portal Option 'Track:Does Loop Delays' is set, but there was no entry delay, this time will be the same as the TrackLoopEntryStart time.

TrackLoopEntryStart

Type Value
Access Read Only
Need Item Yes

This is the time that a train arrived at a location. If the Portal Option 'Track:Does Loop Delays' is set, and a loop entry delay was required, this is the start time of the loop entry delay period. During the Loop Entry Delay period, the section remains unavailable and the train cannot begin to leave the Portal.

TrackLoopExitEnd

Type Value
Access Read Only
Need Item Yes

This is the time that a train actually began to move in the previous section (after it completed its Loop Exit Delay). If the Portal Option 'Track:Does Loop Delays' is set, but there is no exit delay, this time will be the same as the TrackLoopExitStart time.

TrackLoopExitStart

Type Value
Access Read Only
Need Item Yes

This is the time that a train began to leave the previous location. If the portal Option 'Track:Does Loop Delays' is set and a loop exit delay was required, this is the start time of the loop exit delay.

TrackRoadSpacing

Type Value
Access Read/Write
Need Item No

The spacing between track roads, in pixels.

TrackSectionNominalTime

Type Value
Access Read Only
Need Item Yes

The nominal running time for the Track section that the train last used. This may different to the actual running time which could be modified by section restrictions.

TrainTailData1

Type Value
Access Read/Write
Need Item Yes

Data set here at a location will be broadcast to the current location in item attribute _taildata1 when the tail of the train enters it.

TrainTailData2

Type Value
Access Read/Write
Need Item Yes

Data set here at a location will be broadcast to the current location in item attribute _taildata2 when the tail of the train enters it.

TrainTailData3

Type Value
Access Read/Write
Need Item Yes

Data set here at a location will be broadcast to the current location in item attribute _taildata3 when the tail of the train enters it.

TrainTailData4

Type Value
Access Read/Write
Need Item Yes

Data set here at a location will be broadcast to the current location in item attribute _taildata4 when the tail of the train enters it.

Owning Portal

These enable code in a sub-system to access properties of the portal owning that sub-system which is particularly useful when those portals are nodes or locations on a network. They work by proximity in the hierarchy and do not require use of an object label.

CurrentPanelStatus

Type Value
Access Read/Write
Need Item No

The object state of the portal owning the panel on which this attribute is referenced. The portal doesn't need an object label but it must be configured for custom states.

CurrentPortalHeight

Type Value
Access Read Only
Need Item No

The height in pixels of the owning portal's current icon.

CurrentPortalWidth

Type Value
Access Read Only
Need Item No

The width in pixels of the owning portal's current icon.

CurrentPortalX

Type Value
Access Read/Write
Need Item No

X position (in panel co-ordinates) of the owning portal to the panel where this executes. Does not require an object label.

CurrentPortalXScale

Type Value
Access Read/Write
Need Item No

Percentage scaling to apply to the owning portal's width, normally 100.

CurrentPortalY

Type Value
Access Read/Write
Need Item No

Y position (in panel co-ordinates) of the owning portal to the panel where this executes. Does not require an object label.

CurrentPortalYScale

Type Value
Access Read/Write
Need Item No

Percentage scaling to apply to the owning portal's height, normally 100.

OwningPortalLocation

Type Value
Access Read Only
Need Item No

The object index (_Model_Objects list) of the first portal above the object executing this in the hierarchy that has an object label in the _Model Objects Label List. Typically this is a location on a map.

Strings

These are text formatted attributes, useful with string assignment ($=) and string operations such as strfind().

DatasetFileAndPath

Type Text
Access Read Only
Need Item No

File path and name the modeller last passed to SetLastDatasetFile().

DataSetName

Type Text
Access Read Only
Need Item No

Name of file modeller last passed to SetLastDatasetFile().

LastAccessedDataFile

Type Text
Access Read Only
Need Item No

Stores the last file read/written in file operations.

LastAccessedDataFilePath

Type Text
Access Read Only
Need Item No

Stores last path/filename read/written in file operations.

LastErrorFileNamePath

Type Text
Access Read Only
Need Item No

Path of last file where Ctrl-V paste errors were logged.

LastLockFileError

Type Text
Access Read Only
Need Item No

Text giving detail on a failed AcquireFileLock().

LoadFileNamePath

Type Text
Access Read/Write
Need Item No

Path of /DATASET command line parameter or any file name parameter (eg: via a file association) for a compiled application.

LocalComputerName

Type Text
Access Read Only
Need Item No

Network name of the computer the model is running on.

ModelName

Type Text
Access Read Only
Need Item No

Name of the model.

UseLocale

Type Value
Access Read/Write
Need Item No

Determines if internationalisation is used when comparing strings. This handles proper comparison of non English languages but is much slower.

UserName

Type Text
Access Read Only
Need Item No

The name of the user, eg: 'John Smith'. This name is not necessarily unique. Only supported in domain environments.

UserNameCanonical

Type Text
Access Read Only
Need Item No

The name of the user in canonical format as used on domains, eg: 'somewhere.com/sales/jsmith'. Only supported in domain environments.

UserNameNTCompatible

Type Text
Access Read Only
Need Item No

Retrieves the name of the user in the older NT compatible format.

UserNameQualified

Type Text
Access Read Only
Need Item No

Retrieves a comma delimited list of attributes and values that uniquely define the user, eg: 'CN=John Smith, OU=sales, DC=somewhere, DC=com'. Only supported in domain environments.

Run Engine

These provide information and control over the Planimate simulation engine.

ActiveBroadcastIndex

Type Value
Access Read Only
Need Item No

Returns the _Broadcasts label list index of a currently active broadcast or 0 if none active.

AdvancingToTime

Type Value
Access Read Only
Need Item No

This is non zero whilst Planimate is advancing to time without animation.

AnimationStartingMessage

Type Value
Access Read/Write
Need Item No

Sets option that determines whether 'Animation Starting' dialogs are displayed after a run advance.

AutoRestartAfterError

Type Value
Access Read/Write
Need Item No

Setting this causes the engine to restart a run after a model error. Requires option 'Restart When Model Stops' to be enabled. Dependence on this should be avoided. Does not work if 'Friendly Error Messages' is enabled. The usual model error dialog appears for 10 seconds then if no interaction, the model restarts. Use s.LastRunStopReason if relying on restarts.

BatchRun

Type Value
Access Read Only
Need Item No

This is non-zero if running in batch mode (no UI possible).

CancelClose

Type Value
Access Read/Write
Need Item No

Set to cancel a previous stop run/close, as may have been triggered by a stop exit.

ContinueCurrentTimeOnly

Type Value
Access Write Only
Need Item No

Set non-zero during a broadcast to Continue the run and pause after all events at the current time have been processed. Useful with the low priority zero delay multiserver option.

ContinueRun

Type Value
Access Read/Write
Need Item No

Setting this non zero during the processing of a broadcast from a button press will cause the simulation to continue instead of pausing after the broadcast item completes.

DisableColumnRefUpdates

Type Value
Access Read/Write
Need Item No

Set this non-zero to disable automatic updates of column references when a large number of labelled table columns are added or removed.

DisableUndo

Type Value
Access Read/Write
Need Item No

Setting this non-zero during lookahead disables the revert mechanism that normally occurs when a routine is executed during lookahead (before the item actually moves). Once set, attributes and tables altered during lookahead will not be reverted. This value must be reset before the routine finishes. Modified data does not initiate dependency unblocks. For advanced routing use only.

DoingTrackCheckNext

Type Value
Access Read Only
Need Item No

This is set non-zero whilst a track capacity lookahead is being performed. Track locations use this to respond to requests for capacity, typically by presenting capacity (allow), a block (deny) or deferring to another object via a portal exit.

DS2LoadObjectLabelByIndex

Type Value
Access Read/Write
Need Item No

If set, DataSet2 loads will use the index of labels in lists instead of matching the text of attributes and columns formatted as label lists.

FECFrontEvents

Type Value
Access Read Only
Need Item No

How many events pending on the FEC at the current time.

FECFutureEvents

Type Value
Access Read Only
Need Item No

How many events pending on the FEC at future times.

HaveCurrentPendingEvents

Type Value
Access Read Only
Need Item No

Is non-zero if the FEC has any events scheduled to occur at the current time. This can indicate unfinished dependencies that have yet to be processed. Modellers may want to use this to avoid new actions in some cases.

LastRunStopReason

Type Value
Access Read Only
Need Item No

Reason code (from _stop_reasons list) why the run engine last stopped. Useful in handling restarts and model loaded conditions as not yet run is a reported reason.

LastRunStopTime

Type Value
Access Read Only
Need Item No

The clock value at the time the engine was last stopped.

ModelNeedsSaving

Type Value
Access Read/Write
Need Item No

This is the changed flag for a model, a modeller can reset it. This is not used for compiled applications.

MultipleRunCount

Type Value
Access Read Only
Need Item No

Zero for a normal run or the number of runs for a multiple run.

PauseAfterAdvance

Type Value
Access Read/Write
Need Item No

Set this to a non-zero value to make the run engine pause after an advance-to-time is performed.

Planimate64

Type Value
Access Read Only
Need Item No

This is non zero if running a 64 bit version of Planimate.

RandomSeedImmediate

Type Value
Access Read/Write
Need Item No

Enables reinitialisation of random generator seeds without having to restart the engine.

RandomSeedOnRestart

Type Value
Access Read/Write
Need Item No

Sets the random seed for the NEXT run, used when a run restart dispatcher is used.

RealTimeBCInEvent

Type Value
Access Read/Write
Need Item No

Controls if a real time broadcast is processed whilst another event is being processed.

Rnd01

Type Value
Access Read Only
Need Item No

A uniformly distributed random balue from 0..1 for use in the distribution pattern dialog. This is useful when creating custom distributions, calling DLLs etc.

RoutineInLookahead

Type Value
Access Read Only
Need Item No

This is non zero if a routine is being executed in look-ahead, before an item actually moves. For very special cases only. This is always set for messages sent in lookahead.

RunNumber

Type Value
Access Read Only
Need Item No

Run number when multiple runs are performed, starts at 1.

TestNumber

Type Value
Access Read Only
Need Item No

This is non zero when running with /TESTRUN. Multiple tests for a given model (in TESTS.CSV for the test suite scripts) use increasing values startng at 1.

TestResult

Type Value
Access Read/Write
Need Item No

A model undergoing a test must set this to a value from l._test_results to report success or failure. Not setting this value is a failure of the test.

TestTarget

Type Text
Access Read Only
Need Item No

A string a model can compare against for a successful test run, typically a SHA256 hash of key output tables.

UserMode

Type Value
Access Read Only
Need Item No

This is non-zero if the editing tools are unavailable (ie: the system is in user mode or a compiled EXE).

Display/Mouse

These control display, animation and give access to the mouse co-ordinates.

ActivityBarColour

Type Value
Access Read/Write
Need Item No

Colour of the activity state bar in the status bar. This is either a colour index or an ARGB value.

ActivityState

Type Value
Access Read/Write
Need Item No

This controls a horizontal bar in the status bar which can be used to indicate progress. A value from 0..100 controls the proportion of the bar that is filled. A value of 0 removes the bar. It is auto-zeroed at the start and end of a run. As this updates even when fast-advancing without animation, avoid setting this too often to avoid impacting the run time.

ActivityState0_1

Type Value
Access Read/Write
Need Item No

This is like s.ActivityState except a value from 0 to 1 controls the bar. As with s.ActivityState, do not set too often if advance to time performance is important.

AnimationUpdateInterval

Type Value
Access Read/Write
Need Item No

Determines how often (in model time) animation updates occur, 0 prevents animation updates except when items enter or leave an object. USeful with spatial networks and tracks.

CurrentPanelVisible

Type Value
Access Read/Write
Need Item No

On read it returns non zero if the panel where the read is executed is visible. If a non zero value is written, the owning panel is made the active panel in the main window.

EnableRepaintBC

Type Value
Access Read/Write
Need Item No

Set this to a non-zero value to receive a _Panel_Repainted broadcast. This is automatically reset after sent.

EnableTableCellEdit

Type Value
Access Read/Write
Need Item No

Setting this non-zero in a 'before edit' table cell click broadcast enables the default cell click edit to occur. This is automatically reset. The table view option Don't Defer BC on FEC' must be enabled and the broadcast handler must not change panel.

GanttDragAlpha

Type Value
Access Read/Write
Need Item No

Alpha intensity of a dragged gantt block (0..255).

GanttDragIntensity

Type Value
Access Read/Write
Need Item No

Brightness of a dragged gantt block (0..255).

ItemAnimateSpeed

Type Value
Access Read/Write
Need Item No

Sets the Animation Speed value which controls how fast items move on paths between objects.

LockDrawing

Type Value
Access Read/Write
Need Item No

Set non zero to block updates to the window. You may need to force a repaint when resetting this value to ensure the window is properly updated.

LockPortalDrag

Type Value
Access Read/Write
Need Item No

Enables the modeller to enable/disable dragging of portals by end users. Used in conjunction with portal specific options to enable dragging.

MouseDownX

Type Value
Access Read Only
Need Item No

Panel x co-ordinate where a mouse down occured. The mouse may have moved since.

MouseDownY

Type Value
Access Read Only
Need Item No

Panel y co-ordinate where a mouse down occured. Mouse may have moved since.

MouseX

Type Value
Access Read Only
Need Item No

Returns the current mouse X position in panel co-ordinates.

MouseXOwner

Type Value
Access Read Only
Need Item No

The current mouse x co-ordinate in co-ordinates of the first visible panel which owns the panel where this executes.

MouseXWindow

Type Value
Access Read Only
Need Item No

The current mouse x position in Windows screen co-ordinates..

MouseY

Type Value
Access Read Only
Need Item No

Returns the current Mouse Y position in panel co-ordinates.

MouseYOwner

Type Value
Access Read Only
Need Item No

The current mouse y co-ordinate in co-ordinates of the first visible panel which owns the panel where this executes.

MouseYWindow

Type Value
Access Read Only
Need Item No

The current mouse y position in Windows screen co-ordinates..

PanelOwnerVisible

Type Value
Access Read Only
Need Item No

Non zero if the the panel containing the current panel executing this operation is visible.

TimeScaling

Type Value
Access Read/Write
Need Item No

Sets the Real Time Scaling value which causes delays in a model to be reflected as delays in real time.

TraceAnimation

Type Value
Access Read/Write
Need Item No

Set to 1/0 to enable/disable the Trace Animation debugging option, where all items are followed as they move between panels.

VisiblePanelID

Type Value
Access Read Only
Need Item No

The _Model_Panels index of the panel in the main window. This is superceded by s.VisiblePortalIndex.

VisiblePortalIndex

Type Value
Access Read Only
Need Item No

Returns the owning portal index (_Model_Objects list) of the owning portal of the current panel, or 0 for the top level panel. If no owning portal index is assigned, it returns -1.

Referenced Table

These give properties of a table referenced elsewhere in a routine operation without having to re-specify the table.

DataErrorColumn

Type Value
Access Read Only
Need Item No

Set when ReadFromFile() encounters an error to the first error row.

DataErrorRow

Type Value
Access Read Only
Need Item No

Set when ReadFromFile() encounters an error to the first error row.

TableColumns

Type Value
Access Read Only
Need Item No

Number of columns in a table being referenced in an operation.

TableRows

Type Value
Access Read Only
Need Item No

Number of rows in a table being referenced in an operation.

Other

Miscellaneous other system attributes.r

BendPointIcon

Type Text
Access Read/Write
Need Item No

Name of icon to use for bendpoints instead of the default bend point cross.

BendPointSize

Type Value
Access Read/Write
Need Item No

Pixel width/height of the default bend point cross.

ButtonPaintID

Type Value
Access Read Only
Need Item No

Set while a paint object checks its visibility/state attribute reference. If the object is in the _Paint_Objects label list, it can be used to assist in looking up visibility for that paint object.

CPUID

Type Value
Access Read Only
Need Item No

A value identifying the type and revision of the CPU. This is not a unique identifier as modern cpus do not support this.

CurrentObjectLocation

Type Value
Access Read Only
Need Item No

Index of the location of the object triggering this. Does not require an item.

EnableDebugLogger

Type Value
Access Read/Write
Need Item No

Enable the event logger/debugger system. This is useful where a modeller wants to start logging in a specific condition.

JobID

Type Value
Access Read Only
Need Item No

This gives access to the string passed using the command line /JobID option.

KeyDate

Type Value
Access Read Only
Need Item No

The date (based on the run calendar time reference) that the active key file was created.

KeyFlags

Type Value
Access Read Only
Need Item No

key bits for the current license keys, BitAnd with 7 for custom PBA sub-code.

KeyName

Type Text
Access Read Only
Need Item No

The user name for the active key file.

KeyOrg

Type Text
Access Read Only
Need Item No

The organisation name for the active key file.

KeySerial

Type Value
Access Read Only
Need Item No

The serial number of the active key file.

LineTestMargin

Type Value
Access Read/Write
Need Item No

Threshold used to detect clicks near lines (eg: spatial links).

NullAttribute

Type Value
Access Read/Write
Need Item No

A null location enabling data to be ignored, typically used for return results. Some operations report errors instead of returning the error code if their target is this.

ODBCErrorStatus

Type Value
Access Read Only
Need Item No

ODBC operations have an option to not stop the run on error. A non zero value indicates an error in the most recent ODBC operation. This must be read immediately after code that performs the ODBC operation.

PBA

Type Value
Access Read Only
Need Item No

Is non-zero if running as a compiled exe.

PipeTableRow

Type Value
Access Read Only
Need Item No

Pipe table row for use with pipe properties only. Enables a pipe to reference its own configuration row within its properties.

PrintOrientation

Type Value
Access Read/Write
Need Item No

Enables setting the page orientation before a print. Use a value from the _print_orientation label list. The value is set to the actual orientation after a printout.

PrintPaperSize

Type Value
Access Read/Write
Need Item No

Enables setting the paper size for printing. Use a value from the _print_papersize label list. The vlaue is set to the actual paper size code after a printout.

RuntimeBreakPointControl

Type Value
Access Read/Write
Need Item No

Provides control of any breakpoint(s) in the model. This works in addition to modeller defined breakpoint control conditions, and is useful where a remote condition determiens whether existing breakpoints in the code should be active.

SpatialLinkScanDepth

Type Value
Access Read/Write
Need Item No

Limits how deep the engine will scan a spatial link network looking for the closest route to the target. This value is not saved with the model. The default is not to limit the search which may create problems with dense complex networks. This only impacts animation, not simulation result as the time to target is explicitly set.

SystemID

Type Value
Access Read Only
Need Item No

The Volume Serial Number of the drive containing the Windows system32 directory. It may be useful in determining a unique installation ID but remember users can set the volume serial number of a drive.

TotalObjectLabelCount

Type Value
Access Read Only
Need Item No

This returns the number of objects which have labels registered in the _Model_Objects label list.

UserEditedData

Type Value
Access Read/Write
Need Item No

Set non zero when a user edits an attribute view or table view/editor. The modeller can reset this. Is reset when the model is saved. Tables and Attribute Views have a Track Changes option to not set this when they are edited.