QPR Knowledge Base 2014.1

ImportModel

ImportModel

Previous topic Next topic  

ImportModel

Previous topic Next topic JavaScript is required for the print function  

Revision history:

Introduced in QPR 7.2.1

 

Import a model from the file identified by FilePathName parameter. Closes the active model (if any) first. FilePathName may not be a script file.

 

Synopsis:

 

SCApplication.ImportModel(FilePathName, ModelName, out Model)

 

Parameters:

 

FilePathName: String. "C:\examplemodel.qprmem" for instance

ModelName: String. Name for the model, can be left empty: A dialog is shown where the user can type in a name. If user interface is hidden and ModelName is not supplied, an error (RV_UNKNOWN_ERROR) is returned

Model: pointer to returned model

 

Required Rights:

 

None

 

Return Values:

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

 

RV_APPLICATION_QUIT_CALLED

RV_NOT_CONNECTED_TO_SERVER

RV_NOT_AUTHENTICATED

RV_SUCCESS

RV_MODEL_DOES_NOT_EXIST

RV_INVALID_PARAMETER

RV_NAME_IS_RESERVED

RV_CANNOT_OPEN_ANOTHER_SCRIPT_FILE_FROM_SCRIPT

RV_CANNOT_OPEN_FILE

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCApplication.ImportModel("c:\test.qprmem", "test model", Model)