Macro function within inkscape

Flesh out your ideas for new or improved Inkscape features before submitting a request.
pvbrowser

Macro function within inkscape

Postby pvbrowser » Tue Apr 08, 2008 6:00 pm

Macros within inkscape

I would like to have a macro function within inkscape.

Background:

We use inkscape to draw graphics for our HMI/SCADA masks from http://pvbrowser.org
These graphics are then animated by the server.
The graphic is modified to reflect the measured values from an automated plant or from user inputs.
We can move/rotate/scale objects and we can modify the attributes of objects and hide/show objects.

For this we give the objects a meaningfull name for adressing the objects from our programming interface.
If we want to move/rotate/scale an object we use a transformation matrix.
Initially this transformation matrix is the identity matrix.

The problem is now that inkscape will also insert a transformation if a grouped object is moved within inkscape.
This is in conflict with our identity transformation matrix.
To solve the problem we ungroup the object and group it again.
Thus getting rid of the transformation from inkscape.
Then we open the XML editor within inkscape and add our identity matrix to the object.
This is done with the keyboard sequence
Shift-Ctrl+G # ungroup
Ctrl+G # group
Shift-Ctrl+X # open XML editor

This sequence is needed repeatedly for each animated object.
Thus we could make use of a macro function if it were available.
I think also other tasks could profit from such a macro function.

Could you implement such a macro function within inkscape in the future ?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Macro function within inkscape

Postby prkos » Tue Apr 08, 2008 10:01 pm

We also use Inkscape in HMI/SCADA, Im glad to see others do it too :)

Im not exactly sure about the macro option but you can probably write a python script that does what you want and use it as an extension.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download


Return to “Inkscape Ideas”