QPR Knowledge Base 2017.1

RemoveParentElement

RemoveParentElement

Previous topic Next topic No directory for this topic  

RemoveParentElement

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

Revision history:

Introduced in QPR 2015.1

 

Removes elementId from the given hierarchy from under the given parent.

 

Synopsis:

 

PGModel.RemoveParentElement(Hierarchy, ElementId, ParentElementId)

 

Parameters:

 

Hierarchy: Hierarchy ID (integer) or Hierarchy Symbol (string). The hierarchy id or hierarchy symbol for the hierarchy where the parent element exists.

ElementId: ElementId (integer) or ElementSymbol (string). The element id or symbol of the element whose parent element is removed.

ParentElementId: ElementId (integer) or ElementSymbol (string). The element id or symbol of the removed parent element.

 

Required Rights:

 

Modify rights to the model.

 

Return Values:

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

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_INVALID_PARAMETER

RV_HIERARCHY_NOT_FOUND

RV_MODEL_NOT_OPEN

RV_ELEMENT_NOT_FOUND

 

 

Example Procedure:

 

 iResult = PGModel.RemoveParentElement(Hierarchy="H2", ElementId="MO1428971049", ParentElementId="MO2534897435")