Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: Paolo F Cantoni on September 02, 2008, 11:51:42 am

Title: Shape scripts for non-stereotyped items
Post by: Paolo F Cantoni on September 02, 2008, 11:51:42 am
It has been often mentioned/requested to be able to apply shape scripts to non-stereotyped elements (both edges and vertexes).  One simple solution would be to enable the <none> (extrinsic) stereotype.  If an element has no stereotype applied and the <none> entry exists in the stereotype definitions for that type of element, then EA could apply the rendering (meta-file or shape script) as specified in the <none> definition.

I'm sure I'm not the only person to whom this thought has occurred, but I haven't seen it voiced before.

What do others think?  If there's agreement I'll submit a suggestion.

Paolo
Title: Re: Shape scripts for non-stereotyped items
Post by: «Midnight» on September 02, 2008, 12:44:46 pm
[IMHO] Submit the suggestion.

This becomes a very powerful possibility, when you consider the possibility of querying a tagged value. If the tag exists, or if it is set to a specific value (EA allows you to use either treatment) then the shape script can be triggered. Otherwise you could just branch to DrawNativeShape. This would effectively allow shape scripts to be triggered by tagged values instead of stereotypes.

Nifty!
Title: Re: Shape scripts for non-stereotyped items
Post by: Thomas Mercer-Hursh on September 03, 2008, 01:51:13 am
Go for it!  If added to the other shape script things we have asked for this could add a lot of power.
Title: Re: Shape scripts for non-stereotyped items
Post by: «Midnight» on September 03, 2008, 06:23:47 am
If we got (some of) the other things we have asked for there would already be lots of added power.

Still, we should keep the ideas coming.
Title: Re: Shape scripts for non-stereotyped items
Post by: Dave_Bullet on September 03, 2008, 07:49:01 am
absolute power completes absolutely!  ;D

Would you have one default shapescript across the model (for any element without a stereotype) or by object type? (ie. by class, node, package, component etc...)

If by object type - then we should also request / ask for shapescript "modules" - so common code can be shared across scripts.

Another issue is the diagram.type property in shapescript only checks the base type (ie. logical, deployment etc...) - not the custom diagram type you might create (ie. SolutionArchitectDeployment, InfrastructureArchitectDeployment etc...).  This would be much more useful for having per role rendering via shapescript.

David.
Title: Re: Shape scripts for non-stereotyped items
Post by: «Midnight» on September 03, 2008, 08:36:09 am
All good points and questions Dave,

These serve to open up the subject. They also point out, however indirectly, what might be done by enhancing shape scripts.