ReleaseNotes:Planimate 4.19 Release Notes
Release notes, bug fixes and misc enhancements to Planimate 4.19
- The colour palette now can customise the 16 custom colours. Use the Colour Picker to set the colours of the 16 custom colours.
Select one of the custom colours and use the palette on the right to set it.
Remember these 16 colours are global to the model
- Fixed 2 bugs in the scroller code for log driven graphs:
- The scroller no longer puts large left margins on calendar time values (I was "snapping" to whole values which isn't appropriate for a calendar time value)
- The scroller uses a different method to retain its position when the time frame changes (as occurs when a model with a different run and edit time reference starts/stops)
- reworked the way the delay box is shown to prevent it getting stuck visible if an error occurs while processing a broadcast while a model with a delay box is paused.
- Label List Selection now includes a field where a label can be typed, the list will scroll to the closest match.
Shortcuts: use <TAB> to get to the field, SHIFT-<TAB> to get back to the list in label popups which also have the "add" buttons, <SPACE> when the list has focus to select the highlighted item
- The label list "Only Modellers Add" option now takes effect
If you want a user to be able to be add to a label list, this option must be off. If on, labels cannot be added to the list in InterDyne mode.
- Bug Fix: Attempt to Expand A Route on an item with no route assigned was causing a crash. It now properly reports the error.
"Friendly Error Dialogs"
- This display option causes Planimate to display a less detailed dialog when an error occurs. This dialog explains that an error which cannot be recovered from has occured.
If the system is in InterDyne mode, the program will close when the dialog is closed. Why? When a model error occurs, the integrity of the model's tables and persistent attributes is indeterminate. So the only safe thing to do is exit, restarting the model may not be enough if the modeller is relying on retained attributes or manipulating tables which cannot be recreated by the model.
A [Details] button in this dialog also enables the error details to be reviewed in notepad, making it simple to copy/paste and email the information.
If the "support" email address (added in the last version) is set, it is also included in the error report, for the users convenience.
All model errors are now logged to _PLERROR.TXT, even if the "Friendly Error" option is not selected. If an item was involved, its attributes are also written. So this should be useful to developers as well.
The system attempts to create the _PLERROR.TXT file in the model working directory. If this fails (eg: the directory is read only) then the file is created in the TMP folder as indicated by Windows.
In any case, the "friendly dialog" opens the file automatically if the [Details] button is pressed, wherever it may be.
The new features in this version mean I can build a generic "InterDyne" EXE which is not specific to any given project like "FAID"
- New Menubar option: EDIT->InterDyne Info
Can set two strings saved in the model
"Window Title" - the title that will appear in the window when in Interdyne mode. The model name may not be desirable especially if its a self contained InterDyne like FAID. If left empty, the model name is used
"Support Email" - An optional field, if set
1. It gets shown in the second about box (Help->About) under the load version info
2. It will get shown in the "friendly interdyne error dialog" which will be appearing shortly (giving a user encountering an interdyne failure somewhere to go)
- fixed copy/paste bug which would cause a crash when copying routes
- wasn't handling copy paste buffer route redirection properly
- the second about box (Help->About)
displays the version of planimate which saved the model and the date last saved, as read from the first line of the model when it is loaded.
(this is not updated if the model is saved, only when a model is loaded)
- New Time Modes
Time (Minutes), Time (Hours), Time (Days), Time (Weeks)
These scale and display the time interval accordingly, they do not show units. Values entered are scaled accordingly. Internally, the attribute is always seconds.
- bug in form date description fixed (year was getting munged on display)
- Paint inheritance fixes
- When a paint screen is first inherited from a screen, any screens inherited from it will now also get the new objects
- Added a "Delete All Visible" option in the "Other Options" menu
- Fixed the move all and delete all "other" options to support inherited screens
- Text button actions were not properly updating/reverting to base class
- PAINT INHERITANCE -----------------
The paint layer of a dynamic or panel window can now inherit objects from one or more other paint screens. This enables a layout to be replicated in many screens (dynamic or panels) in a model and then edits made to the master will be automatically applied to the inherited objects.
When you add a paint object to a screen which is being inherited from, you get an option enabling you to propagate it to all the inherited screens.
The most important feature of the paint inheritance system is that individual inherited paint objects can be customised. If the master of the customised object is edited, the edits are still passed on but the customisation remains in effect. This means the colour of a button can be changed on a specific panel. If the master has its text edited or position changed, the customised object will also be altered but its colour will remain as set.
If a paint object is deleted, you can chose to have any objects inheriting from it also deleted or to have them become independent.
Inherited objects can also be made independent or reverted to their master (losing all customisations).
Inherited objects can be deleted on individual screens, they will not reappear anymore on that screen.
Special note for Button Actions:
Button actions can be customised per-instance of each button, in which case the master button should NOT have an action assigned to it. If the master does have an action assigned to it, it will be assigned to all buttons next time any characteristic of the master is edited.
MULTIPLE INHERITANCE AND CASCADING INHERITANCE
A given panel can inherit from more than one screen. This enables separate management of say "background graphics" and "navigation buttons". In addition a screen which has inherited from another screen can itself be inherited from. This enables cascaded inheritance, where each level adds new detail.
INHERITANCE STRUCTURE VS MODEL STRUCTURE
The paint inheritance structure is not tied to the model hierarchy, the only rule imposed is that inheritance loops cannot be created (A based on B, B based on C, C based on A...).
COPY PASTING ISSUES
It is recommended that the master paint screen(s) be carefully positioned within the model if inter-model copy/paste is anticipated. If a screen containing inherited paint objects is copied to a different model without the master being copied, the objects lose their inheritance relationship. Its a good idea to put master screens in a panel since the panel can be repositioned in the model as the need arises.
Copy pasting within a model retains the inheritance relationships.
In paint mode:
- The background menu has an "inherit from" option to select from where paint content should be inherited.
- Screens which are inherited from include a summary line in this menu
- Objects which are inherited include an "Inherits From" line which names the panel from which the object inherits.
Selecting this option enables the paint object to be reverted to the master, disassociated from the master or the user to navigate to the master
- Objects from which other objects inherit include an "Inherited <n> times" line which shows how many objects inherit from the object.
Selecting this option enables all inherited objects to be reverted to the object, all inherited objects to be disassociated from that object or navigation to the panels which contain the inherited objects.
Note that there could be objects in the copy/paste buffer which cannot be navigated to.
- BUGFIX the "stop and restart" control bit implemented in r was not being initialised, causing the model to sometimes restart once complete without the modeller intending this.
- BUGFIX added a check to prevent crash due to an immediate message changing a route
- USE IMMEDIATE MESSAGES DURING LOOKAHEAD with care - they must not *** change anything except item attributes
- Assigning a dynamic route from an empty table no longer keeps an empty route assigned to the item, the route is purged
- Range check attributes properly initialised to zero when loading older models, they were initialised to garbage before
- CHANGED FILE FORMAT for paint in preparation for paint inheritance Please check carefully that models saved with this version reload and paint objects work as previous.
- Implemented a new exit stop mode "Stop Current Run And Restart"
This lets a run be restarted without having to have the option "Restart when model stops" on
- fixed table matched column copy
(it was prevented from working if the # of columns in the tables differed which was the whole point)
- table column tuple name can now be as long as attribute name
- no longer ask to modify the tuple name when a column title is modified if the title is longer than a valid tuple name
- table sort dialog handles long column names without overlapping buttons
- Range checking has been implemented for attributes
For each attribute a minimum and maximum value (numeric) can be specified.
If the attribute is set beyond its limits (the check includes round off margins) then the model will stop with an error, this can catch integrity issues at their origin rather than them being hidden in the model.
- Fixed crash: If a broadcast with item is made to a broadcast entry with no leaving paths, it would cause a crash
- added an extra condtion to track logic
last road check for a loop in lookahead is NOT performed if the train has a non zero booking id
4.19N [new file version]
- === Dynamic ODBC statements ===
ODBC statements can now reference portal and item attributes. These may be used to construct an SQL request with dynamic parameters.
SQL commands are now structured as follows:
- Quoted text elements are treated as literal strings and processed without modification. They may contain any character except the quote itself.
eg: "Select * from authors"
- Single quotes enable a single character including the " to be inserted
- The & is an optional (recommended) separator
- Portal attributes references are preceeded by P, P. or P: and may included quoted text so spaces can be handled
eg: pAttribute p.Attribute p:Attribute_1 p."Attribute 1" P."Attribute 1"
These get converted to the formatted value of the attribute
- Item attribute references are preceeded by I, I. or I: and may included quoted text so spaces can be handled
eg: iAttribute i.Attribute i:Attribute_1 i."Attribute 1" I."Attribute 1"
These get converted to the formatted value of the attribute
Statements may have line breaks etc. within them.
"Select * from " & i.TableName & " where Author='" & i.WantedAuthor & "'"
In this example, Item attribute "TableName" will provide the name of the table Item attribute "WantedAuthor" provides an author name
The [TEST] button in the editor will now include the translated query in the query test output window.
Since the item attribute can not be read at edit time, "*" without the quotes is always substituted for item attributes.
SQL statements in old models are automatically wrapped in quotes to keep them valid.
- scroll bar colours made more neutral
4.19M [new file version]
- table driven entries are now usable without a class column
If a _class column is not present, the entry will produce an item of the first flow type leaving it
- pasting into a table with a highlighted region now uses the top left corner of the region as the insert/overwrite top left point, not the current cell. This makes things a bit more consistent
- Exit can now stop and close the model
- customissable dialog title line
- spatial link system now gives an error if a movement to the origin is attempted
- fixed bug in routines introduced about v
- round and trunc would give error if applied to a column
- Both strict lookaheads and strict attrefs options are now on by default for new models and should be turned on for old models ASAP (may require some work on the model)
- Added new time formats to support HH:MM:SS time display/input mode
Times are accepted in either format in both the new and existing time format modes. The new modes enable the default to be set for display/export purposes.
- Resorted the format names in the attribute editor
- The icon cache is refreshed when the image mover is dismissed. This can also be used to refresh the image cache if icons are externally changed.
- the pipe has a new option enabling the run control attribute to be based in the target portal instead of the source. This makes implementing blocking easier.
- handling of selection of portals when in interdyne mode changed Portals which are user draggable can now be clicked and dragged in interdyne mode - only if the model is started
- a new broadcast _Model Loaded is sent to the model when it is first run once it has been loaded, it gets sent just after _PreInit Start which means you have to be careful what you do with it; if you need to interact with any objects (apart from Change) you should use it to set your own flag and handle it after _Run Start when all objects have been properly initialised.
- file/odbc read mouse cursor update reworked - the wait cursor should come up more consistently
- the table editor handles double clicks like on screen table panels
- double clicking a new change object defaults to editing the routine
- "Show progress file" option obsolete and removed
- internal "Journal" code handling obsolete and now removed
- (unused) "User View" support code removed
- nb: deleting a spatial link deletes any items on it
- Added ODBC option which causes labels to automatically be added to label lists rather than prompting the user
- added "Item Last Track Road" system item attribute
returns road # item was last on from the track section it just left (1 or 2)
- reworked item parameter storage / undo mechanism
- fixes the "invalid structure size" printing problem
- changed the Double Overtake handling to enable use of the other track when the normal track is unavailable due to full restriction.
Previously the other road would not be taken in this case
- crash fixed when an item with a route assigned but with no steps is clicked upon
note that this is an unexpected condition, routes should never be empty
- no longer crash if a broadcast with item attributes cannot carry any attributes to the target item class
- occupancy of objects (read by attref) now initialised properly
- fixed problems with adding new row operation (was initialising un-required parameters)
- new calcn parameter attrefs default to constant 1, not a portal attribute
= NEW FILE FORMAT, COMPATABILITY WINDOW MOVED =
has had major changes so commit to it with care
- file compatability window moved
EXEs from now on will only load models saved with Planimate 4.11L or later
- new file version
- Major rework of calculation/routine code
I have rewritten the routine management to allocate parameter attref space as required by individual routine operations. This involved reworking some 6000 lines of code, I took the opportunity to tidy up the code as well.
I've extensively tested it all with every test model I have.
This will reduce memory and disk requirements for routine-intensive models.
One model has shrunk from 17 to 12.7MB (MDL file size) and 50 to 35MB (initial memory allocation size)
It also creates opportunities for adding new calculations which have more than 3 attref parameters.
- I have slightly reworked every module in iFlow and Planimate to enable me to more effectively use precompiled headers to speed up compilation of Planimate. This should not affect operation in any way.
- secondary section bookings
These provide a secondary place to book sections. Unlike primary bookings, the booking id is not tested against the entering item, any item attempting to enter a section with a secondary booking will be blocked UNLESS it is accepted by the primary booking in that section.
This provides a mechanism to cast "booking shadows" which will prevent unbooked items from grabbing a section which will be required by an upcoming booked item.
- rewrite of screen management
The Planimate window is now managed differently to enable clipping of objects outside the model area to be properly implemented.
This was a major rewrite of the window/scrollbar display handling.
- buttons describe click action
- paint objects describe bounding box
- file browser window title in change object now reflects read/write operation
- file read option "Automatically Add Labels" added to change object file operations
- reading into a Variable Length Table using the change object now clears the table (deleting all rows) before reading
This will prevent trailing data being left in the table
- Attribute stat display change
Can add attribute stats to any subsystem within the scope of the attribute
- Cell stats now reflect the font and colour of the table cell they are associated with
- font metrics fix
- fixes alignment issues with train graph labels
- item info panels
- animate along with the item
- new item attribute edit option "include in info panel" will include the attribute as a separate line in the info panel
- the system attribute "Item Show Info Panel" enables the panel to be hidden/shown on an item by item basis
- fixed verison #
- cleaned up RGB grid display (was caching nodes for no reason)
- can now add a grid view from a panel
4.19 (new file format)
- New "Grid" display for tables
This displays a table as an array of rectangles. The contents of the rects can either be from icons/BMPs, using a label list to map index values to images, or the colour can be directly interpreted from the cell value, as an RGB value.
The number of rects is determined by the dimensions of the table. This can change during the run.
The size of each rect is determined by the table dimensions and size of the grid display object, as set by the modeller.
The system requires the rects are of equal dimensions which may not be an exact multiple of the width/height of the rectangle of the view, so the system will keep the cell array centred within this rectangle.
(set the mode using the options...)
In image mode:
A label list determines the name of the image. If the index does not resolve to a name, the cell is painted using the background colour of the grid display (which may be transparent if set to "None"
With in place editing enabled - a click toggles cells between 0 and 1
In RGB mode:
Given R, G and B range from 0 to 255, the colour of a cell is determined as follows:
value = red + green * 256 + blue * 256 * 256
In hex, the value is packed as follows:
BBGGRR, so FF0000 will give a blue pixel
If the value is set to > 0xFFFFFF or < 0, the cell is painted using the background colour of the grid display (which may be transparent).
With in place editing enabled - a click toggles cells between 0 and 0xFFFFFF (black and white)
- The Encode RGB makes it simple to translate R/G/B values to the proper value
- added Hexadecimal value format mode (makes working with RGBs easier)
idkbase note 156