Author Topic: How to show the Default Value of a SysML part in diagram?  (Read 1866 times)

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
How to show the Default Value of a SysML part in diagram?
« on: March 27, 2025, 03:16:03 am »
EA 16.1.1628 - 64 bit

I'm struggling with displaying the "Default Value" of a Part in diagrams.
Don't ask me why I need this  8)

I can see it in the Properties view under Part but I didn't find a way to show it in diagrams.
There seems to be no config option like Show Notes etc.
Also using ShapeScript it seems not to be possible as I don't get access to "Default Value".
It is stored in the part's TypeInfoProperties and there the name is "defaultValue" but even with this name I can't access it e.g. print("#defaultValue#"); leads to display of #defaultValue#.
Is there a way?
Thanks for your help!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to show the Default Value of a SysML part in diagram?
« Reply #1 on: March 27, 2025, 10:42:25 am »
Hi Mitch,
in the DB, the Default value is the "Default" column.  Try #Default#".

HTH,
Paolo
« Last Edit: March 27, 2025, 10:44:14 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: How to show the Default Value of a SysML part in diagram?
« Reply #2 on: March 27, 2025, 05:00:30 pm »
in the DB, the Default value is the "Default" column.  Try #Default#".
Hi Paolo,
thanks but this "Default Value" is from t_xref:
  • Name=MOFProps
  • Type=element property
  • Behavior=defaultValue
  • Description=<actual value>
I have the fear that it isn't exposed to ShapeScript at all...
BR

Michael

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to show the Default Value of a SysML part in diagram?
« Reply #3 on: March 27, 2025, 05:45:31 pm »
Here's the list of properties that you can show in a shapescript.
https://sparxsystems.com/enterprise_architect_user_guide/17.0/modeling_frameworks/displaying_element_properties.html
There's no use in guessing. If it's not here, it won't work.

The only alternative seems to be the "addin" property. Just make sure your code is super fast, as this has a serious risk of degrading performance.

Geert

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: How to show the Default Value of a SysML part in diagram?
« Reply #4 on: March 27, 2025, 06:14:17 pm »
Here's the list of properties that you can show in a shapescript.
https://sparxsystems.com/enterprise_architect_user_guide/17.0/modeling_frameworks/displaying_element_properties.html
There's no use in guessing. If it's not here, it won't work.

The only alternative seems to be the "addin" property. Just make sure your code is super fast, as this has a serious risk of degrading performance.
Hi Geert,
I was hoping for a documentation gap (happens from time to time ;) ).
Even some of the documented properties seem not to work - as others also found out.
The addin approach is out of the game due to the performance impact and the need to have another addin.
Thanks!

Michael