Open ronaldtse opened 1 week ago
FYI @ReesePlews @Chika96
Note that when creating this attribute, you will need to choose the same data type, and can use "Select Type" if the type is a defined element in the package.
hello @ronaldtse thank you very much for researching this option. i am still grappling with UML, so i am wondering what happens if we change the structure of Building by adding this new attribute? i have been told that the specific order of attributes, and other constructs matters.
if i understand your idea correctly: (based on the snippet image from doc01v4, shown below)
do we create identical attributes for "boundedBy", "relativeToTerrain", "relativeToWater", etc in the bldg class and set their multiplicity to [0..0]?
does this same method also work for the inherited roles?
thank you again for researching this.
Yes you're right we have to do it for all greyed out attributes.
I actually haven't tried the role override. Will report back.
For overriding a role/association/relationship, it's more complicated. Nonetheless it is possible, but you have to create a (throw-away) diagram.
After setting the relationships, you can just delete the diagram. The relationships are stored in the model, not the diagram.
Steps:
lod2MultiSurface
. The target data type is called gml:MultiSurface
. lod2MultiSurface
. In the "TARGET MultiSurface" pane, enter lod2MultiSurface
, then set "Multiplicity" to "0".To test:
Notice this line in the XML: <type multiplicity="0"
.
<connector xmi:idref="EAID_2D561F37_F66C_48ae_99E1_973940394BE9">
<source xmi:idref="EAID_B2D484B5_202B_4034_9046_90FCCEC07F56">
<model ea_localid="612" type="Class" name="Building"/>
<role visibility="Public" targetScope="instance"/>
<type aggregation="none" containment="Unspecified"/>
<constraints/>
<modifiers isOrdered="false" changeable="none" isNavigable="false"/>
<style value="Union=0;Derived=0;AllowDuplicates=0;Owned=0;Navigable=Unspecified;"/>
<documentation/>
<xrefs/>
<tags/>
</source>
<target xmi:idref="EAID_9CD87EC7_BBC1_4503_B284_14860C27C0BF">
<model ea_localid="22" type="Class" name="MultiSurface"/>
<role name="lod2MultiSurface" visibility="Public" targetScope="instance"/>
<type multiplicity="0" aggregation="none" containment="Unspecified"/>
<constraints/>
<modifiers isOrdered="false" changeable="none" isNavigable="false"/>
<style value="Union=0;Derived=0;AllowDuplicates=0;Owned=0;Navigable=Unspecified;"/>
<documentation/>
<xrefs/>
<tags/>
</target>
<model ea_localid="961"/>
<properties ea_type="Association" direction="Source -> Destination"/>
<modifiers isRoot="false" isLeaf="false"/>
<parameterSubstitutions/>
<documentation/>
<appearance linemode="3" linecolor="-1" linewidth="0" seqno="0" headStyle="0" lineStyle="0"/>
<labels rb="0" rt="+lod2MultiSurface"/>
<extendedProperties virtualInheritance="0"/>
<style/>
<xrefs/>
<tags/>
</connector>
Use the "Add Element > Insert > Any Element" dialog.
And fill in the details.
EA's website said there's an easier way to create Relationships, but I can't seem to get it working. The "Link Type" does not provide a selection of what can a relationship be built with.
thank you @ronaldtse that is quite a set of steps. i am really going to have to study how that works. thank you for figuring this out and for documenting it so carefully. i am sure the Plateau Team and @Chika96 will be interested in checking this. thank you!
In Enterprise Architect 16, I've created a
usage
attribute inBuilding
that overrides theusage
attribute in_AbstractBuilding
.It looks like this:
You have to manually set its "Multiplicity" to "0..0" in the EA Properties pane.
Then the result in XMI as you will see below, says
<bounds lower="0" upper="0"/>
:This way we are able to detect which attributes are meant to be disabled, and the reason of why that attribute is disabled can also be entered in the Notes.