ReleaseNotes:Planimate 4.31 Release Notes

From Planimate Knowledge Base
Jump to: navigation, search




  • Crash pasting change objects - recompiled


with old compiler, seems OK.

Also turned on "Pentium" code option, it was off for the last few builds


  • fixes a crash issue with Billboard table handling

Gory detail: due to the compiler barfing at the fact that I did not include a "destructor" for an object that is being allocated in a C++ array.


  • Gantt block line linking has been changed to provide a bit more flexibility.

2 new columns can be included in the gantt table, "_nodeid" and "_link_nodeid".
_nodeid enables an identifier for a gantt block to be specified.
A block further in time can be linked back to that previous block by setting its _link_nodeid to the same value as the previous block.
Many blocks can use the same _nodeid, PL will always search for the most recent block (not including the current).
Hence to connect a series of blocks together, setting their _nodeid and _link_nodeid values to a common value (eg: consist #) will display a line linking the blocks together.

  • new display option "Fastforward when no animation"

This causes Planimate to quickly step through animation updates if there has been no animation activity (this used to be the default behaviour). The default now is to speed-regulate the animation update intervals. This option enables that to be overridden.

  • bugfix:

have changed the way panel deletion is notified to the popup panel viewer to handle notification of panels properly.
deleting model with the popup panel view visible should be reliable now


  • Made the hierarchy explorer modeless. You can leave it up on the screen somewhere and continue working in the model.

Modellers may want to put default co-ords for this in the INI file. eg:
ExplorerX=150 ExplorerY=350 ExplorerW=300 ExplorerH=400
(X,Y give the top left screen point)
These are placed in the [display] section

  • Track logic: Added a new rule enabling a train just leaving a junction to continue on the section without error message if a subsequent section also connected by junction) has become unavailable.
  • table titles can be centred
  • Have added timeouts to planimate forms/dialogs. These are intended to enable informational popups to occur and the model to continue afterward even if the user does not press [OK]

They should not be used with dialogs which require user input. I have attempted to cancel the timeout if user input is detected (eg: typing in a field).

  • Format into label has been enhanved to handle columns and tables.

If the item to format is a column or table, its name (tuple name) is formatted into the target attribute.
This enables a column name to be placed into a label list so the modeller can then work with that name

  • Updated to new compiler, code more conformant to modern ANSI C++ standards (many modules had some syntax changes).


  • The _PLERROR.TXT file (which gets written when a model error occurs) now includes portal attributes and table dimensions for the portal closest to where the error occured and those up the hierarchy at that point (ie: those in scope)
  • PL properly saves the DB from a PMB (model bundle) when it gets saved as an normal MDL.
  • Found a very elusive icon animation manager bug

When two icons were drawn next to each other but not overlapping, bits of junk were left on the screen when the "lower" icon in the list left before the "upper" icon. This is because the icon drawing code was "save-undering" an extra pixel without the animation manager realising there was an overlap.
I've corrected it (for the x-axis only) though I suspect there is the potential for similar problems with rotated icons.
To fix it properly I need to make the *rotated* icon bounding rectangle available to the animation manager. Will do this if animation "junk" continues to be an issue.

  • Have reworked the line drawing code to minimise glitches at the end of longer lines, very evident in the table view where grids are drawn.

