Version 5 FILE LOCATION HANDLING

From Planimate Knowledge Base
Jump to navigation Jump to search

PLANIMATE® FILE LOCATION HANDLING

KEY FILES:

Planimate® searches for the Key File resource as follows:


1. The folder where the Planimate.EXE is located.
(This makes it possible to have a "local" key for special purposes).

If not found, then

2. The "Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder.

If not found, then

3. Planimate® puts up a file browser so the user can select a key file to use. The file used is copied into the "Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder. (...or the EXE folder for older versions of Windows).

NB: If upon attempting to proceed with that key, Planimate® discovers it is not valid (eg: its expired, is not a valid key type etc) then Planimate® will delete the copy it just made in order that the user gets another opportunity to pick a key file next time they run Planimate®. This avoids users having to locate the Application Data folder path.

Planimate® INI file handling

The INI file is created by default within the users "\Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder. INI files may also be located in the EXE folder, if you prefer,

The search for an INI file works as follows:

1. Look in the EXE folder for "PLANIMATE.INI"

If not found, then

2. Look in the EXE folder for "PLANIMAT.INI"
(This is for Version 4 users who have upgraded).

If not found, then

3. Look in "\Documents And Settings\(username)\Application Data\InterDynamics\Planimate" for "Planimate.INI"

If Planimate® does find an INI file, it then writes back to that location in which it was found.

If all these fail to find an INI file, then Planimate® will default to creating one in the "\Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder.

DEBUG FILE
The idea is to keep the debug file close to the EXE if possible.

PLANIMAT.DBG is now placed based on the following sequence:

1. Attempt to write to the EXE's folder.

If this is not writeable then

2. Attempt to write to the "Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder.

If this is not writeable an error is given but Planimate® continues...

3. Attempt to write to the current working folder as a last resort, as it may be different to the EXE folder).

MODEL RESOURCE FILES
Planimate®searches for model resources (DBs, BMPs etc) as follows:

1. The current folder (where the model or standalone EXE is
2. The EXE folder (where system DB is)
3. The sub-folder \PL_MEDIA under the current folder (if it exists)
4. The "Documents And Settings\(username)\Application Data\InterDynamics\Planimate" folder.




idkbase note 312