Difference between revisions of "OpenModelFile"

Line 1: Line 1:
 
[[category:System Functions]]
 
[[category:System Functions]]
 
   
 
   
== OpenModelFile( ilename) ==
+
== OpenModelFile(filename) ==
  
 
Opens a model in Desktop Analytica, or starts a new model. This causes your current model to be closed and removed from memory. If there are unsaved changes, you will be prompted to save changes, but otherwise, all previously computed results will be removed from memory. Because this closes your model, ''this is a dangerous function to use, and should only be used in specialized situations.''
 
Opens a model in Desktop Analytica, or starts a new model. This causes your current model to be closed and removed from memory. If there are unsaved changes, you will be prompted to save changes, but otherwise, all previously computed results will be removed from memory. Because this closes your model, ''this is a dangerous function to use, and should only be used in specialized situations.''
Line 21: Line 21:
 
==See Also==
 
==See Also==
 
* [[CurrentModelFolder]]
 
* [[CurrentModelFolder]]
 +
* [[CAEngine::OpenModel]]
 
* [[OpenURL]]
 
* [[OpenURL]]

Revision as of 22:39, 25 January 2016


OpenModelFile(filename)

Opens a model in Desktop Analytica, or starts a new model. This causes your current model to be closed and removed from memory. If there are unsaved changes, you will be prompted to save changes, but otherwise, all previously computed results will be removed from memory. Because this closes your model, this is a dangerous function to use, and should only be used in specialized situations.

When Null is passed as «filename», it starts a new model, the same as would happen if you selected File / New on the menus.

When a textual filename is passed, it attempts to open that model, or brings up the file selector if the file doesn't exist or a directory name is given.

This file can only be used from the Typescript window, or from an OnClick event in desktop Analytica. The function cannot be used from ADE, ACP or Cubeplan. If you are using ADE, you can use CAEngine::OpenModel instead.

If the text "[Example Models]" appears in «filename», this is replaced with the path to the example models directory.

Uses

This was introduced to make it possible to created a model selection page -- i.e., a page where you can list a bunch of models, and let the user click a button (or click on a Picture) to select a model.

History

Introduced in Analytica 4.7.

See Also

Comments


You are not allowed to post comments.