Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: nikhilyewalekar on January 04, 2018, 03:55:09 pm
-
I am creating the EA plugins,
when i extract the position information for the Relations elements (aggregation, association) i get the position as 0,0,0,0
can any one suggest.
-
Look in the DiagramLinks collection for the Diagram.
-
Hi Thanks for your help,
I tried using DiagramLinks, still get the same values,
DiagramID : 36
ConnectorID : 111
Style : Mode=3;EOID=89875876;SOID=B6B7D576;Color=-1;LWidth=0;
Geometry : SX=0;SY=0;EX=0;EY=0;EDGE=2;$LLB=;LLT=;LMT=;LMB=;LRT=;LRB=;IRHS=;ILHS=;
InstanceID : 101
IsHidden : False
ObjectType : otDiagramLink
Path :
Please suggest
-
SX=0;SY=0;EX=0;EY=0; means the start and end points are offset zero logical units (pixels at 100%) from the center of the source and end objects.
Here's an example from a connector that I joined to the extremities of some relatively large elements.
24,75,SX=71;SY=214;EX=-273;EY=25;EDGE=2;$LLB=;LLT=;LMT=;LMB=;LRT=;LRB=;IRHS=;ILHS=;,Mode=3;EOID=13A6BC3D;SOID=3478A400;Color=-1;LWidth=0;,False, ,56,
If you want the absolute positions you need to get the center points from the objects at either end and calculate them.
-
Hi,
Thanks for suggestion,
can you please help, how to find/ calculate the absolute center points of the object.
-
(left + right)/2 , (top + bottom)/2
-
Thanks for your reply,
I am saving the diagram as image using below method,
Diagram.SaveDiagramImageToFile(filepath);
Diagram in EA details:
Scale="100"
Cx="850" Cy="1098"
Image Details : Dimensions : 616 x 517
image dimensions and EA diagram dimensions not match.
How to save image with the same dimension as in EA??
-
I'm not sure the saved dimensions have any relation the internal location units.
Geert
-
I trying to identify the EA elements in the exported diagram.
but due to this i am not able to identify the position of the elements.
-
Check the xmi export, or the feature to export the diagram image map from the cache.
Geert