0

I have drawn multiple polygons (with Bezier curve tool) over an image using Inkscape, and I want to extract the area of each polygon in px^2 to a text file (txt, csv). On Inkscape I can only use the Measure Path tool and add the calculated area to the canvas as a path, and then type it to text, which is very repetitive (and very susceptible to typing errors).

Does anyone know a way to export text paths as text in Inkscape? Or to calculate these areas in another software?

0

1 Answer 1

0

There's no way to do this fully automatically in Inkscape as far as I know. When you save a document in Inkscape, it saves an SVG which is in a plain text format - a kind of XML, however you'd need to look through lines of code containing lots of numbers, to find the text you want, which isn't exactly practical.

However, there's no need to retype anything. You could simply copy and paste the text generated by the Measure Path extension.

I assume you've selected all the objects, and have already run the extension, then do the following . . .

  1. In Inkscape select the Text Tool T and triple click in one of the text boxes containing the measurement. This will select all the text inside it.

  2. Press Ctrl+C to copy it.

  3. In your text software or spreadsheet software (such as Notepad/Excel or similar), click to insert some text, then press Ctrl+V to paste.

Repeat for each text box.

1
  • Thanks for the answer. Actually copy-paste is better than retyping, but I'm dealing with a lot of polygons, I just got to parse the XML and extracted the values I needed. Thanks again for the ideas!
    – haperes
    Commented Aug 12 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.