Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Jacob Vos on December 24, 2021, 02:23:41 am
-
When you add an attribute to an element and manually type '<none>' as type, then the attribute type will be blank. So I thought to arrange that in a custom MDG by adding '_defaultAttributeType' with the initial value '<none>'.
The MDG file has now:
defaultAttributeType="<none>"
However, when adding an attribute, the type is still 'int'.
Who knows the solution?
-
Report a bug. According to the help this should work.
Maybe you could try applying an empty string instead.
q.
-
I found that the behavior of this functionality is different than I expected. Because it only works when dragging a custom defined attribute type from my own MDG toolbox to a class.
(In the UML Profile, I wrongly defined _defaultAttributeType at a stereotype that extends the metaclass Class, expecting that when adding an attribute to a class with that stereotype, that default attribute type would be used. However, after closer reading I know now that _defaultAttributeType has to be set at a stereotype that extends the metaclass Attribute.)
When adding a new attribute to the list of attributes of a class, before you can fill in the stereotype of it, EA filled the 'Type' with 'int'. So when adding attributes in that way, it doesn't make sense to set _defaultAttributeType.