QPR Knowledge Base


Hide Navigation Pane


Previous topic Next topic No expanding text in this topic  


Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 8.0


Creates a new element instance and returns the FullId (String) = <Id>.<InstanceId> of the created instance.




PGModel.CreateInstance(ElementId, Parameters, out FullId)




ElementId: Integer. Id of the element to be instantiated.

Parameters: A semicolon-separated list of parameters for creating a new element instance. The supported parameters:

ProcessLevel=<PS level Id>: Defines the process level where the instance is created. If omitted, the instance is created under the main process level.
OrganizationUnit=<Organization Unit ID>: Defines the organization unit where the instance is created. Note that the organization unit must be instantiated to the process level that is defined with the ProcessLevel= parameter. Instance graphical properties are set automatically so that instance is placed inside the Organization unit lanes.
InstanceGraphicalProperties=<startpoint.X>,<startpoint.Y>,<height>,<width>: Defines the graphical position and size of the instance. Some of the properties can be separately left empty. However, both <startpoint.X> and <startpoint.Y> must be set if position is needed to be set. If <startpoint.X> and <startpoint.Y> are set, these override the possible automatic Organization unit placement.
FullId (String) = <Id>.<InstanceID> of the created instance.


Required Rights:


Modify rights to the process level.


Return Values:

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








Example Procedure:


iResult = PGModel.CreateInstance(12345, "InstanceGraphicalProperties=1050,800,100,150;", FId)

'Creates a new instance of the element with Id 12345, sets the graphical properties for the instance. Returns the FullId of the new instance in the form "12345.<InstanceId>'

Comments (...)