AddInShapeScript - Helmut-Ortmann/EnterpriseArchitect_hoTools GitHub Wiki

Add-In: Shape Script

You need something you can't express with EA ShapeScript language. Add-Ins give you the power to almost visualize everything. The things you have to consider:

  • First Add-In for ShapeScript needs some time
  • Diagram rendering performance may be decreased

Steps

  1. Specify what you want to visualize

    print("#ADDIN:AddInSimple, GetParentProperty, TAG=TEST#");

  2. Define a Stereotype, see e.g. Domain specific Profiles, by Thomas Kilian

  3. Write your ShapeScript, see e.g. Shape Script made easy, by Thomas Kilian

  4. Develop your Add-In (usually, add a public function to an existing one)

    public string GetParentProperty(EA.Repository repository, string eaGuid, object theParams) {..}

  5. Install Add-In (you can test it in DEBUG mode first)

  6. Test, improve and give feedback

Example

hoTools contains two C# Visual Studio 2017 projects which show:

  • How to construct an Addin, see AddInSimple
  • How to deploy an Addin using a WIX Installation Project, see, AddInSimpleSetup
  • Two Example Shape Script methods:
    • public string GetValueForShape(EA.Repository repository, string eaGuid, object theParams)
    • public string GetParentProperty(EA.Repository repository, string eaGuid, object theParams)

GetParentProperty

The Shape Script print method GetParentProperty outputs the specified information of a parent Element. GetParentProperty supports the following theParams values (see implementation):

  • ALIAS
  • COMPLEXITY
  • ISSUE=<IssueName> (visualize Reporter)
  • KEYWORDS
  • LANGUAGE
  • NAME
  • PHASE
  • RESOURCE=<ResourceName> (Visualize Role)
  • RISK=<RiskName> (visualize weight)
  • RUNSTATE
  • STATUS
  • STEREOTYPE
  • TAG=<TagName>
  • TEST=<TestName> (visualize test result)
  • TYPE
  • VERSION

More

If you understand how to implement & deploy an Add-In, then it's just a few lines of code. The example should give you the know-how to do it or to find someone who will make it for you.

Cons

To install Add-Ins the user needs local administration rights. You may look to Non-admin installation of Add-Ins to find a way around.

Be aware: Excessive use of Add-In to print in Shape Scripts may decrease diagram rendering performance.

Books

I've found, bought, and appreciated the following books

References

Books