Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

How do I update a graphml in python using networkx while keeping the layout from yEd?

0 votes

I'm using python networkx to create graphs as GraphML-files from JSON-files and visualizing them in yEd. It's within the field of network topology and I'm monitoring connections.

yEd's automatic layout tools are very good for what I want to do. However, there is a problem when I try to update a graphml-file. The JSON-data is updating continuously and I want to be able to update my Graphml-files with that data while keeping the layout I've arranged in yEd.

Updating the files with new nodes isn't a problem but all nodes lose their coordinates when I do so. I can't think of any convenient ways to keep the yEd-specifica metadata containing the position of each existing node.

Any suggestions?

in Help by

1 Answer

0 votes

I am afraid there is no feasible way to do what you want to do with yEd.

You could realize your use case with a custom application based on yFiles, the library upon which yEd is built as well. Since yFiles is a commercial product, this makes sense for a commercial project only.

by [yWorks] (144k points)
I see, thank you fore the answer. Is there any documentation on the yEd specific graphML-schema I could refer to when trying to write a xml parser to solve this? Or is it actually impossible to add new information from outside the yEd app?

Re.:

Is there any documentation on the yEd specific graphML-schema I could refer to when trying to write a xml parser to solve this?

Unfortunately, no. You need to reverse engineer yEd's GraphML format on your own.

Re.:

Or is it actually impossible to add new information from outside the yEd app?

No, it is not impossible to do so. However, yEd's GraphML format uses many complex extensions (most notably nodegraphics and edgegraphics) making this a time-consuming and involved task.

Legal Disclosure | Privacy Policy
...