Reputation: 2140
When inserting a element (my case: a "Text" element which will be a hyperlink) in a diagram one needs to create the element, create the diagram object in the diagram, link the element ID with the diagram object ID.
How to set the specific position the element will occupy in the diagram? How to set the size of the element?
I notice we have a left, right, top and bottom properties in the diagram object, which we can initialize adding a new diagram object to the diagram:
var position = String.Format("l={0};r={1};t={2};b={3};", 1000, 1000, 5000, 5000);
var diaObject = (DiagramObject)rootDiagram.DiagramObjects.AddNew(position, string.Empty);
But no matter which values I use for the "coordinates", my hyperlink always appear on top left, one over the other, and all of them with the same size.
Upvotes: 2
Views: 1805
Reputation: 10504
You're specifying r=l=1000
and b=t=5000
. This will result in a size of 0x0 at which point I'd guess EA will revert to defaults. Try setting r to 1500 and b to 6500.
Upvotes: 1