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

Custom data handling problem

0 votes
Hi there,

I'm trying to create a custom import/export feature to my own graph handling university diploma project and I have the following issue:

I export everything with xerces to a test.grapml document. Because I have several node types, I've created a custom data, named NodeType. Everything works well, I can produce the correct format for YED to operate, but when I do anything (specially layouting) in the editor and save the file all of my data from the NodeType key are cleared.

It's very strange, because when I open my exported graph for the first time and select a node, in the properties window I see that NodeType doesn't have any value. Then I modify the layout and add some data to NodeType key, then save and reopen the file, those data are persisted.

Here is an example, my program produce the following xml:

http://pastebin.com/6Mq9keJe

When I open it in YED, do a layouting and save it, it looks like:

http://pastebin.com/UtFUKptu

And when I add some data to the cleared keys and save it:

http://pastebin.com/4RxXe2M6

 

Looks very similiar to me, I can't see the point why doesn't work. Please help me to figure out the solution to this issue.

 

Thank you very much in advance,

Gabirel
in Help by (150 points)

1 Answer

0 votes
 
Best answer

Your original file uses <data id="xxx">...</data>. However, the correct usage would be <data key="xxx">...</data> (note the different attribute). Moreover, all your node data is associated to key d6, which is the key for the node description (i.e. tool tip text), instead of key d4, which is the key for your custom node type.

by [yWorks] (145k points)
selected by
thank you. i've double checked everything, don't know how to miss it. Thanks again.
Legal Disclosure | Privacy Policy
...