Hi All,
We are using ARIS Business Architect 7.1
My team has written a script which is supposed to sort a number of objects (Requirement Object) by the attribute Identifier and the objects are to be placed at location on the canvas in the form of a matrix, but as per the sorting done based on the identifier.
Sorting of Attribute is done through a function for the variable
var occs2 = model1.ObjDefListByTypes([Constants.OT_REQUIREMENT]);
Along with sorting of the array as per the identifier, the following variable is also sorted, the reason for this being: we are not able to use the method SetPosition for the variable occs2, but can be set for the below variable.
var occs = model1.ObjOccListBySymbol([Constants.ST_REQUIREMENT]);
The debugging displays that sorting of both the variable array is happening as expected, however, when the report is executed on a model, objects appear on the canvas as per the matrix layout, but the placement of objects is not as per the sort executed.
Following is the workflow:
1. In a model, place 20 RO's at random positions.
2. Save and close the model
3. Execute the report on the model
4. RO in the model appear in matrix form (Not as per the sorting based on Identifier).
We looked at http://www.ariscommunity.com/users/kylekatarn/2011-01-31-trying-set-occurrence-position-setposition-method , but could not figure out why the sorting does not reflect for attribute placement.
Any help is highly appreciated.
Another observation: when we get the pixel value of the object on the canvas. Object appearing at the same position on different canvas return different value.
Example: RO1 and RO2 are objects on model1 and model2 respectively and appear to be at the same position. However on getting the pixel values: RO1 in model1 has position of (972,1526), whereas RO2 in model2 has position of (575,1526).