How do I count the total number of nodes in an SVG file?

Asked by Jonathan Harford

How do I count the total number of nodes in an SVG file?

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

I'm not aware of an existing tool that displays this information (sum of all nodes) for all objects/paths in a drawing.

What I would do to get a node count (using Inkscape 0.48):
1) make sure that all objects are regular paths (convert shapes, path effects, text objects etc. to path if needed)
2) select all objects ('Ctrl+A' or 'Edit > Select All')
3) switch to the node tool
4) select all nodes ('Ctrl+A' or 'Edit > Select All') -> since the new node tool allows multi-path editing, all nodes in all selected paths are highlighted (selected)

-> the status line tells the total number of selected nodes.

Note: if there are many paths (with lots of nodes) in the drawing, selecting all nodes in the node tool can take a while, the same applies to deselecting them again. Also: don't save the document if you converted objects to path you'd like to keep as shapes, path effects or text objects).

Can you help with this problem?

Provide an answer of your own, or ask Jonathan Harford for more information if necessary.

To post a message you must log in.