Can anyone tell me if there is a way in ARIS reporting to display a total or count of the objects in a model? We have a report that lists all applications from a model, and I would like to put a total count at the end of the report, but I cannot find a way to do this. Thanks.
Hi Lisa,
the method "ObjOccList ( )" returns all object occurrences in the model. The source code below gives you the count of the objects:
var oObjOccs = oModel.ObjOccList(); var counter = oObjOccs.length; //.......
NOTE: This source code count all objects, also connectors. If you only want special objects you can use this methode:
var ospecialObjOccs = oModel.ObjOccListFilter(Constants.OT_FUNC); var counter = ospecialObjOccs.length; //......
I hope this will help you.
Regards
Eva
Yes you must define "oModel". I give you an example below:
var oModels = ArisData.getSelectedModels(); // your source code //...... counter(oModels); function counter(oModels){ for (var i=0;i<oModels.length;i++){ var oModel = oModels[i]; var oObjOccs = oModel.ObjOccList(); var ospecialObjOccs = oModel.ObjOccListFilter(Constants.OT_FUNC); var counter = ospecialObjOccs.length; //..... } }
What exactly do you mean by "entries"?
Hi Lisa,
make sure you join the Reports & Macros group. There you will find additional tutorials and a list of free ARIS reports and macros, that will help you to find an easy way to the ARIS Scripting world:-).
Regards
EVa