Introduced in QPR 7.3.1
Extended version of CreateCopy. In addition to functionality provided by CreateCopy, CreateCopyEX supports copying hierarchies and copying elements as references.
SCModel.CreateCopyEX(SourceID, ScorecardId, ParentID, WithHierarchy, AsReference, out Id)
SourceId: Integer. ID of object which is to be copied.
ScorecardId: Integer. ID of some existing object.
ParentId: Integer. If this is 0, then new element is created under the top element.
WithHierarchy: Integer. 0 = Copy only source element, 1=include sub-elements.
AsReference: Integer. 0 = Create normal Copy, 1 = Copy as reference element. NOTE! If AsReference = 1 and WithHierarchy = 1, then all elements are created as reference elements.
Id: Integer. ID of new object is returned in this parameter. NOTE! If WithHierarchy = 1, then a new root element ID is returned.
Administrator or Model Administrator rights to the SCModel.
Below are listed the return values that this function can return:
iRet = SCModel.CreateCopyEX(iMeaId, ScorecardId, 0, 0, 1, Id)