Introduced in QPR 7.6.1 SP2
Last changed in QPR 8.1
Opens a file or a server model. With server models you can define whether the model is opened for viewing, editing, or exclusive editing. With server models that use version management you can also specify the version to open.
PGApplication.OpenModel(ServerModelPath | ServerModelId | FileModelPath, Parameters, out Model)
ServerModelPath: Path of the model in the server. String.
ServerModelId: ID of the server model. Integer.
FileModelPath: Path of the file model. String.
Parameters: A semicolon-separated list of parameters. The following parameters are supported:
•FileModelPassWord: String. Password required for opening the model (if any).
•OpenMode: VIEW | EDIT | EXCLUSIVE. String. The mode used when opening a server model. VIEW = view only, EDIT = open for editing, EXCLUSIVE = open for exclusive editing
•FileModel: Boolean. Set this to true if you need to open a file model when a server connection is active. Possible values: true | false, 0 | 1. By default this is false.
•Model.Branch: String. Name of the branch where the model should be opened from. This requires that the model uses version management. If this is left empty, the root folder is used.
•Model.Version: String. Model version number. The first model in which the version number matches is opened. This can be used together with Model.Branch
•Model.Revision: Integer. Model revision number. This parameter overrides both Model.Branch and Model.Version since the revision number is always unique.
out Model: Variant for storing the model that is opened.
At least view rights to the model.
Below are listed the return values that this function can return:
'Open the Dentorex Group model from the server for exclusive editing
iResult = PGApplication.OpenModel("\\Dentorex Group Processes", "OpenMode=EXCLUSIVE", oModel)