Book a Demo

Author Topic: Using Shape Script with Diagram Properties  (Read 3162 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Using Shape Script with Diagram Properties
« on: October 04, 2019, 12:37:46 pm »
Hi All

I know we can (of course) drive shape scripts using element properties and tagged values.
However, I am wondering if it is possible to detect the properties of the diagram that the element is currently displayed within in order to drive the shape script.

What I would like to do is change the appearance of elements based on either the type of diagram that they are being displayed or some other kind of property.

I can't see any way of doing this and if the answer is that it is not possible, then it would be good to at least have that confirmed.

Thanks in advance

Jays :-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using Shape Script with Diagram Properties
« Reply #1 on: October 04, 2019, 01:29:38 pm »
No, that is possible.
You can do stuff like

Code: [Select]
if(hasproperty("diagram.mdgtype", "MYPROFILE::MYDIAGRAMTYPE"))
{
}

Geert

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Using Shape Script with Diagram Properties
« Reply #2 on: October 08, 2019, 08:54:15 am »
Thanks Geert! I thought it was not possible, but it really helps to have it confirmed.

Jays :-)