I think Sparx EA is an incredibly good tool, and I recommend it to all my clients, but this is an example of how incredibly frustrating it is to get value out of the documentation, and I also notice other commentaries on this.
I am trying to shapescript a UML component in 12.1, to give me a list of dependencies as a separate compartment as per the example on this link.
I have tried and tried and tried and cannot get this to work.
I have cut and pasted the code and pasted it into the target shape script, and still no response. I've refreshed the screen etc. after I loaded and no change whatsoever.
Does this work or not? if it works WHAT ADDITIONAL THINGS DO WE NEED TO DO MR SPARX?
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/add_custom_compartments_to_ele.htmlshape RelatedElement
{
//Check if the current connector we are processing has a
//dependency type.
if(HasProperty("Connector.Type", "Dependency"))
{
//Check if the element we are currently checking is
//the target of the current connector.
if(HasProperty("Element.IsTarget"))
{
//Set the compartment Name
SetCompartmentName("dependsOn");
if(HasProperty("Element.Stereotype", ""))
{
}
else
{
AppendCompartmentText("«#Element.Stereotype#»");
}
AppendCompartmentText("#Element.Name#");
}
}
}