The problem arose because Windows doesn't draw the endpoint for lines but the iFlow graphics model requires it to.

  • Have reworked table drawing more to improve display of cells. The fill colour of cells is improved (but still imperfect when zoomed.
  • Linear searching can now occur in the reverse direction


  • This and subsequent releases of PL are built using a new compiler (unless a problem with it is identified).
  • PAINT inheritance for paint buttons enhanced:

A change in the click action of a button is more intelligently handled.
Changes in an action or an action's properties are properly checked now so customisations of an action are not lost if the master is changed.
More detail:
A change in a child object's action properties/options makes that child/action unique and a change to the master's action (even if its the same type of action) wont change any property of the customised child object.
IMPORTANT: This does not apply to inherited Dialog action buttons, they are always treated as unique and wont track the master button while it has a dialog action.
HOWEVER If the master is changed from having a dialog action to another action type, ALL inherited buttons in dialog mode will be changed (the old way PL used to work).

  • fixed OK button handling in the debug dialog (wasn't properly closing)


  • have changed the breakpoint/error debug dialog
  • removed a few of the buttons at the bottom and replaced them with a fly-out menu which now enables tables, attributes and labels on the current screen to be inspected.
  • Fixed a bug which caused an invalid screen warning to occur if the panel changed broadcast was used to change the current panel


  • Planimate popup child windows (without title bar) are placed topmost now of sibling child windows so they are not obscured by existing popups and viewports
  • time scroll window now sends update broadcasts if the keys are used to shift the window as well as the mouse
  • The popup which appears when an item is clicked (or ctrl-clicked if system properties are hidden) now contains a "TRACE" line.

Selecting this line toggles trace animation just for that item on and off, very useful when debugging

  • re-enabled backing store for view panels, some models had too much flicker on table cell broadcasts which updated tables. The backing store uses memory but elimiates the flicker.


  • The graphics system now supports hugely huge bitmaps and panel work areas (limited by RAM now not by Win32's GDI)
  • Column overlay graphs have an option to remove the margins automatically inserted in the x and y axis. This will make their range compatible with gantt/train graphs when they are displayed together
  • fixed a bug introduced in


that messed up ctrl-pastes of portals when they were linked to other portals
  • The line taken counters introduced a 6% hit in engine performance so I've made them only active if the run is started in "Application" mode (editing tools hidden)
  • have done quite a bit of rewrite/cleanout of the graphing code (mostly column overlay) to try move towards a common graphing model


  • viewports/popups should properly clip against each other now
  • There is a new system-item attribute which enables trace animation to be enabled on an item-by-item basis.

This means one specific item can be tracked throughout a model, or the activity of items in a defined region or time window, as the modeller chooses.


  • column overlay view should properly updates its bounding box for y scale width
  • no longer crash on trying to deallocate counter table for an empty routine
  • Reworked the run initialisation and termination code, cleaning up internal names and function sequence.

(shared routines were not being initialised properly but it wasn't an issue until I added the routine line tracing in the previous release)

  • code rework: view panels do not allocate an animation manager (dont need it)
  • I've added some debugging to check for bitmap allocation errors. This will pop up warning messages if an image buffer fails to allocate (indicating a low memory condition or problem with the Windows API)

I've identified that the Windows system fails to allocate large bitmaps due to limitations in the GDI functions (even under WinNT) however there is another way to do it which should only be limited by RAM, so I'll give that a try in a subsequent release.
I will not be putting any effort in supporting 8 bit (256) colour systems.


  • specifiable capacity of multiservers increased to 9999
  • models with many items visible stop and change panel much faster, achieved by flushing the animation manager before hiding the individual objects/items
  • Queues and dispatcher handle capacity up to 99999

Previous versions had an editor bug which could result in -ve lengths if large values were specified

  • routine list has a new column "Taken"

this is only visible if the routine editor is opened when the run is active
It displays the number of times each routine line was executed the last time the routine was executed. This is useful for determining what code just executed preceeding a breakpoint
All routines track this usage now, the performance hit vs. previous PL versions should be minimal (report any massive change in routine speed between this version and the previous)

  • The "execute command" code recognises names starting with http:, mailto: and fto: and processes them through the shell, so the default application for these types will be used.

This enables buttons to link to URLs and email addresses.

  • new routine operation "Reverse Item Direction" (in the Message menu)

This enables an item ID and panel to be specified. If that item is found in a spatial link on the panel or a panel underneath it, its direction is reversed and the operation returns 1, otherwise it returns 0.
Reversing the item means:

  • its time to reach the end of the link (where it had entered) is the same duration it took for the item to get to the current point in the link since it entered
  • the destination is the portal the item will first arrive at (so the modeller must be prepared to take the item and assign further links to it, dispose of it, or whatever.
  • The set random seed function introduced in


now also sets the master random seed to the specified value. This means the seed value will take effect if the run is restarted by a stop/restart exit as well as restarting with a restart dispatcher and the new seed value will persist from then on until it is changed again (by user or the model)
  • lots of code tidyup to make compatible with latest ANSI standards on variable scope in loops, should not affect anything


  • Crash fix -


was a lemon.

The attribute editor was broken by the new checkbox (wasn't initialising it when it wasn't supposed to be used, causing unpredictable crashing)

  • Added new system attribute "Random Seed For Restart Run" (Run Engine)

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 dont trivially correlate.
The seed value must be an integer between 1 and 32767 (inclusive) and a hard clamp has been introduced to ensure this.


  • Create standalone application is much faster (avoids database updates if an item is already in there).

Items included in the standalone EXE database are logged to the PLANIMAT.DBG file, as well as any error messages for icons etc. that could not be found. (the messages still appear onscreen).

  • Database and file copy routines have been given much bigger work buffers so they will save/transfer data faster.
  • have fixed paste/replace code so it also adds contained portals to the object label list if their option to do so is set
  • I've added a new system attribute "User Edited Model Data" which 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

  • "Only to screen" broadcasts such as panel closed should now work properly if the BC is sent under model control
  • fixed a locking problem introduced in i


  • dials/charts support having a transparent background colour
  • portals have a new option

"Automatically Add Copies To Object List"
If this option is set, any copy made of the portal (by user or under model control) will be added to the object list and an index/name automatically assigned.
The original portal does not need to be in the object list.


  • added a new portal option:

"Handles Parent Messages/Broadcasts"
If this option is set for a portal:

  • The portal can contain a message handler for directed messages sent to the owning portal.

This is the same functionality as naming the portal "_!message" but means any name can be used instead of _!message for the portal which makes paste-replacing code updates safer and easier.

  • The portal can contain broadcast handlers for screen-only broadcasts sent to its parent (eg: portal clicked)

This means the handlers for these broadcasts dont have to be right at the portal which has the broadcast targetted at it.
Broadcasts like "_Portal Clicked" are not normally sent "scoped" but setting this option on a portal within the one where the broadcast would normally be received enables a limited amount of scoping.
Only one portal in a subsystem should have the this option on (Planimate will only search the first portal it finds with this option on in a given subsystem).
Portals with this option on can be nested if a single handler portal gets too busy, the inner portal must also have this option on and the same rule above applies.

  • added check for class change at routine to make sure the 2 classes have the same # of table references
  • bugfix:enhanced item attribute fix in prev version to allow class changes (as long as item attribute and table references dont change)


  • fixed trivial bug which was causing flipped (but not rotated) icons to display wrong.
  • New key file handling.

To create a "standalone application" you will require a new key file.
Your existing key file will continue to function but you will not be able to create standalone applications.

  • Fixed a small bug with background timer handling. During simulation mode, if during the test for a "pause" a background event occured, it wouldn't be processed before the pause occured, causing the timer to stall until a "continue".
  • Found a very nasty bug involving a routine which, in look ahead, set some item attributes then performed an immediate message. The undo mechanism for the attribute set conflicted with the immediate message value return, causing memory corruption.

I have rewritten the way items allocate memory. This should eliminate this problem and will also speed up the creation of broadcast and message items.


  • fixed small bug with pause key checking (main window wasn't redirecting all key events)
  • fixes to AVI clip end broadcast handling
  • BC is sent as background BC
  • properly stay in background mode to process side effect BCs rather than dropping out and back in (and generating system errors...)
  • The background timer BC is no longer disabled when pausing in editor mode anymore. Due to the event throttling this should not be required.
  • internal engine enhancement and cleanup:

These are all moving PL beyond a simulation platform and towards a real time event/data processing and visualisation platform
[advanced detail]

  • reduced the number of places where engine Contine() is directly invoked, in many cases I post the "Continue" command message to PL instead.
  • made background BC mode an explicit set up / teardown around the Continue() operation rather than passing of option bits
  • added a new interlock to prevent background updates being posted to the FEC when PL is about to go "paused". This was causing timer events to get "stuck" on the FEC until the next "Continue"
  • Removed some "Wait mouse buttons up" checks in the Run/simulate to paused transition code. I dont anticipate this affecting anything.


  • Have now implemented rotated bitmap drawing (worked around MS's bugs)

At the moment automatic rotation of items is supported, this is an item class option. The "Flip Icons" option should also be on otherwise trains etc. will appear upside down when they animate right to left.
The direction sensing code is smarter than it used to be (makes use of each bend section vector).
I've not finished updating the animation manager so rotated items in queues and dispatchers may leave crud behind on the screen. Spatial links, conveyor-road and multi-server item animation should work smoothly.
Later versions will enable the rotation of items and objects to be set by the modeller.
Rotated icons are only supported under NT/Win2K/WinXP. On ME/98/95 icons are not rotated (the APIs dont exist) but the model should otherwise run.

  • Planimate now has two Future Event Chains (FECs).

When a "real time" event such as a timer tick, network broadcast or other special broadcast (see next point) is sent, Planimate switches to the second "Background FEC". This allows side effects of the background BC to be cleared without "continuing" the run, when it was paused at a pauseable 0 delay (previously it wasn't possible to tell 0 time events apart).

  • reworked the background timer BC handling so it doesn't post multiple events to the PL FEC if PL is busy

Models are easier to pause even if the real time BC is being animated

  • fixed the background timer BC handling to properly update displays when PL is in run/simulate mode.
  • The "_panel opened" and "_panel closed" broadcasts are now sent using the Background FEC. This will get rid of the annoying "continue" when a model is paused at a pauseable 0 delay and the user changes panel.
  • no longer set background flag on BCs sent from a background BC.

Creates too many side effects. Background BCs should not be scheduling other BCs.

  • Paint Video objects have an option to enable looped playback. There is a delay between the clip repeating, this is inherent in the media player widget.
  • new routine operation "Find Formatted Label" checks whether the parameter, formatted as a string, exists in the label list pointed to by the target.

IF it does, the target attref gets set to the label index otherwise it gets set to -1


This one seems more stable

  • I've rewritten the fine timer interrupt handler to not call any functions or use any pointers (all the fine timer interrupt does is post a wakeup event to the main Planimate thread which handles the broadcast)
  • I've added a display option to disable the timer tick broadcasts. Note that the timer still "ticks" if a timer tick BC entry exists in the model, but this option prevents the broadcast being actually sent.

Timer Tick BC's are disabled by default. Turn them on when your model is debugged.

  • Reworked the "pause check" code to the following rules:

In end user mode, the pause menu will appear if the following is met:
PL is not processing a background event (timer tick, network) and (item animation is occuring OR PL is not processing a broadcast)
In developer mode, the pause menu will appear:
if animation is occuring OR PL is not processing a background event
Actually selecting "Pause" in developer mode using the background menu disables the timer tick (display options).
This is to protect the modeller from getting stuck.


== == This version involves a lot of fixes, some new internal stuff and loads == of rewrites and cleanups of old code. Look out for any new graphical == anomolies in particular. ==

  • It seems the background tick is causing corruption of the process state which I've been unable to pin down. I've fixed and rewritten lots of stuff in this release but that crash bug is still there.

I'm separately uploading a VC build of Planimate. If the SC build crashes, try the VC build. It hasn't crashed for me yet.

  • time scrollers are now optional for train and gantt graph (nneds testing)
  • new time format: Day Of Week; Time Of Day

This format enables a day, hours and minutes to be specified in the form
Eg: Sun 0000, Wed 1234, Sat 2359 and is represented as the number of seconds since midnight on sunday.
This is a useful format for entering weekly schedules.
Times such as: "Tue 2400" are accepted and become "Wed 0000"
"Sat 2400" is also accepted and wraps to Sun 0000

  • Paint Buttons now cache images in memory (like object and item's do) This means they draw much faster and opens up opportunities for animating them.
  • Paint Buttons have a new option "Real Time Tick Update" which causes PL to update their image if their state has changed (eg: in a real time tick broadcast)

This enables animations to occur using paint button states without requiring a forced repaint.
This option should only be turned on for objects which need it as it requires some background processing.

  • focus in the routine editor improved
  • fixed key handling.


broke it for the main window. I now do extra checking on whether the active window is a form/dialog or not in order for Windows to process the key events appropriately for modeless dialogs like the routine editor.
  • bugfix: trace animation is suspended once a pause is requested
  • BUGFIX: Fixed a very hard to find bug: If a screen change occured in the processing of a "background" broadcast such as the timer tick, the menubar and mouse states were left "busy" whilst the app was really idle.

This occured because the run manager was not aware they were being changed by the screen change code.

  • Event/pause checking change:

While a BC is being sent and its side effects cleared (time not moving) PL will not poll for "pause" clicks in user mode UNLESS items are animating somewhere on the screen.
This reduces popup of the "pause" dialog when dragging portals etc. but may make models hard to debug/stop (which is why I only do this in user mode).

  • Found a very obscure bug in the handling of redraws which caused the animation manager to do more redraws than necessary (object icons were being cached in the "front_icon" of the animation manager which is not appropriate as they generally dont move about, they just change state).

This bug was very hard to initially detect but was noticed by Planimate sometimes using more CPU than at other times for exactly the same animation.

  • Debug Options and Class Name dialogs now stay on top of the main window
  • Any broadcasts sent during a background event (timer tick) are also processed in "background" mode [not tested - should avoid broadcasting in a timer broadcast handler anyway]
  • Items have a new option "Auto Rotate" which rotates the item bitmap according to the direction it animates.

This makes use of the new icon rotation capabilites.
Unfortuantely due to a bug in Windows NT/2K/XP which Microsoft could not give a damn to fix (they've known about it for 4 years), the rotation messes up the mask if the icon is rotated exactly 180 degrees. I've been unable to find a *reliable* workaround for this (short of abandoning buggy closed source Microsoft Operating Systems) so I've disabled the rotate functionality for now. Eventually I'll do the rotation another way.


[advanced:for technical/dubugging reference]

  • Animation timing delay no longer involves a message pump. This gets rid of one source of potential event re-entrancy, the timing is more stable and Planimate uses very little CPU during animation as its not spinning a PeekMessage() loop.
  • Animation/screen update "dirty regions" and icon saveunder/restores are now processed using windows co-ordinates not iFlow co-ords. This is to support blit-time icon transformations such as rotation and future others.

Dirty rectangles which mostly overlap are now merged since blitting large regions is fast these days.

  • Animating Icons (which Planimate items inherit from) have been rewritten. Single item animation is now much simpler and uses double math. Multi-item animation has been cleaned up and is more straightforward.
  • Animating icons dont need to allocate a saveunder struct anymore, they contain one. This greatly reduces memory manager activity where there is a lot of animation and will reduce the memory throughput values in the memory manager statistics.
  • Saveunder code (eg: dragging objects about) rewritten; handles rotated rects properly.
  • Animation manager algorithms extended to handle changing object icons more reliably
  • scroller overlay graph change: (re-enabled scale update for column overlay graph even if scroller hidden)


  • added a new system attribute (Display) "Timer Broadcast Interval" which 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.

  • fixed routine editor
  • title
  • ESC key handling
  • buggy cancelled add of a new routine line
  • replace attribute routine att browsing
  • trace animation no longer applies to "background" broadcasts like network events, background continues and the timer tick broadcast.

Animating these BC's isn't helpful as they are real time; the modeller can still put force a screen change in the routine handler if they *REALLY* want to trace that BC.

  • quite a lot of internal rework of dialog/window code (system wide) so
  • button focus handled properly with TAB in modeless window
  • keystrokes properly handled (particularly ESC) when focus is on a button etc.
  • application properly closes modeless windows as soon as they are closed by the user
  • form positioning code reworked to handle resized form and button base row placement

Since PL doesn't have many modeless editors yet existing dialogs should not be affected.
please immediately report and messed up dialogs or key handling as a result of this EXE


  • fixed bug in toolkit which caused keys like ESC and ENTER to be sent twice to the application, this created a bug when pausing a model with these keys then attempting to continue, the model would immediately pause again.
  • The clock updates without any flicker at all now even for high update rates
  • New System Attribute (Display submenu) "Animation Update Interval" enables a model to control how often animation updates occur (0 sets none, model advances to model events only). See note below.
  • Note that


changed the way the Animation Update Interval is handled.

Planimate now 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.
(previous versions did not always perform this timing delay)
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.

  • New INI file attribute in the [Display] section "DebugStepSpeed" sets how many 15ms intervals to delay between steps, default is 10 (=150ms delay between steps)


  • less overhead if the real time tick broadcast is not referenced


  • new broadcast "_Real Time Tick"

This is sent as a background broadcast to the model 10 times a second even when the model is paused, a dialog or popup is open.
A model can use this broadcast to update object icons and perform low overhead background activities. With portals cycling states, nice animation effects can be incorporated into a model.
It must not generate a model error, cause a screen change or other major event.
It is not a good idea to view the item animation on the panel processing this broadcast unless the animation speed is set very fast. The model will be hard to "stop" but not impossible if CTRL-T is held down.
If the processing of this bc takes too much CPU time the application will become very unresponsive.

  • new routine editor is now modeless

Features include:

  • the routine list can be resized and PL will remember its posn when it opens
  • multiple routine lists can be opened and left in position while the model is edited further
  • runs can be started with the routine editor open. PL will animate the steps of any routines executed
  • during animation of steps the "Pause" menu has options to force a breakpoint and show routine attributes at whatever routine line PL is currently at
  • step editor keeps routine list in sync if navigating between steps (new steps dont appear in the list until they are committed)
  • step editor remembers its position
  • step context menu enables jumping to the start and end of the current "Block" within the if/while/iterate/case structure
  • cancelling an add doesn't edit the previous step that was there
  • have reworked object redraw code to change object icons with FAR less overhead especially if the dimensions of the icons are not changing
  • portals have a new option "Monitor Occupancy Of Subsystem"

With this option on, the portal is kept aware of items entering, leaving and being created within its subsystem (and subsystems within if their portals also have this option on).
This enables the portal to indicate its "occupied" state when there are items inside.
It is also used to limit access to the portal if the "Use Subsystem Total" mode is selected for portal item limiting. However this monitoring also adds overhead to the simulation and hence hasn now been made optional.
If the model does not depend on the automatic portal state, the portal occupancy ocunt or portal item limiting based on "Use SubSystem Total" (the other modes are OK) then this option can be turned off on the portal for a performance boost.
This option is on for all portals in older models to retain compatability and on for new models as the portal state updates is good for beginners.
If this option is changed, Planimate will offer to apply the change recursively to all portals under the current one being changed.

  • bugfix: icon browser doesn't remember older DB name when model is saved if the DB name didn't start with a "_"
  • bugfix: memory leak closing a model if a table view was still open


  • fixed multiple run logging (was broken from K)


  • Fixed popup window management bug so when a "keep front" popup is closed the main window should stay at front not another applications

(bug was trying to make a child window frontmost because of a missing virtual function declaration for BringWindowToFront() so wrong fn called )

  • Added new time field format: Calendar YYYY-MM-DD HH:MM:SS
  • data set file calendar times are annotated with the date in a readable format

(the number is the # of seconds since 1 jan 1968)
If a date conflict occurs when loading a dataset from a routine operation, the differing dates are shown in the error dialog.

  • table editor allows resizing to much larger tables now but if you dont have the RAM to hold it, it will exhaust your system RAM!

(tables occupy 8 bytes per cell if they have no cell specific formatting + about 150 bytes overhead per column)

  • Table views have a new option "Single Click Cell Edit" which causes a cell edit when a cell is first selected instead of having to click it twice

idkbase note 198