Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bITs.EA on January 23, 2017, 07:41:57 pm
-
Hi
In my shapescript, I want to define a default fill color (eg. setFillColor(255,255,255) ) for my shapes, but my users need to be able to change the colors when they design a model. Is there a way to achieve this with shapescript? Or do I need to use the "default" colors and forget about my default fill color?
Thanks
S
-
Hello,
Try color queries (http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/color_queries.html).
/Uffe
-
In case of color queries, you depend completely on the users choice and you can't set a default (or can you?).
What I want is :
- Setting a default myself
- Give the user the opportunity to change that color
-
I found the answer myself:
1) Don't set the color in the ShapeScript
2) Select the stereotype and press "F4" to show the Default Appearance dialog
3) Set the desired default appearance.
--> Now the elements are shown in the default appearance, but the user can change this appearance
-
What you should do is define the colour(s) associated with your stereotype when you create your profile.
Users can then override your default colours locally (for a single diagram) or as default like the way you are currently doing it (for a single element).