Siavash
Siavash

Reputation: 91

Enterprise Architect Shape Script DrawNativeShape() Function does not work

I have created a new profile for Enterprise Architect. It defines a stereotype for "Requirement". Modifying the default shape of "Requirement", I'm dealing with Shape Script. Calling the function "DrawNativeShape()" does not raise an error, neither has any effect! In fact I expect the code below to display the default shape of the element, but it does not so that the diagram looks empty.

shape main{  
     DrawNativeShape();
}

Upvotes: 0

Views: 920

Answers (1)

chimp
chimp

Reputation: 1849

The DrawNativeShape command is effectively saying "draw the shape exactly as you would if it didn't have a shape script". You say that that is what is happening. I don't see a problem.

There are two main uses for DrawNativeShape:

  • It can be used to apply conditional shapes to an element. What you do is test some condition and depending on the answer either draw a shape or call DrawNativeShape.
  • It can be used to apply conditional colour to an element. Call SetFillColor followed by DrawNativeShape and the element will be drawn with default appearance but using the colour specified by the shape script.

Upvotes: 1

Related Questions