runmodel_setting
The function runmodel_setting can be used to retrieve information on the ITP context in which the model is run. The function has one parameter type TEXT which contains the setting that the function retrieves. The function result is type TEXT and holds the retrieved value.
Supported settings are:
- ResultDocument; this setting retrieves the path and name of the ResultDocument.
- Environment; this setting retrieves the name of the ITP/Server environment in which the ITP Model is run.
- Session; this setting retrieves the session folder of ITP/OnLine Server.
- Product; this setting retrieves the ITP product that is used to run the model. Possible return values are ITP/Workstation, ITP/Server and ITP/OnLine Server.
- User; this setting retrieves the user account with which ITP/Server is run.
- Project; this setting returns the default ITP/MDK Repository project in which ITP/Server will locate Views and Text Blocks. The RepositoryProject configuration setting in the active ITP/Server environment is used as the default project. If this setting is not specified the project from the ITP Model is used as the default project.
- Model; this setting retrieves the path and name of the ITP Model on the local filesystem.
- ModelRepositoryName; this setting retrieves the name of the ITP Model as it was known in the ITP/MDK Repository.
- ModelRevision; this setting retrieves the revision of the ITP Model. The retrieved revision includes the ITP/MDK Repository identification.
- RepositoryCreator; this setting retrieves the ITP/MDK Repository user who compiled the ITP Model.
- RepositoryCompileDate; this setting retrieves the date the ITP Model was compiled.
TEXT result := runmodel_setting("ResultDocument")
TEXT user := runmodel_setting("User")
The settings ModelRepositoryName, ModelRevision, RepositoryCreator, and RepositoryCompileDate are stored in the ITP Model at the moment it is compiled in the ITP/MDK Repository. If the ITP Model is renamed later, moved, imported, or exported this information is kept unmodified. ITP Models must be compiled with the ITP/MDK Repository version 3.5.11 or higher to include this information.
The following settings will not work when running a model using ITP/Workstation;
- Environment
- Session
- Project
You can create a model using these settings with ITP/Workstation.