NT

Hi all,

I am trying to create an Excel Report which would allow me to extract an inventory of models and objects within a folder.

I have created Level 2 and Level 3 Maps, and would like to extract a report that would be able to tell me the hierarchy of model names and corresponding functions and objects that exist within a Level 2 Structure. 

Ideally this would be extracted within one excel sheet that would store:

Level 2 Model Name

Level 3 Model Name 

Level 3 Functions

Level 3 Objects

Level 3 Risks

Level 3 Roles

Any help would be much appreciated.

 

Thanks

Natalie

by Torsten Haase
Posted on Mon, 01/27/2014 - 17:12

Hi Natalie,



so you want to start on a model on level 2 (case A) or on a group (and report all models on this level + their sub-models on level 3) (case B)?



In case A you create a new report with context "Model". The report is either programmed or created using "design view".

Programming the report, you might start as the following :



var model = ArisData.getSelectedModels()[0]

var nameLevel2 = model.Name(-1)

var functionsofModel = model.ObjDefListFilter(Constants.OT_FUNC)

//get assigned models in next level:

for(var i=0; i<functionsofModel.length;i++)

{

  var level3Models = functionsofModel[i].AssignedModels()

  for(var j=0; j<level3Models.length; j++)

  {

    var nameLevel3 = level3Models[j].Name(-1)

    //the objects can again be retrieved by calling ObjDefList(the required type) on the level 3 model

    //lists can be sorted using ArisData.sort(see help)

  }

}

In case (B) you start with

var group = ArisData.getSelectedGroups()[0]

var level2models = group.ModelList()



with this, you continue like in case (A) above.

 

The Excel output is written by using the standard output object (see help: "Output" object) & selecting "Excel" as the output format of the report. In the script you create a new table for each new sheet that should be contained in your excel file.



var ouput = Context.createOutputObject()

...all your tables here

output.WriteReport()



Hope this helps,

Torsten

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CP
  • BZ
  • Profile picture for user TEF_Bernd
  • ПЦ
  • CR
  • PacMan

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