Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uffe on April 19, 2016, 10:44:23 pm

Title: Access association class connector properties from shape script
Post by: Uffe on April 19, 2016, 10:44:23 pm
Hi Gurus!


I've stereotyped an association class, and I would like to be able to show which elements it connects in the shape script for the class. That way I can drop the association class in a diagram on its own and see its source and target.

The information is available in a connector shape script, but of course I'm in an element context.
So is there a way to do this without resorting to an Add-In call?

Cheers,


/Uffe
Title: Re: Access association class connector properties from shape script
Post by: qwerty on April 19, 2016, 11:55:01 pm
I guess not. But you already named the fallback.

q.
Title: Re: Access association class connector properties from shape script
Post by: Uffe on April 20, 2016, 12:00:11 am
Yeah... I want to avoid that if at all possible since it doesn't scale very well performance-wise.
Title: Re: Access association class connector properties from shape script
Post by: qwerty on April 20, 2016, 12:46:00 am
I know. We will for sure not see any unified approach for all those scripting cripples Sparx has bred in the past :P

q.
Title: Re: Access association class connector properties from shape script
Post by: Glassboy on April 20, 2016, 06:49:18 am
Hi Uffe, you'll also find that the document generation can not determine either end of the association, and you can't select the link between the associated class and the association to straighten it.  I have a couple of feature requests logged to fix this.  I suggest you get a feature request logged for your problem.  To me as this is core UML it should be high on the priority list rather than all the new fancy doodads.

When I first discovered association classes I couldn't imagine what I could use them for but it turns out they tidy up the visual modelling of pretty much every relationship and allow you to create much neater diagrams that work well with the business. 
Title: Re: Access association class connector properties from shape script
Post by: qwerty on April 20, 2016, 07:50:51 am
Well, an association class is not an association. It's a homunculus which is both, class and association. It has its good use, but it's not good for putting association notes inside.

q.

Sorry, mixed up things. Though the above is not wrong, it has nothing to to with this thread.
Title: Re: Access association class connector properties from shape script
Post by: Glassboy on April 20, 2016, 08:20:01 am
Well, an association class is not an association. It's a homunculus which is both, class and association. It has its good use, but it's not good for putting association notes inside.

What do you mean by "association notes"?
Title: Re: Access association class connector properties from shape script
Post by: qwerty on April 20, 2016, 04:33:54 pm
Oops, sorry. Please forget my last post. I had been mixed up with two different things and produced simply nonsense.

q.