QPR Knowledge Base 2016.1

AddParentElement

AddParentElement

Previous topic Next topic No directory for this topic  

AddParentElement

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

Revision history:

Introduced in QPR 2015.1

 

Adds elementId to the given hierarchy under the given parent.

 

Synopsis:

 

PGModel.AddParentElement(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 for which the parent is added. If only one parent is allowed for the element, then the possible previous parent is removed first.

ParentElementId: ElementId (integer) or ElementSymbol (string). The element id or symbol of the intended 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_CANNOT_MODIFY_HIERARCHY

 

 

Example Procedure:

 

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