Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bITs.EA on January 18, 2017, 03:10:41 am

Title: shapescript: change border of native shape
Post by: bITs.EA on January 18, 2017, 03:10:41 am
Hi

Can anyone explain why the following code isn't working? (the native shape turns red, but the border doesn't change to "dashed")

Do I need to change the function "SetLineStyle"?

Code: [Select]
shape main{
SetLineStyle("dash");
SetFillColor(255,0,0);
DrawNativeShape();
}

Grts

S
Title: Re: shapescript: change border of native shape
Post by: qwerty on January 18, 2017, 04:32:18 am
The DrawNativeShape draws what it says. The SetLineStyle only affects he LineTo and other drawing, but not the native shape.

q.
Title: Re: shapescript: change border of native shape
Post by: Uffe on January 18, 2017, 10:43:29 pm
It might be worth trying drawparentshape() instead.

According to the documentation, it "behaves identically to drawnativeshape() if no inherited shape script is available", but it's worth a shot.

/Uffe