Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MichPaule on March 27, 2025, 03:16:03 am

Title: How to show the Default Value of a SysML part in diagram?
Post by: MichPaule 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!
Title: Re: How to show the Default Value of a SysML part in diagram?
Post by: Paolo F Cantoni on March 27, 2025, 10:42:25 am
Hi Mitch,
in the DB, the Default value is the "Default" column.  Try #Default#".

HTH,
Paolo
Title: Re: How to show the Default Value of a SysML part in diagram?
Post by: MichPaule 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:
I have the fear that it isn't exposed to ShapeScript at all...
BR

Michael
Title: Re: How to show the Default Value of a SysML part in diagram?
Post by: Geert Bellekens 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 (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
Title: Re: How to show the Default Value of a SysML part in diagram?
Post by: MichPaule 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 (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