The attached script will organize the symbols within model based upon alphabatical order This script is shared for entire ARIS community to solve their common problem of selective symbol arrangement on models.
Take a look at the following model:
It's taken from DemoDB UMG "Capability Modeling". On close inspection, you will notice that capabilities related to ordering are not arranged in any order. If you tried to utilize model layout then you will get the following result:
Almost all the time you will face this problem that object organized within different categories are not arranged in specific order and it's cumbersome to arrange them later on.
By using the attached script, you can have arrange the symbols by selecting all the occurrences that are to be arranged.
- Select the object occurences that need to be arranged.
2. Then Evaluate the <Symbols Arrangement on Model> macro script.
- If all the symbols are of equal size then script will continue to run.
- Otherwise, you will be prompted to change the size of all symbols i.e. normalize the size of symbol based upon largest area symbol or smallest area symbol or you can select nto to change the size by selecting <cancel>.
***In this script, "size does matter". Without size and location, script will not know what would be the best position to place symbols. If you opted "not to change the size" then result might be not close to your expectation.
Script will search the selected symbols alphabtically and select the first symbols and will swapt it position with TOP LEFT symbol in original model. Refer to the figure below, the first symbol (which is selected alphabatically in our case <Aggregate amounts.....> will be placed at position 1 and next selected symbol on position 2 and so on.
After script executing, you will have the following arranged symbols:
Now you can apply the select symbols arrangement script in any way you want. But you should take care of the fact that it will start placing the object from Top Left till it successfully places all the symbols.
You need to invidually apply the script on each category's symbols so you need to execute five (5) times on each category symbol occurrences.
Notes:
- Not be used for right to left languages.
- Not be used for UML Diagrams.
- Best practices would be to change the size to "Largest Symbol" by selecting "YES" option during script execution.
Hello John,
I suppose you can inspect the script. Try unzipping the contained files until you get something readable. Also in ARIS Architect you find the Help section on ARIS Script API for Macros. The script language is Javascript (unless that script is even older than ARIS 7.2).