QPR Knowledge Base 2017.1

AttachObject

AttachObject

Previous topic Next topic No directory for this topic  

AttachObject

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

Revision history:

Introduced in QPR 7.5.1

 

Attaches object to a target model element (or object). If ObjectId is INFORMATIONITEM and TargetObjectId is measure type of element, the object is added to the information items list of the measure in question.

 

Synopsis:

 

SCModel.AttachObject(ObjectId, TargetObjectId)

 

Parameters:

 

ObjectId: Integer. Id of the object that is to be attached to TargetObjectId

TargetObjectId: Integer. Id of the object to which ObjectId is attached.

 

Required Rights:

 

Administrator or Model Administrator rights to the SCModel.

 

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_NOT_OPEN

RV_NO_RIGHTS

RV_OBJECT_NOT_FOUND

RV_INVALID_OBJECT_TYPE

RV_INVALID_PARAMETER

RV_OBJECT_IS_LOCKED

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.AttachObject(iInfoItemId, iTopElementId)