Author Topic: C# Plugin: Product Line Feature Diagram in UML  (Read 18842 times)

Edoardo

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #30 on: November 04, 2009, 12:09:19 am »
Quote
I would try to create a DiagramLink and set the layout options on that one.

Geert

Done, but the layout option entry is not documented, I don't really know how to set it.
I tried something but it has no effect at all.
« Last Edit: November 04, 2009, 12:09:40 am by e.varasi »

Edoardo

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #31 on: November 09, 2009, 09:08:11 pm »
Hi again, please help me with this

when I try to connect a class to another using "composition" with this statement:

Code:

EA.Connector con1 = (EA.Connector)associazione.Connectors.AddNew("", "Composition");
con1.SupplierID = madre.ElementID;
con1.Update();




in my diagram appears an aggregation relation instead (a white diamond)

How can I create a real composition connector (black diamond)?

thanks a lot

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13233
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #32 on: November 09, 2009, 09:17:13 pm »
It could be that you have to set the aggregationKind of the connectorEnd to the appropriate value ("Composite").

Geert

Edoardo

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #33 on: November 09, 2009, 09:55:45 pm »
Quote
It could be that you have to set the aggregationKind of the connectorEnd to the appropriate value ("Composite").

Geert

Sorry, I cannot find the aggregationKind entry in con1.SupplierEnd

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #34 on: November 09, 2009, 10:11:49 pm »
Quote
[size=18]...[/size]
EA.Connector con1 = (EA.Connector)associazione.Connectors.AddNew("", "Composition");
[size=18]...[/size]
Hi Edoardo,

According to the EA Help, "Composition" is not a valid type here.  The Connector Type needed is "Aggregation"

The AggregationKind is represented by the Aggregation attribute of the appropriate ConnectorEnd.
Valid values are:

0 = None
1 = Shared
2 = Composite.

Be warned though, that your "appropriate end" may be affected by the way you have instructed EA to draw Aggregations.

The general advice by long-term users is to avoid EAAggregations and use ordinary Associations appropriately adorned.  If you do a search for Aggregations you find more on this.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Edoardo

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: C# Plugin: Product Line Feature Diagram in UML
« Reply #35 on: November 09, 2009, 10:14:49 pm »
Quote
Quote
[size=18]...[/size]
EA.Connector con1 = (EA.Connector)associazione.Connectors.AddNew("", "Composition");
[size=18]...[/size]
Hi Edoardo,

According to the EA Help, "Composition" is not a valid type here.  The Connector Type needed is "Aggregation"

The AggregationKind is represented by the Aggregation attribute of the appropriate ConnectorEnd.
Valid values are:

0 = None
1 = Shared
2 = Composite.

Be warned though, that your "appropriate end" may be affected by the way you have instructed EA to draw Aggregations.

The general advice by long-term users is to avoid EAAggregations and use ordinary Associations appropriately adorned.  If you do a search for Aggregations you find more on this.

Paolo

Thanks a lot, this solved my problem!