- All categories
- Feature Requests (607)
- Help (2,310)
- Finished Features (28)

+1 vote

yEd works with an abstract coordinate system that is not related to any paper size. The coordinates written to GraphML files are the coordinates of the elements in yEd's abstract coordinate system. So, coordinates are not calculated when saving a diagram, because coordinates already exist.

E.g. try the following to understand how that works:

- Create a new empty diagram.
- Create a single new node.
- Select the node.
- Move the node to an arbitrary location.
- Check the node's x- and y-coordinates in the properties view in yEd's lower right corner.
- Save this diagram to a new GraphML file.
- Open the new GraphML file in a text editor.
- Compare the coordinates in the file with the coordinates displayed in yEd.
- Move the node to a different location.
- Use "Save As" to save your diagram once again, but to a second GraphML file.
- Open the second GraphML file in a text editor again.
- Compare the coordinates in the second file to the coordinates in the first file and the coordinates displayed in yEd.

In other words, the coordinates in yEd are not related to a specific unit of measurement. I.e. if you place a node at position (0, 0), another node at position (100, 0), and a third node at position (200, 0), that does **not** mean that the first node is 100 pixel or inch or millimeters from the second node. All it means is that the third node is twice as far from the first node as the second node.

No, there is no way to restrict coordinates in yEd.

Off the top of my head, I can think of two approaches:

- yEd includes a "Geometric Transformation" tool which can be used to move all (or some) elements in a diagram and to scale the coordinates of all (or some) elements in a diagram. As a result, you could use "Geometric Transformations" to fit your diagram into the range of coordinates supported by your simulator before saving your diagram to GraphML.
- Transform the yEd coordinates into the coordinate range supported by your simulator in your python script. (This requires only very simple math.)

What do I need to do in order to keep the yEd diagram coordinates between certain limits? Is there a way to configure that ?