Author Topic: run a script to set up a new stereotyped diagram  (Read 2871 times)

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
run a script to set up a new stereotyped diagram
« on: January 12, 2025, 05:13:34 am »
Hello all,

I am stucked with the inability to automatically unset 'Show Namespace' option at creation of custom sequence diagrams .

APi seems to provide a RW attribute (HighlightImports) to set it off but how to assign a script running this job whenever user create a new sd ?

Thank you

Eric

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13288
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: run a script to set up a new stereotyped diagram
« Reply #1 on: January 13, 2025, 04:45:34 pm »
You probably don't need a script at all. You can use the template package to set these type of defaults for your diagrams.

Geert

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: run a script to set up a new stereotyped diagram
« Reply #2 on: January 15, 2025, 12:09:30 am »
Thx Geert but what is a template package in this context ?

I started setting dataex and pdata attributes with no success (showForeign=0" doesn't work)  then some posts led me to API and scripts...

What would be the recipe through these template package ?!
 :o

Eric

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13288
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: run a script to set up a new stereotyped diagram
« Reply #3 on: January 15, 2025, 05:06:10 am »
see here: https://sparxsystems.com/enterprise_architect_user_guide/17.0/modeling_fundamentals/using_element_templates.html

The properties of the diagrams in that package will be copied to any new diagram of that type. No scripting required.

Geert

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: run a script to set up a new stereotyped diagram
« Reply #4 on: January 16, 2025, 11:20:01 am »
That's perfect for me and so simple.
I did not know this capability...

Thank you Geert  !

Eric