Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: i4mdone on April 24, 2018, 08:40:00 am
-
Is there an ability through Shape Script to only update the Alternate Image?
I would like to be able to define and select an option from a tagged value, which in turn the Shape Script knows to render the correlating image, but only as an Alternate Image (or at least that it behaves like selecting Alternate Image).
-
You can do that by using 'image' method
if (hastag("TAGNAME","VALUE"))
{
image("IMGID",0,0,100,100);
addsubshape("name","S");
shape name
{
h_align="center";
print("#NAME#");
}
}
-
Yes thank you - however that method behaves similar to the "Default Image" function as opposed to "Alternate Image" function. I am looking for a way through Shape Script to mimic "Alternate Image" behavior.
-
Ah! that's right, I have mostly done this toggle based on 'Use Rectangle Notation' which is a diagram specific setting, hence didn't realize it was actually setting the default image.
Not sure if there is another way to do this through shape script.