QPR Knowledge Base 2012.1

DetachObject

DetachObject

Previous topic Next topic  

DetachObject

Previous topic Next topic  

Revision history:

Introduced in QPR 7.5.1

 

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

 

Synopsis:

 

SCModel.DetachObject(ObjectId, TargetObjectId)

 

Parameters:

 

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

TargetObjectId: Integer. Id of the object from which ObjectId is detached.

 

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.DetachObject(iInfoItemId, iTopElementId)