|
||
Revision history:
Introduced in QPR 7.2.1
Create a new model and open it. Closes currently open model (if any) first. If this command is executed successfully (RV_SUCCESS is returned), both global name SCModel and Mode parameter refer to the created model. If TemplateModelName is supplied, the new model is created as a copy of the template. Note that only way to create some modeling elements such as periods and value settings is to create a new model by copying a template model.
Synopsis:
SCApplication.CreateModel(ModelName, TemplateModelName, out Model)
Parameters:
ModelName: String, name of new model
TemplateModelName: String, name of existing model/template, can be left empty
Model: pointer to created model
Required Rights:
Administrator or Model Administrator rights to TemplateModel
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_INVALID_NAME
RV_NOT_CONNECTED_TO_DB
RV_MODEL_DOES_NOT_EXIST
RV_NO_RIGHTS
Example Procedure:
iRet = SCApplication.CreateModel("New Model", "", Model)