Author Topic: Documentation for VBScript  (Read 5558 times)

DanaMaxwell

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Documentation for VBScript
« on: June 05, 2018, 09:35:01 pm »
I am working on some VBScript to recursively navigate from a package, processing packages with a specified value in a specific tagged value.

My immediate question is how to I find the tagged values on a package?    

dim currentPackage as EA.Package
...
Session.Output ( "PackageTags " & currentPackage.???)

But I find I spend a lot of time doing similar hunt for where to access a value via VBScript that I can see plainly in the model/diagrams.
For example, my next step will be process the elements within those packages to locate relationships to "instances".

Is there a trick to be able to view something in the browser/on the diagram and get an indication on how to find it via VBScript? Is there some documentation on the repository model structure I am not finding?

Thanks






Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Documentation for VBScript
« Reply #1 on: June 05, 2018, 09:49:41 pm »
Hi Dana,

The documentation is found in the help file around here: https://www.sparxsystems.com/enterprise_architect_user_guide/14.0/automation/reference.html
Browsing through the API will get you much information, but not all.

To supplement the official documentation you can read Thomas Kilians books, especially Inside and Scripting.

Other then that I usually look in the database where I can find a specific piece of information. After a while you get a "feeling" for how EA works and it will get easier.

If I really can't find I sometimes use SQL Profiler on my SQL Server model and manipulate the information I'm after.
The profiler will record all SQL queries on the database, so hidden in there I always find what I need.

with regards to the tagged values on a package, they are stored in EA.Package.Element.TaggedValues
(EA.Package is a bit peculiar as it is both an EA.Package as an EA.Element at the same time; except for root packages that is)

As for the relation between an instance and it's classifier, that is stored in the field EA.Element.ClassifierID on the instance.

Geert

DanaMaxwell

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Documentation for VBScript
« Reply #2 on: June 05, 2018, 11:28:12 pm »
Thanks!