QPR Knowledge Base 2017.1

OpenFileModel

OpenFileModel

Previous topic Next topic No directory for this topic  

OpenFileModel

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

Revision history:

Introduced in QPR 7.2.1

Last changed in QPR 2012.2

 

Opens a file model. This command does not require a server connection to be active.

 

Synopsis:

 

PGApplication.OpenFileModel(FileModelPath, ModelPassWord, out Model)

 

Parameters:

 

FileModelPath: Path of the file model. String.

ModelPassWord: Password required for opening the model (if any). String.

out Model: Variant for storing the model which is opened.

 

Required Rights:

 

None.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_CANNOT_CLOSE_MODEL

RV_CANCELLED

RV_CANNOT_OPEN_ANOTHER_SCRIPT_FILE_FROM_SCRIPT

RV_ERROR_IN_MODEL

RV_CANNOT_OPEN_FILE

RV_UNSUPPORTED_FILE_TYPE

RV_UNSUPPORTED_FILE_VERSION

RV_CANNOT_READ_FROM_FILE

RV_LOGIN_FAILED

RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT

 

Example Procedure:

 

Sub OpenDentorexFileModel()

 Dim iResult

 Dim oModel

 iResult = PGApplication.OpenFileModel("C:\Program Files\QPR 2017\ProcessGuide\Models\Dentorex - Quality Management System.qprdam", "", oModel)

 If (iResult <> 0) Then

   MsgBox "Opening the model failed: " + PGApplication.GetErrorMessage(iResult)

 End If

 Set oModel = Nothing

End Sub