Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Edoardo

Pages: [1] 2
1
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!

2
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

3
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

4
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.

5
Quote
Quote
Hi Edoardo,

Did you already try to update/refresh the diagram where these connectors appear?
Just a guess ...

WBR
Günther

Yes I did...

Any clues?

6
Quote
Hi Edoardo,

Did you already try to update/refresh the diagram where these connectors appear?
Just a guess ...

WBR
Günther

Yes I did...

7
Hi,

I would like to change the route style of my diagram connectors via automation interface. I need them to be routed with "vertical" style.

I tried with the following code but it has no effect:

  con2.RouteStyle = 4;
  con2.Update();

(con2 is an EA.Connector)

Can you help me please?

8
Hi again,

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

Code: [Select]
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

9
I am trying to change color of a Connector, but it seems to produce no results.

I'm calling

connector.color = 255      000000() //which is red
connector.update();

I got no results from theese statements.

Any ideas?

thanks

10
Here I am again,
I cannot find a way to modify, by API, the appearance of the classes in the Diagram. I would like to change background color and, mostly important, the dimensions.
Can you help me?
Many thanks!

11
I do not know where to find the documentation... Maybe I was looking in the wrong places, could you please give me a link? Thanks a lot!

12
ok, thanks, I used this statement:

this.repository.GetProjectInterface().LayoutDiagram(diagram.DiagramGUID, 1);

the integer is layoutStyle. Do you know what integer i should insert to obtain the same effect as I get using the EA menu Layout Diagram?

When I use "1" it seems somehow different...

13
Yes I found it, is project.layoutDiagram. Thanks.

How can I access to the project object to call it's method, assuming I'm handling a Diagram or a Package in it?

14
Once I've created the diagram, I would like to order it's element. In EA there is the command Diagram->Layout Diagram.

Can I do that from the API automatically?

15
Thanks a lot to everybody for the help!

Pages: [1] 2