re-useable objects/abstractions

Post questions on how to use or achieve an effect in Inkscape.
jferguson
Posts: 2
Joined: Sun Feb 27, 2011 7:23 am

re-useable objects/abstractions

Postby jferguson » Sun Feb 27, 2011 7:39 am

I'm wondering if inkscape supports a notion of "objects".

As an example, if I were to create an object named "face", and it was a group that defined the image of a smiley face, I would be able to place multiple instances of this "face" object. If from there, I decided that I wanted all "face" objects to be a sad face, I could edit one of the objects, and have them all change.

In a nutshell, this is similar to inheritance. Is this possible with either vanilla inkscape or by use of an extension?

If this functionality doesn't exist, would it be feasible to create it as an extension using something like python? I'd be willing to do the research necessary to create this functionality, but I just want to make sure that it doesn't already exist.

Thanks!

For those who are wondering, I'm looking into modifying inkscape so that it can be used as an SVG electronics schematic editor, and I'd need such a function to make it easy to create and modify parts. I've tried converting PS output from other programs into SVG, but it always seems to distort the drawing (line widths are not preserved, drawing artifacts get introduced). Using inkscape in this way would be purely for presentation purposes, I don't really need electrical rule checks, or anything like that. Just the ability to drop objects on a grid, and connect them up.

Does SVG even support a notion of defining a single template object, and then creating instances of those without reproducing the entire definition of the object?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: re-useable objects/abstractions

Postby brynn » Sun Feb 27, 2011 12:53 pm

Hi jferguson,
Welcome to InkscapeForum! Image

Is this possible with either vanilla inkscape or by use of an extension?

"vanilla Inkscape"??

I probably can't answer your entire question, especially about "electronics schematic editor". But it sounds like you might be looking for cloning? You can clone a group, and you can name a group using Object Properties. And whenever you make a change to the original, the change happens automatically to its clones.

Does SVG even support a notion of defining a single template object, and then creating instances of those without reproducing the entire definition of the object?

I don't know what you mean by "creating instances of those without reproducing the entire definition of the object". But someone else probably does, so hang in there :mrgreen: Meanwhile, you can experiment with cloning, to find out if that's what you want.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: re-useable objects/abstractions

Postby ~suv » Mon Feb 28, 2011 7:59 pm

See also: Inkscape Manual » Editing Basics » Clones

jferguson
Posts: 2
Joined: Sun Feb 27, 2011 7:23 am

Re: re-useable objects/abstractions

Postby jferguson » Tue Mar 01, 2011 1:52 pm

AWESOME!

I've been exposed to different terminology to denote the same concept, so I'm glad you guys were able to point me in the right direction :)


Return to “Help with using Inkscape”