|
||
Revision history:
Introduced in QPR 7.5.1
Last changed in QPR 2012.2
Deletes a model element indicated by element ID supplied as a parameter. With process steps and stores it is possible to delete also only a single instance of the element. Note that at the moment the only supported way to get an element's ID is to use XML Export and convert the XML ID (e.g. 'PG_PS123456') to Long.
Synopsis:
PGModel.DeleteElement(ElementId, Parameters)
Parameters:
ElementId: Integer. ID of the element to be deleted.
Parameters: String. A semicolon-separated list of parameters. Currently supported parameters:
•InstanceId=<InstanceId>: If this parameter is defined, only the specific instance is deleted. If this is empty, the whole element is deleted. Also if the last instance of a process step or a store is deleted, the whole element is deleted as well.
Required Rights:
Modify rights to the diagram.
Return Values:
Below are listed the return values that this function can return:
RV_SUCCESS
RV_APPLICATION_QUIT_CALLED
RV_MODEL_NOT_OPEN
RV_ELEMENT_NOT_FOUND
RV_INVALID_PARAMETER
RV_INSTANCE_NOT_FOUND
RV_NOT_ENOUGH_RIGHTS
RV_UNKNOWN_ERROR
RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT
Example Procedure:
iResult = PGModel.DeleteElement(183056580, "InstanceId=1")