ReleaseNotes:Planimate 5.09 Release Notes

From Planimate Knowledge Base
Jump to: navigation, search


  • NEW New system attribute s.RouteTestRow (Track submenu) enables a modeller to query which row of a Route Selection table is being tested. This is useful when the change objcet multiple route test capability (added in 5.09y) is being used, as it enables the modeller to access other data they are storing in the table.
    The value is the row number from the table.
    This value is set only during lookahead for change objects immediately downstream of the change object that is testing routes from the table. Otherwise this value should not be relied upon for any purpose.
  • NEW Subsystems and Panels in the model explorer are sorted by name
  • NEW Item table references can have values written to them if the table referenced by the item is in scope at the reference doing the writing


  • NEW Table->Advanced->Expected Row Count
    This value enables a modeller to specify how much row memory should be allocated for the table upfront.
    If a table is going to grow to a known mumber of rows, performance can be greatly improved by setting this value so that the table is allocated right from the start. This avoids the table having to reallocate itself as more rows are added, which wastes time and worse, fragments the system memory into small, useless chunks.
    Setting this value too high will waste system memory so take care.
    The Routine operation AllocateTableRowMemory does the same as this setting, except it can be dynamic. This value is useful where the expected maximum size of the table is known upfront.
  • NEW Table->Advanced->Default New Column Format
    This enables the initial format of newly added columns to a table to be specified. This can include label lists. This is useful for tables which import from data which adds columns which should be of a particular format.

  • NEW The route selection dialog in the change object now enables a number of routes to be specified and they will be tested sequentially, with the first "accepting" route taken by an item.
    The routes to test are specified in column 1 of the table. The reference must be to the entire table. The rows in this column should be set to the route IDs to test.
    An additional "row limit" attribute can be set. This provides a convenient means of limiting the number of rows tested. This is useful because the table needs to be prepared and available during lookahead, during which time rows cannot be added/removed from a table. The default of -1 for the row limit will scan all rows in the table.

  • CHANGE The route selection dialog has been cleaned up
  • CHANGE Previous versions of Planimate enabled a train route assignment using a table of routes hard-coded in the change object by the modeller. (local table mode). This mode of operation has been removed. Route selection is now always made using the global route IDs associated with the routes.


  • FIX Routine operation "RegisterBlockedTrain" works way up hierarchy of portals until it finds a portal that is connected to a track network.
    This ensures that the same portal gets registered by the modeller and by the track network itself


  • NEW New routine operation "RegisterBlockedTrain" enables a modeller using tracks to register that a train has become blocked for reasons the track system is unaware (eg: modeller's own lookahead has determined the train should not move).
    This operation should be used in lookahead.
    The train is registered at the current portal the routine that executes this operation is located. The portal exits of this portal will be unblocked when the track system attempts an unblock. Hence the train should be reachable in a reverse direction from the portal exits (ie: without an intervening capacity) otherwise the unblock message will never reach the capacity at which the train is waiting.

  • FIX Exporting of free text cells to clipboard removes new lines AND carriage returns to prevent cells being broken up. (There isn't a standard way of bringing multiline text into cells via the clipboard).


  • FIX Track error 1156 no longer occurs if a train is blocked multiple times on different tracks (due to complex lookahead) at the same portal. This works around the error where lookahead is being used to test multiple outgoing tracks from that portal and the engine has had Move() recursed (as part of the lookahead) which caused it not to reset the item's blocked history upon a subsequent test of a track.


  • NEW Table and Graph Views without a title show a tool tip in edit mode when the mouse is near the top where the context sensitive menu appears. This is useful in identifying the view and also finding the location for the context menu
  • NEW Cell Views can now have a broadcast associated to send aftor an edit, like attribute views
  • NEW PL will attempt to show more detail following an internal error 1156 error (track system train being blocked at 2 locations).
  • FIX Label lists used in attributes in routines now identify the owning object
  • NOTE Partial work on RHS graph scales underway; editors and data saving/loading are present but not actually used yet.
    Report if any existing graph code is broken compared to 5.09t


  • FIX Autosave with alternate filename now works properly
  • FIX "Immediately Copy To System Clipboard" now works with customised table views


  • CHANGE Autosave of models (if enabled has been changed:
- it saves to modelname(AUTOSAVE).mdl hence not disrupting
the modellers explicitly saved files and backups
- it does not save the DB to the autosave files
- it does not clear the "saved" flag
- it does not clear tables which are set to clear before save
This should make autosave more useful as a backup and less intrusive to work flow.
  • CHANGE A force repaint routine operation is ignored if a repaint is already underway. This was made possible by the modeller doing a force repaint within a table row scroll broadcast being sent by PL as it first showed a table view.
  • NEW "Run Behaviour" Option "Immediately Copy To System Clipboard". Normally, data copied from tables in PL stays internal to PL until focus is switched to another application, at which point it is copied to the windows system clipboard.
    This was needed on older systems where copying to the system clipboard used precious system memory and was slow.
    With this option on, the copy to the system clipboard happens as sson as the data is copied.
    This option is useful where modellers implement the ctrl-v handler for pasting and they want internal PL data, copied with ctrl-c to be available (ie: the data needs to be in the system clipboard).


  • CHANGE The Log Driven Graph has been rewritten. It now supports the configuration of overlays being defined dynamically using a separate configuration table. This means graph configuration details do not need to be provided as extra columns in the source data, potentially saving a lot of memory for large data sets. Other new features:
- a scale factor for Y can be provided as well as the offset. This is
useful for plotting data with different ranges
- plots can be enabled/disabled/reformatted without changing the
source data table
- data path has less overhead so it should be faster
Note that the "End Point Sets Colour" option is no longer supported. For horz bars and lines, the start point sets the colour/width/line style. For vert bars, points and labels, the current point sets their properties.
Older models that used the end point to set properties for bars and lines will need some work.
The plot mode names have been changed.
Documentation is here:
Due to the separate overlay configuration table, it is now viable to consider plot modes which require more parameters to specify. There is now future possibility for:
- plotting with icons/bitmaos instead of points - other properties such as text rotation - 3D transformation of plots
enabling/disabling overlay does not alter scale
Note there may be impacts on column overlay graphs These need testing
  • FIX "Show Location" is greyed out in the error/breakpoint dialog if the error is occuring at a time where a panel change would break the platform, for example an error whilst a panel is being drawn.
  • FIX Planimate table views were sending scroll update broadcasts whilst they were searching for the correct scroll offset to show a given cell. This created an "elevator effect" when scrolling a large table AND a scroll broadcast was used AND the scroll broadcast did a repaint.
    PL now only sends the scroll broadcast once it has determined the correct scroll offset for the table view.


  • FIX Find list now goes to correct object when list has been sorted
  • FIX Fix a crash bug in table editor -> wasn't handling case of a font change making no rows visible when updating its titlebar


  • NEW Find capabilities for change objects performing FILE actions, ODBC and route assigns
  • NEW Options under Settings->End User
Hide Title Bar   : Shows main window without the title bar in user mode
Hide System Menu : Hides the system emnu and close box in user mode (equivalent to command line option /NOCLOSE)
Maximise On Load : Maximises the main window when loading a PBA ONLY (equivalent to command line option /MAXIMISE)
  • NEW The model INI file can include a section to configure sockets
    [Sockets] "socketname" "ip-addr" "port-number"
    "ip-addr" is ignored if the socket is configured as a server and should be set to ""
  • CHANGE Planimate and Planimate PBAs no longer create a PLANIMAT.DBG file by default. Use the /DEBUGFILE command line option to have PL create the file, which is useful when debugging.
    The "Show Debug Log" option in the tools menu is now hidden unless this commandline option is used.
  • CHANGE Removed the old "Run Reports" (RUN files) that PL generated as they are obsolete given the way PL is now used. If you miss it, let me know.
  • NEW Enabled alternate code for blitting icons for non WinNT systems. Rotated icons may look strange but it makes PL usable under WINE when its in Win98 mode


  • FIX Saving standalone EXEs is now available again with more recent keyfiles issued. Restrictions still apply if you do not have an "open PBA" keyfile.
  • FIX If a table with a column formatted for freetext but containing no rows was copied, PL would fall over when the model was saved.
  • FIX Enabling the Pause At Events debugging option whilst Model Clicks While Running (engine option) is enabled will give a helpful message and not enable the option. These options cannot be on together.


  • FIX Fixed a crash due to a buffer overflow when setting the tuple name of a table column from routine code. Planimate will now complain if an attempt is made to set a tuple name longer than the allowed limit (currently 32 characters).
  • FIX Fix a crash when editing expressions and "[]" were inappropriately used, also fixed some leaks in error cases which could cause "scan count" warnings to appear until the model was reloaded into a fresh instance of PL
  • FIX Fix a crash when a bend point in a pipe, spatial link or track was selected and the link was directly deleted (not via the multiple selection).


  • NEW Column properties TextColor and BackgroundColor
  • NEW Routine operation "FormatNameIntoLabel" retrieves the internal (tuple) name of a table or column and makes a label out of it. If the label already exists, its index is returned.
  • CHANGE Routine operation "FormatTitleIntoLabel" now returns the index of an existing label instead of creating a duplicate.
  • CHANGE SetFormat accepts an entire labellist as its label list name parameter, resulting in the label list's name being used.
  • FIX GetFormatListName was adding duplicate labels. It now returns the index of any existing label
  • FIX Fixed a typo in a route error message
  • CHANGE Have set up the old to redirect note requests made by older versions of Planimate (when the option to use the web for context help was used) to the appropriate page on
    This means older versions of Planimate will also have access to the material on the wiki and the idkbase server can be decomissioned.


  • NEW Default label list "_value formats" lists the names of the formats returned by GetFormat()
  • NEW Routine operations GetFormat() and SetFormat() enable the format of a data target to be retrieved. The format is a number corresponding to the formatting option. The _value formats label list enumerates the formats supported.
    The SetFormat operation includes a third parameter which is ignored unless the assignment is for a "Label" format which which case it should name the label list.
  • NEW Routine operation "ReFilterTableView" reapplies any active filter to data that has changed in a table (eg: after a sort). It gives no error if there is no filter active.
  • NEW Routine operation "GetFormatListName" will create a label of the name of the label list that the given data is formatted for. This is useful when GetFormat() indicates the format is for a labellist and you want to know which one.
  • NEW Paint state change broadcast sets _paintid to the index of the paint object

  • NEW Some Help menu item enhancements to facilitiate getting useful content out of PL to feed the new wiki
    Help->Show All Labels: shows all user label lists and their contents Help->Show all Routine operations: shows all routine operations.
    The text includes formatting comamnds for the wiki.
  • CHANGE Routine Operation "FormatForList" is recategorised under special to match the other meta-formatting operations
  • CHANGE Planimate now uses the new knowledgebase at the URL is configurable in the Planimate INI file and will be set up automatically when you run Planimate.
    By default Planimate will use the internal help file and ctrl-clicking a context help button will use the wiki.
    Setting HelpIDKBaseEnable=1 in the INI file reverses this behaviour, making the wiki the default.
    The IDKBase code has been removed from PL.
  • FIX Had incorrectly labelled the "Write Column Labels" option in the Change Object->File Write options
  • FIX Column filter dropdown font now matches the column font
  • FIX Planimate was not bumping the INI file version when saving an updated INI file.
  • FIX If an import from clipboard was performed in the table editor into a table with existing rows and one of the columns was formatted for free text and a message needed to be displayed during the import (eg: missing label) PL would give LinkedList errors as the view would try to redraw what it thought wwre the existing rows but which since had been deleted

5.09k [new MDL file version]

  • NEW A new column property and associated label, RotateTitle enables title rotation of table columns to be set at runtime


  • CHANGE In object editing mode, with the "show all paths" option enabled, arrow heads over objects no longer take the click. This makes more sense as in object mode, objects should have the click precedence.
  • FIX Fixed the CTRL-V broadcast from 5.09i, it wasn't putting the key code in the right attribute. Made _contextclick = 2 for key events.
  • FIX Selecting multiple objects no longer snaps to a square box when the shift key is pressed


  • NEW Added new routine operation "GetMyDocumentsName" which returns a path including a specified filename and folder name within the My Documents folder. The folder is created if it doesn't exist.
  • NEW Table click broadcasts now include the Data Object List index assigned to the table (0 if none assigned) in attribute "_dataid". This is useful where a number of tables send the same broadcast and you want a way to tell which table the broadcast is for.
    A future version will include an operation to convert a data object index into a table reference
  • NEW Typing CTRL-V in a table view with cell click broadcasts enabled can now send a cell click broadcast, as if the view was clicked, but with a new attribute called called "_key" set to the ascii code of CTRL-V (22).
    This enables a modeller to handle the paste request, typically using the paste routine op introduced in 5.09e.
    The broadcast will only be sent if the System->Modeller option "Enable Table Key Event Broadcasts" is enabled. This is so old models dont get confused by unexpected "cell click" broadcasts. Before enabling this option, modellers should update existing cell click handlers to test if "_key" is non zero, to determine if the event is an actual table click or a command key press. This is best done in the code that checks for _context (right mouse button) clicks.
    Other keys may be added in the future.
    If just a cell is selected, its location is set in _view_row, _to_row etc.
    If a cell range is selected, then the cell range is set, top left in (_view_row,_view_col) and bottom right in "_to_row,_to_col) ie: the actual current selection isn't sent. This is because if the user has some cells highlighted, they'd expect a paste to occur into those cells. For ranges, the modeller can pass this info to the PasteIntoView routine operation.
  • CHANGE Renamed routine operation "GetDocumentName" to "GetAppDataName" to more accurately reflect what it does - that is, create a folder/ file specification within the user's Application Data folder.
  • CHANGE Change object->File write operation now has separate control over including row and column labels. In previous versions, one option controlled the presence of both
  • NEW Experimental "Rotate Title" option on table columns, draws the title vertically. The Row Title lines table option is useful in making more space for the titles.


  • NEW /NOCLOSE command line option prevents close box, windows menu icon and min/max box. This is useful where PL is an embedded application
  • CHANGE Fixed bug in message entry selector which caused a lockup if a message entry had a long name. Also made the pick dialog bigger
  • CHANCE Internal clenaup of startup window code and removed some unused network code


  • NEW Routine operation "ForceRepaintPanel" enables a repaint of just one panel. This is useful when the panel is in a viewport and you dont want to repaint everything
  • NEW Object property "ObjectDraggable" can set this property at runtime. This is useful for portals
  • NEW Panel option "Broadcast Background Drags".
    When this is selected, drags in the background of a panel are broadcast to the panel as Broadcast "_Panel Drag"
    The following fields are sent:
_panel    : the panel index of the panel clicked
_command  : 1 = drag starting _dx,_dy are 0)
2 = drag update   _dx,_dy are delta
3 = drag end      _dx,_dy are final delta
_dx,_dy  : delta dragged, from the starting point _keys  : key down flag bitmask 1=shift, 2=ctrl, 4=alt _buttons  : button down state, 1 = left button, 2 = right test this with a bit mask as future versions may have combined values

This is useful in implementing draggable map displays
  • CHANGE Planimate object co-ordinates are now stored as integers instead of double precision values. Any models that depended upon fractional object co-ordinates will need to be reworked.
    In the past spatial link models where objects were placed on top of each other required fractional co-ordinates, now that the link cost can be set explicitly, the fractions are no longer needed.
  • FIX Cleaned up paint object runtime property/text setting to be more efficient if the paint object is not on a panel with any other panels inheriting from it


  • NEW Routine operations "HandlePopupMenu" and "SetMenuBar"
    HandlePopupMenu enables a selection to be made from a hierarchic popup menu. The value is returned immediately and it can be used in lookahead (useful for advanced debugging).
    SetMenuBar enables a complete modeller customsied menubar, with hierarchic menus, to be built in one step. It superceeds the "ClearCustomMenubar" and "AddListToMenu" routine operations.
    Both these operations take a 3 column table as a parameter (the table can have more than 3 columns but only the first 3 are used).
    The columns are: depth: sets the depth of the submenu, 0 = top level label: the text label for the menu item
id   : return id for menu item

The menu structure is defined by enumerating the menu items in prefix order, for example for:
File Edit Tools ------------------- New Cut Add--->Table Load Paste Label Save Reset Quit

depth label id 0 File 0 1 New 1 1 Load 2 1 Save 3 1 Quit 4 0 Edit 0 1 Cut 5 1 Paste 6 0 Tools 0 1 Add 0 2 Table 7 2 Label 8 1 Reset 9

Notes: - typically it will be useful to use the same list & format for column 2 and 3, so the command names and handler names are common - A label of '-' is a separator - Dont use a separator as a submenu - Menubars can not have selection items at their top level, (depth=0), only submenus. Popup menus do not have this restriction - sub menu items need not have an ID set as they are not themselves selectable
  • CHANGE The step editor will be sized bigger to support editing the ImportIntoView routine operation without scrollbars, but it needs to be the first routine line edited when the routine is opened as the step editor gets cached while the routine list is open
  • CHANGE Reworked the status bar to show the item message area even when the activity indicator icon has been hidden
  • CHANGE For table columns formatted with the "Open With Combo List" option, the combo will close completely when a click outside the list occurs, instead of just collapsing the list.
  • FIX Folder names with "."s in them were causing problems for the icon mover (and probably other places) these should be resolved


  • NEW Routine operation "ImportIntoView"
    This operation enables the modeller to trigger importing of the current Windows clipboard into a table view. It is intended to be invoked in a routine triggered by a cell click in a table view
    The operation takes the following parameters:
Table  : this should be an entire table reference
Panel  : A portal or panel label referring to the panel containing the
view of the table
TL Row : These specify the top left cell into which data will be TL Col : pasted
Options: Unused at the moment
Rows Read : These specify the number of rows and columns read from Cols Read : the clipboard. If an error occurs, then they refer to the cell where the error occured, relative to the
Return result: This is 0 if there were no errors, otherwise the following values are currently defined:
1: undefined error 2: error placing clipboard into temp file 3: disk full while writing clipboard 4: no data in clipboard 5: incomplete rows encountered 6: formatting problem for values 7: undefined label or label lookup failure
If the clipboard data extends past the columns in the table, the extra columns in the source data are ignored
If the clipboard data extends past the rows in the table, new rows are appended to the table EXCEPT if a row filter is active, in which case the extra rows are ignored
Views with customised column arrangements/formats are supported; the data is placed in the table according to the column arrangement of the view.
If the view has an active row filter, then the data is pasted into the rows that are currently visible as if they were contiguous.
Cell specific formats are recognised and used in formatting incoming data (including labels). This can assist in moving "report" type tables back into PL.
Free text cells are supported but not new lines etc within them
Labels are added automatically unless the table column has the "Only Select Existing Labels" option or the label list has the "Only Modellers Add" option and the platform is in User Mode. In these cases, unexpected labels stop the import and return the undefined label error code
  • CHANGE The routine framework now supports up to 8 "parameters" per routine operation which is an improvement from the originally designed 3. Greatly reduced the number of places in the code where theres code dependent on this limit.
    This means more advanced routine operations can be added with more parameters without having to use tables etc. to carry the parameters.
  • CHANGE New category in the routine editor "Table View" as we've got quite a few operations specific to them


  • NEW Pressing SHIFT while forming a box or resizing a box and dragging the mouse will make that box into a square. This is useful for forming circles.
  • NEW Graph mode "Point" for plotting points. The width parameter sets the radius of the points. Note there is no clipping to the graph bounding box.
  • NEW Routine operation GetFilteredRows Returns a list of values which are the rows visible to the user due to the row filter settings. If no row filter is being used, this returns an empty table.
  • CHANGE Renamed TableViewRows and TableViewCols (routine operations) to TableViewVisibleRows and TableViewVisibleCols respectively. Existing references are automatically updated
  • NEW Routine operation "TableViewRows" returns the number of visible rows in a table view. This may differ from the number of actual rows in the table if there is a row filter active
  • NEW Highlighting and copying rows whilst a row filter is active will now only copy the visible rows
  • CHANGE Have renamed the attributes sent with the "cell clicked" broadcast to enable existing code to keep working when customised views are used.
    "_row" and "_column" are now called "_view_row" and "_view_col". These are the row/col from the view's perspective that was clicked
    "_data_row" and "_data_col" are now "_row" and "_col" These are the row/col from the source table's perspective.
    Any model with customised views, which used _data_row and _data_col to reference the original table needs these references renamed to _row and _col respectively. This not automatically done by the platform.
    If in doubt, check for any item attributes called _data_row and _data_col.
    Note that _to_row and _to_col continue to refer to the end of a selection from the view's point of view. These have not changed.
  • CHANGE Allow longer command line for execute from a change object (255 chars)
  • CHANGE Allow longer command line for execute from a button
  • CHANGE Internally defined table row labels are no longer supported. Using a "Row Label Column" is still supported Any row labels encountered during a load are logged in the debugging file and a message is given
  • CHANGE Transposed table writes no longer supported.
  • CHANGE When a file is written using comma delimiting and quoted fields are not forced, Planimate will strip commas from value fields even if their formatting inserts them. If its a label which contains a comma, then Planimate will automatically add quotes as needed.
  • FIX Second title row alignment changed If the main title is right aligned, second title is now right aligned otherwise its centred


  • NEW System Attribute "LoopDelayOverride" (Track) This enables a modeller to instruct the PL Track Engine to ignore track portal loop delay testing and assignment when an item is doing a TestEnter on a portal exit leading up to the track.
    It is useful where a modeller is doing advanced lookahead in evaluating possible train routes and the loop delay mechanism needs to be temporarily disabled in order that the modeller receives notification whether a route is actually viable.
    Note that a special mode dispatcher is also required for this option to be useful, see below.
    PL 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
  • NEW Dispatcher option "Look through in lookahead" (note its an option, not a mode)
    This experimental option enables a modeller to look past a capacity object during lookahead but have that object assert its capacity on the item when the item actually moves through it
    Used together with the LoopDelayOverride attribute, this option enables a dispatcher in a portal on a track network to "catch" a train that is testing viability of routes on the track network in lookahead but at the same time, needs to respect and wait for loop delays before it can leave the portal.
    In previous versions, it wasn't possible for a route to be assigned and tested in lookahead within a portal that is using loop delays.
    The engine would give an error because an item at a capacity object before the route assignment could not hold a section in loop delay since no commitment to the route had been made.

  • FIX Label list references in the undo buffer (eg: a column using a label list from a table that had been modified) would crash if selected in the references browser for the label list. PL now gives a helpful message instead.


  • CHANGE Log a warning in the PLANIMAT.DBG file for any loaded portals with both the Act As Junction and Does Loop Delays on. This combination isn't accomodated in the logic design and any such warnings should be investigated


  • CHANGE The application name is now shown in the about box for internally keyed standalone EXEs


  • CHANGE Routine editor step description for conditions, dll calls and other special cases more useful
  • NEW Planimate routines calling DLLs is enhanced
    Strings and entire label lists can be parameters and return values in a DLL call. This opens up a lot of opportunties for processing of data outside of Planimate where very high performance is needed.
    The DLL SDK demo has been updated and is available to anyone who is interested. Please email InterDynamics for further detail.
    Previous version DLLs are supported (but see the next note)
  • NEW Previous versions would load and unload a DLL for every time it was called. This has been changed and a given DLL will remain loaded after its first invocation whilst PL is in run mode.
    There are impacts of this is:
- multiple calls to any routines in the same DLL file will be
much faster because it is remaining mapped in memory.
- any static data altered by code in a DLL will persist for the run (including model triggered run restarts) which can be very useful but requires careful planning by the implementor of the DLL.
I suggest a specific "initialise" routine be included in any DLL which keeps any static data within itself so the modeller can get the DLL into a know state..
Note that after each routine call, Planimate calls the DLL to deallocate any of the input/output transfer buffers allocated by that DLL routine call.
  • NEW Planimate network broadcasts can now operate over UDP instead of TCP. The advantages of doing this are that there is no connection setup/teardown (and associated delays) and if the network isn't available, PL will not stall until a timeout.
    Sending these broadcasts is very efficient and will have minimal impact on the speed of the run.
    The disadvantages are:
- there is no guarantee of receipt of data nor ordering.
Packets are more likely to arrive in a lightly loaded internal
LAN than over the internet. However your application must
cope with lost or misordered packets.
- one is limited to the amount of data in a broadcast that can
be sent. A safe limit is about 1400 bytes. 3 attributes with
average names and various formats take about 300 bytes. Most of
this is initial overhead. Note that this overhead will include the
model's name, item class name and the broadcast name so avoid really
long names if space is critical.
Each additional attribute uses the following # of bytes: # of characters in name + # of characters for its formatted value + 5
- comms is only one way (from the "client" socket to the "server" socket, for two way comms you need to set up a client and server socket at each end.