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

Can I get all the text in the nodes of a graph exported into any microsoft application?

0 votes
in Help by

1 Answer

0 votes
You can save your diagram as GraphML and open the resulting file in Notepad - all the text will be there. If there is only one label per element in your diagram, you can save as TGF instead of GraphML for less "other stuff" in the file.
by [yWorks] (160k points)
Yes, all the text is there mixed in with a thousand times more irrelevant information.  It would take forever to pull out just the node text.  It's too bad you cant easily copy a list of all the text in each node.  (With all the great stuff this software does, I'm amazed you can't easily extract that information)
From the point of diagramming, text is not more or less important than symbols, sizes, positions, etc.

That said, your comment clearly shows that you have not tried the TGF format. There is very little "other stuff" in there besides the label text.

Finally, GraphML is an XML dialect and thus very well-suited for post-processing. E.g. you could create an XSLT style sheet and extract the text content from GraphML using one of the many available XML processor applications.
Thomas,
First, thanks for your prompt reply.  I appreciate it!  Yes, for some reason I didn't use the TGF format.  That was MUCH MUCH MUCH better, but not perfect for the reasons stated below.  ....  I am using yED for an unusual application (and am a rookie user).  I am modeling a problematic cause and effect situation.  I use about 6 different types of "nodes" in my custom pallette.  Some of my diagrams may have 150 nodes by the time it is done. (which is why I love your 1 click layout)  What I would LOVE to be able to do quickly is extract a list of the text in each type of node, grouped somehow for each node type.  So of the 150 nodes, 20 nodes are hexagon nodes and 15 are squares, 23 triangles, etc.  I'd like to be able to quickly have them sorted in some form of text file so I can bring them into an Excel document so I can do some further manipulation with each type of node text.  I don't want to have to manually sort each node text into its category (Hex, Square, triangle, etc.) Hope that makes sense.  Also, I am a simple person that never heard of XML, TGF, or XSLT.  I would love to do a screenshare with you (GoToMeeting) if that is possible and I can show you how I use it.  If not, this dialog works well too.  Thanks again!! Your software is awesome!!
Well, that is a very specific analysis use case. yEd is not designed with such use cases in mind and hence it is not easy to use yEd for such tasks. From your description, I would guess learning XSLT is your best option. The only other idea I have is exporting each node type on its own. This can be achieved like so:
1. Open the "Current Elements" palette section.
2. In the "Current Elements" section, right-click the node template representing the type of node you want to export and choose "Select Matching Elements".
3. Copy the selected nodes (CTRL+C).
4. Open a new editor tab.
5. Paste the previously selected nodes (CTRL+V).
6. Save the new diagram as TGF.
The resulting file will only contain the information related to one type of nodes.
Thanks!  That is an acceptable workaround.  Wish List: It would be nice to have a "1 button" click that generates a list of all node text organized by node type.  Great software, THANKS!!
Thanks. Your tips solved my problem. Actually, one button is missing to list all the nodes in the diagram.
Legal Disclosure | Privacy Policy
...