Sparx Systems Forum

Discussion => Automation Interface, Add-Ins and Tools => Topic started by: kjourdan on December 23, 2017, 09:28:55 am

Title: Scripting to get all diagrams
Post by: kjourdan on December 23, 2017, 09:28:55 am
To this point, I have been working on a selected or active diagram.  I would like to find all diagrams within my model and operate on them.  How would I get a collection of all diagrams within the model?
Title: Re: Scripting to get all diagrams
Post by: kjourdan on December 23, 2017, 09:46:57 am
NvM.  Wouldn't you know it.  Right after I submit the question, I figure out the issue/method.  Sorry.
Title: Re: Scripting to get all diagrams
Post by: Geert Bellekens on December 24, 2017, 06:28:03 pm
For those stumbling onto this topic when searching for a solution, it would be nice if you included the actual solution as well :)

Geert
Title: Re: Scripting to get all diagrams
Post by: kjourdan on December 25, 2017, 08:48:52 am
Sure.
   var sql = "select * from t_diagram"
   var xml = SQLQuery(sql)

The xml can then be parsed for diagram IDs, names, etc.