Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

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

    GetTypeIdByName

    Scroll Prev Top Next More

    Revision history:

    Introduced in QPR 7.2.1

     

    Returns ID for first type that matches the TypeName.

     

    Synopsis:

     

    SCModel.GetTypeIdByName(TypeName, out Id)

     

    Parameters:

     

    TypeName: String, 'Element' for example

    Id: Integer, returned ID of Typename

     

    Required Rights:

     

    Administrator or Model Administrator rights to the SCModel.

     

    Return Values:

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

     

    RV_SUCCESS

    RV_NO_RIGHTS

    RV_UNKNOWN_ERROR

    RV_MODEL_NOT_OPEN

    RV_TYPE_NOT_FOUND

     

    Example Procedure:

     

    iRet = oModel.GetTypeIdByName("Alert", id)