RF

Hello!

Is there a any way to write a script to compare the size of objects occurrence in model and the size of objects definition (according to active filter/template)???

I can get the size of obj occurrence values, but i don´t know how to get the objects definition size. Here the code:

var idioma=Context.getSelectedLanguage();

var modelos = new Array();         

var objetos = new Array();

function main(){

    var diretorios = ArisData.Unique(ArisData.getSelectedGroups());

    var oOutput = Context.createOutputObject();

    for(var d in diretorios){

        modelos    = modelos.concat(diretorios[d].ModelList(true));

        

        if(listaPreenchida(modelos)){

            for(var x in modelos){

                objetos = objetos.concat(modelos[x].ObjOccList());

            }    

        }  

    }

    for (var i in objetos)

    {

        oOutput.OutputLn("\n Object: " + objetos[i].ObjDef().Name(idioma) , "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);

        oOutput.OutputLn("-- Defaut symbolnum: " + objetos[i].ObjDef().getDefaultSymbolNum() , "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);        

        oOutput.OutputLn("\n height --- : " + objetos[i].Height(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);                        

        oOutput.OutputLn("\n width --- : " + objetos[i].Width(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);                        

    }

    oOutput.WriteReport();

}

main();

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Mon, 11/28/2016 - 14:30

Hi,

object definitions never have a size. Size is a property of an occurrence.

The only thing that comes to mind is to use the size for an object symbol as defined in the template. So if this model has a template set, you could try to find out if what the size of the object would be after setting the template. But as far as I know, this could only be done by setting the template to the model which would destroy the old size...

BR Robert

0
by Rodrigo Faco Author
Posted on Mon, 11/28/2016 - 14:55

Hi Robert!

I think maybe there's a library/function that return this kind of values from the object on template. But I didn't find anything at the Aris help.

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Mon, 11/28/2016 - 15:33

Hi,

I don't think there is anything in ARIS to do this. For a model, you only set the template via its GUID and also get only the template GUID.

Hm, but this could help:

var aTemplates = ArisData.getConfigurationTemplates( Context.getSelectedLanguage() )
 for(var i=0; i<aTemplates.length; i++)
 {
     Dialogs.MsgBox("Model template name: "+aTemplates[i].getName()+"\nDescription:\n"+aTemplates[i].getDescription())
 }

Ah well, or not - only language and description etc.

So what you could do is: create a new model, copy the occ into this model, set the template for the model, read the size and delete the model again.

BR Robert

0
by Rodrigo Faco Author
Posted on Mon, 11/28/2016 - 18:04

"So what you could do is: create a new model, copy the occ into this model, set the template for the model, read the size and delete the model again."

--------------------------------------------------------------------

Hi Robert,

It´s not the best solution I expected to develop from Aris, but will solve the problem! :)

Thank you!

 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock