CurrentModelFolder
Returns or sets the default directory from which models or modules are loaded, and from which relative paths for models or modules are interpreted.
When called with no parameters, returns the current model directory with no side effects.
When called with a text parameter, sets the current model directory, interpreting the path provided relative to the previous current model directory. It then returns the full absolute path to the new current model directory.
Examples
CurrentModelDirectory( ) → "C:\Documents And Settings\Linda\My Documents" CurrentModelDirectory( "C:\Models" ) → "C:\Models" CurrentModelDirectory( ) → "C:\Models" CurrentModelDirectory( "Active" ) → "C:\Models\Active"
Select File->Add Module.... File dialog opens in C:\Models\Active.
CurrentModelDirectory( "..\Old" ) → "C:\Models\Old" CurrentModelDirectory( "[My Documents]" ) → "C:\Documents And Settings\Linda\My Documents"
Note
When you start Analytica, the CurrentModelDirectory starts out in [My Documents]. When you load a model, it is set to the directory containing the model, and modules with relative path names are loaded relative to that location.
You can change the default start directory by setting a registry setting. Use RegEdit, navigate to the folder
HKCU/Software/Lumina Decision Systems/Analytica
and create a string value named InitialDir, set to the full file path of the starting directory.
ADE note
CAEngine::OpenModel and CAEngine::AddModule interpret file names as relative to the CurrentModelDirectory( ). If you call CurrentModelDirectory from typescript prior to calling these, then the full path name does not have to be passed to those functions.
Enable comment auto-refresher