Customization > Automation Interface > Functions > Functions for Collections > ReorderItem function (automation interface)
ReorderItem function (automation interface)
Syntax:
ReorderItem("<association>",<object>,<target object - move after>, <target object - move before>)
Where:
<association> is a string that specifies the association for which you want to order the objects. For more information, see Identifying associations...
<object> specifies the object you want to move. For more information, see Identifying objects...
<target object — move after> if specified, the object is placed after the specified target object. If you specify an object for <target object - move before>, you must set <target object -move after> to 'Nothing'.
<target object — move before> if specified, the object is placed before the specified target object. If you specify an object for <target object - move after>, you must set <target object -move before> to 'Nothing'.
This function allows you to order the objects returned through an association. This is the same as ordering items on the Items tab in Modeler.
Examples
This example changes the order of the actualBeltSpeed operation's parameters, by moving Parameter5 to after Parameter1.
Set objOperation = Dictionary.Item("Operation", "actualBeltSpeed")
Set objP1 = objOperation.Item("Parameter", "Parameter5")
Set objP2 = objOperation.Item("Parameter", "Parameter1")
Call objOperation.ReorderItem("Parameter", objP1, objP2, Nothing)