Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

  •      
  • Navigation: Developer's Guide > QPR API > The Object Model > QPR Metrics > SCApplication Commands

    OpenModel

    Scroll Prev Top Next More

    Revision history:

    Introduced in QPR 7.2.1

     

    Opens a model identified by vModel parameter, which can be either a model ID or a model name. Sets Model parameter to point to the opened model. Also global name SCModel points to the opened model (SCModel points always to the model that is currently open).

     

    Synopsis:

     

    SCApplication.OpenModel(vModel, out Model)

     

    Parameters:

     

    vModel: variant, either model ID (integer) or model name (string)

    Model: pointer to opened model

     

    Required Rights:

     

    View rights to model

     

    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_PARAMETER

    RV_MODEL_DOES_NOT_EXIST

    RV_NOT_CONNECTED_TO_DB

    RV_NO_RIGHTS

    RV_UNKNOWN_ERROR

     

    Example Procedure:

     

    iRet = SCApplication.OpenModel("Dentorex", Model)