Why is the multiplicity value not displayed in this diagram?
You might have the option Suppress All Connector Labels checked, which would suppress the multiplicities. You can easily test that by giving your relationship a name. If that name is not displayed either it's pretty sure it's because of this setting.
Try unchecking this option by right clicking on the background of the diagram and choosing the option Properties
This is what it looks like after unchecking this option:
Related
We have created an MDG by extending the features of interface. We have an element called "Design" of type interface defined in MDG. On Selecting the toolbox and droping an element "Design" in the diagram we are getting an element with stereotype "Design" in diagram . On Right Click of diagram and selecting the Advance properties of elements and tries to uncheck the show element stereotype. After unchecking the property the diagram is hiding the stereotype and replacing the sterotype "Design" with stereotype «interface» .So how can we even hide the "interface" in Diagram
«Interface» is not a stereotype but a keyword (although visually the same).
You can hide that by choosing Advanced | Use Circle Notation. Using the rectangular notation without the «interface» keyword would simply be wrong as you wouldn't be able to visually see the difference between a class and an interface.
If you want to completely create your own visualization then you'll have to use a shapescript on your stereotype.
i have to change the diagram type of a lot of diagrams within my Enterprise Architect model. The change can be made manually using following option (that works as expected):
Select diagram - Diagram - Advanced - Change Type...
As I have to change a lot of diagrams I have created a script which searches for all concerned diagrams and change the type automatically. I wrote already a lot of JScript EA scripts for changing some modeling elements. Unfortunately, this feature seems not be available over the scripting interface.
I have to change the "MetaType" of the the diagram object. But this is read-only (see http://www.sparxsystems.com/enterprise_architect_user_guide/12/automation_and_scripting/diagram2.html). Therefore, I got an error.
var currentDiagram as EA.Diagram
currentDiagram = theDiagram
currentDiagram.MetaType = MY_DIAGRAM_METATYPE // ERROR
In the next step I searched for appropriate functionalities in the Repository interface (http://www.sparxsystems.com/enterprise_architect_user_guide/12/automation_and_scripting/repository3.html) and in the project interface. But I found nothing appropiate.
I am using Enterprise Architect 12.0.1215 and I used JScript.
Has anyone already tried this by script?
Have I missed something?
Is there another approach to achieve the diagram type change by script?
Thanks in advance!
You have to do that in two steps (if you change to different MDG diagram types). E.g. to change a Class diagram to a BPMN2.0::BPEL you first change Diagram_Type from Logical to Analysis. Additionally you need to add MDGDgm=BPMN2.0::BPEL; to StyleEx. In case your old diagram is from another MDG you need to modify the existing MDGDgm attribute in StyleEx.
As Uffe noted, the diagram type in the API is r/o. So if you need to change that you would need to do something like
Repository.Execute("UPDATE t_diagram SET Diagram_Type='Analysis' WHERE Diagram_ID=<theId>")
where <theId> would be the correct diagram ID.
I am trying to draw a part decomposition diagram with EA10. It should look like below.
But I couldn't find how. Is this UML diagram ever supported by EA?
Found it. I need to activate the "More tools..." -> "Composite" first. And choose "Port".
BTW, this is really a bad user experience.
You're doing it wrong. Sorry, but there's no kinder way to say it. :)
If the lifeline (:Class) is associated with a classifier (Class) which has properly defined ports (as it should be), then the following applies:
If you create the lifeline by dropping the classifier onto the sequence diagram, you get the option of displaying the ports (aka "structural elements") immediately.
Regardless of how the lifeline was created, you can right-click it and select "Structural Elements" which allows you to select the ports from the classifier (which may have been added since the lifeline was created).
If you want to create ports under a lifeline which has no classifier, you can do that too. Simply right-click and select "Structural Elements". The dialog allows you to create new ports.
The :Class lifeline presumably gets its type information from a Class element, so the first thing you need to do is find the Class element and give it two ports. Once you have done that, you can right-click the lifeline, select the Embedded Elements dialog and include the ports on the lifeline. (The Embedded Elements dialog may have been renamed Structural Elements in recent versions).
In Enterprise Architect (EA) 9.3 I do the following on a UML class diagram:
Select an Association link between two classes
Right-click and choose Advanced / Change Type from context menu
Change type from Association to Aggregation and click OK
What I find is that the diamond symbol for an aggregation is drawn on the wrong side (the destination side).
Is this a known bug? Is there a easy workaround? Thanks.
In enterprise architect the lines are drawn from part to whole, so source is without the diamond.
If you want to change it:
Go to Tools-> Options -> Links
And set the "Draw Aggregations Reversed" Option
Don't change an Association to an Aggregation. Instead, open the Association's properties and go to either the Source Role or Target Role page and set the "Aggregation" value to "shared" or "composite".
In EA I when I am adding attributes to a class I use the insert button. I would like to change the default new attribute to be public and of type string. I quickly did a search and found nothing. EA is hard to search for based on so many bogus responses.
So I thought I would quickly ask here.
Thanks in advance.
I'm fairly sure there isn't an option for this.
If you create your own UML profile (with a customized diagram type), you can set the default attribute type for attributes created from the diagram toolbox (not from within the Properties dialog), but even then there isn't a way to specify the default visibility.