Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: EA_enthusiast on December 02, 2020, 08:51:19 am
-
Hello members,
I need your help please to figure out how to show the attributes of a class.
In the diagram attached, I copied a class that has a number of attributes. The copied class does not show those attributes. I edited those attributes but I could not show them on the diagram. I can see them in the project browser but not in the class on the diagram.
I used compartment visibility and I checked attributes but that did not work.
Also, how can I add more attributes to the class.
Thank you,
Mo
P.S: I am not sure why I am unable to attach an image to my message?
-
You need to place the image on a public server and use a link. Wellcome to the future...
Your description is vague. You copied a class? How? (And why?) How does the copy look like in the project browser?
q.
-
Thank you for your response.
My problem is solved. I dropped the element again onto a different diagram (i.e. drop as link, then the attributes finally appeared.
Thank you for the tip regarding adding an imge to a public server. I will make sure to do this next time :)
-
Probably you had played around with the settings for the other diagram. There's a way to show/hide certain details.
q.
-
Hello,
I need your help again, please. The attributes disappeared again. When I drop a class from the toolbox then add an attribute, could not display the attributes compartment.
I can see the attribute in the project browser but not on the diagram.
Please see the embedded screesnshot.
https://ibb.co/Zd9HGV7
-
A bit strange. There's also a setting in the context Feature&Properties/....Visibility... where you can tweak that. If that's not it it might be your installation is somehow corrupt. Or the DB for some reasons (run Configure/Check Integrity/Project Integrity and tick the repair button; don't let EA confuse you with that being bad or dangerous!). You could probably tell a bit more about your environment (single user, new setup, which exact EA versiión, which DB) or else it's a lot guesswork here.
q.
-
Thank you so much for your response. I've been pulling out my hair since yesterday!
This is a trial version. I am single user. In the welcoem screen, I choose "Ultimate".
I tried to drop the same class in (a) Class diagram (b) Custom Diagram Style Diagram (c) Strategy Map Diagram
In all these cases, I could not show the attributes. Please see the screenshots:
https://ibb.co/190Pn7r
https://ibb.co/WyWhFff
https://ibb.co/wRFGgfr
Please help!
-
Hi Mo,
Check the diagram properties <context menu> | Properties... | ELement | Show Compartments | [X] Attributes If that Checkbox is marked, then check the object Compartment Visibility [Ctrl+SHift+Y] settings. You'll see Attribute Visibility section.
Lastly, check if the class is in "Rectangle Notation" (in V15 that's the new "Paintbrush" widget). Many shapescriots will NOT show attributes is they are NOT in Rectangle Notation.
HTH,
Paolo
-
Just noticed that you are using a MDG. Well, that might as well explain things. No idea about that Strategy map. Start with using simple UML classes first before reaching out to any MDG.
q.
-
Hello, Paolo,
Thank you so much for your response.
I double-checked the 2 areas of settings and they are checked.
One thing I tried is to open the file on a nother computer. What I noticed that I can show the attribute of one class but not teh other, Both on the same diagram and both have the same settings <context menu> | Properties... | ELement | Show Compartments | [X] Attributes
Please see the screenshot
https://ibb.co/K60TpLf
Mo
-
Thank you, q.
What is MDG?
Mo
-
Thank you, q.
What is MDG?
Mo
What qwerty is saying that the Mission object is managed by a separate process. The object may not be able to normally display attributes (see my point about shapescripts).
To my mind, it is one of those fallacies of many modelling methodologies that the item can't have features. Usually what is conflated is that the item doesn't normally display them, therefore it can't have them.
Paolo
-
Thank you, Paolo, for trying to clarify this mystery (at least t me, it is).
What does MDG stand for? Probably it's something I need to research to be aware of.
My interpretation for "the Mission object is managed by a separate process" is that the "Mission" object or class is created under the "Strategy Map Diagram" Perspective, and that could be the reason that it does not show attributes. Is my understanding correct?
If my understanding is correct, that could be why I have two classes on the same diagram. One of them displays attributes, and the other one does not display attributes.
Did I get it right?
Again, thank you so much for your time to explain this to me.
Mo
-
MDG = Model Driven Generation (https://acronyms.thefreedictionary.com/MDG (https://acronyms.thefreedictionary.com/MDG)) in the Sparx universe. It offers different profiles and other stuff in a bundle. You are using the Strategy MDG. Better put that aside and start with plain UML. and no MDG at all You can turn them off under Specialize/Manage... (depending on your EA version). Turn everything off except for basic UML stuff. Heaven knows why Sparx splatters users with tons of these MDGs. Probably because its good marketing :-/
q.
-
Thank you, qwerty for the further clarification.
I nderstood from your comment that MDG might (or do) behave differently than the standard UML and that is the reason for the inconsistent behavior that I encountered (one class shows attributes but the other is not).
I personally liked these ready-made patterns (MDG) and found them very useful and time-saving. It's unfortunate that I could not leverage them the way I was expecting.
These patterns are one of the reason that I am trying Sparx now and wanting to switch from Cameo to Sparx.
Thank you.
Mo
-
First things first. You need to get used to basics (and some of EAUI - EA Unique Interface) before grabbing the more advanced stuff. I still think that EA is one of the best tools for UML - compared to the rest which is, well, lousy, super expensive, or both. However, EA could be sooo much better. But that's another story.
q.
-
Thank you for the advice qwerty. I will :)
After several trials, I observed that I am encountering this issue when using the "Strategy Map” profile. Please see the screenshot in the link and let me know what you think.
https://ibb.co/frPdhv2
Thank you!
-
It's pretty simple. A «Mission» element is not supposed to have attributes, and thus the shape is not showing attribute on the diagram.
The exact same thing happens when you add atributes to a Use Case or an Activity.
Geert
-
This is what I suspected after a lot of research. Thank you so much, Geert for confirming my suspicion. It was really driving me crazy.
Is there a source that refrerences which Features (attributes, operations, properties) can be shown on which elements?
Thank you so much.
-
Each modelling language (UML, SysML, BPMN, ArchiMate) has it's own syntax that is usually specified in some kind of official document available on the site of the organization that maintains that standard.
See the sites of OMG, The Open Group, etc..
Some of the MDG's might be Sparx inventions that don't have that type of documentation at all.
But there doesn't exist a single source that contains the rules for all of them.
Geert
-
Thank you for the additional information, Geert. I reaally appreciate it.
Mo