Is it possible to pre-define the object properties ID's when creating new paths?
For example, if I want to create many circles, is it possible that new circles be defined as +1 than the one it was copied/duplicated from? Like if the first circle has an ID of "Circle 1" and you copy/paste it, the second circle will automatically be named "Circle 2"?
@inklinea It is not working. The extension pops up on the menu but the object ID's still do not grow incrementally as paths are copied/pasted or duplicated
Hello!
Is it possible to pre-define the object properties ID's when creating new paths?
For example, if I want to create many circles, is it possible that new circles be defined as +1 than the one it was copied/duplicated from? Like if the first circle has an ID of "Circle 1" and you copy/paste it, the second circle will automatically be named "Circle 2"?
Thank you in advance for any help.
It's very easy using an extension, but not a feature which exists in Inkscape Itself.
@inklinea Do you have a link to any tutorials using a free extension? Thanks in advance!
In inkscape, the handling of ellipse shapes sometimes results in an id = ellipse and a label called path. This just bases it off the path.
It finds the last number at the end of the id, then increments it by one.
It just uses the ID of the currently selected object.
It does not check for existing ids which conflict.
You would have to expand on this.
.inx
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Duplicate Increment</name>
<id>org.inkscape.duplicate_increment</id>
<effect>
<object-type>path</object-type>
<effects-menu>
<submenu name="AAA"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">duplicate_increment.py</command>
</script>
</inkscape-extension>
.py
@inklinea I'm so sorry, but I am a newbie with XML editor and Python. What exactly do I do with these scripts? Thank you very much for your time.
save the first one as
duplicate_increment.inx
and the second one as
duplicate_increment.py
and drop them both into your inkscape extensions folder
@inklinea In the AppData\Roaming\inkscape\extensions folder?
Do I create the .inx and .py files in notepad?
Is that it? Do I need to run this extension somehow in Inkscape?
Yes, if you reopen inkscape, it will appear under a menu labelled AAA at the top of the extensions menu.
It requires Inkscape 1.1
@inklinea It is not working. The extension pops up on the menu but the object ID's still do not grow incrementally as paths are copied/pasted or duplicated
Sorry, you have to select an object, then run the extension.
You can assign it to a shortcut key,
If you go into Edit>Preferences>Interface>Keyboard as in the picture, I have assigned it to Shift+Ctrl+I
@inklinea I tried and it does not work. Did it work for you?
Yes, I have tested the code above in Inkscape 1.1 on Linux and Windows 10.
Works for me, but sorry if it doesn't for you.
@inklinea I think i got it to work. thank you!
hmm, I'm not sure perhaps I should have designed it for 1.0 onwards instead of 1.1.