I was trying to write a little extension script that printed the id of
all selected paths in an Inkscape document.
I seem to have hit a snag. I think there may be a bug in inkex.py, or
I am not using it correctly. (The latter is more likely.)
Here is the stack trace I get when I try to run my script:
Traceback (most recent call last):
File "/usr/share/inkscape/extensions/printPathIds.py", line 46, in ?
File "/usr/share/inkscape/extensions/printPathIds.py", line 25, in effect
File "/usr/share/inkscape/extensions/inkex.py", line 139, in getselected
for id in self.options.ids:
AttributeError: 'NoneType' object has no attribute 'ids'
It seems like the error is indicating that there is nothing selected
in Inkscape when the script is run. (I think that is what it means
when it says 'NoneType' object has no attribute 'ids'.) However, I do
have paths selected in Inkscape when I try to run the script.
Do you guys have any suggestions on how I can correct the error?
Thanks for all the help.
P.S. - I have attached a copy of the Inkscape extension script that
generates the error message.
Inkscape wishlist - October 2007
Curr. version 1.45.1 on Kubuntu Dapper Drake.
Please forgive the intrusion, perhaps this will be of use to someone and maybe
it'll spark a thread of ideas.
(Is there a more appropriate place to submit wish-lists?)
I have recently been designing our house using inkscape to do the top-view
plan. I have found it far more flexible than the only other option, Qcad.
While I have enjoyed the use of layers and clones, there are several down-
sides that I thought I'd list in the form of wishes for the future. I am sure
there are ways to do these things, and misconceptions on my part, it's just
the way I came-at the thing.
1. Rotate entire page - the plan is designed square, but the house is seated
at an angle. Nice to be able to see the house angled, but continue to design
2. Clones break when you move them to new layers. If you cut/paste them, or
just shift pgup/pgdown them, all clones become groups.
3. It would be super if "symbols" (original groups that are used as clones)
could be kept in a separate .svg file and referred-to within other svg files.
That way, the symbols don't have to be *in* every file that uses those
4. Measurements: If there were at least a ruler tool that could be measured in
length (at any angle) rather than the width/height of it's bounding square,
it would really help in designing accurately when things don't remain square.
Better yet, a way to get the length of a section of an element - perhaps by
selecting nodes and having it show the lengths in a readout somewhere.
Or, when you draw a line it could show the length along with the other
5. A tool to measure that draws lines with arrow ends and includes a label
which you can control to display units as you need.
For example, I used 10 px = 1 m on my drawing. So I would like to see
measurement lines saying:
<--- 10m --->
That would mean I get to enter a conversion formula somewhere so that it
prints the correct value and unit.
6. A label near the W/H display which auto-calculates the area of a thing; at
least for rectangles and three node shapes. More complex shapes would be
7. A tool whereby you can draw a path and have it calculate the area under it,
with a pull-out label showing the area (again with unit and conversion
7.5 (I just remembered) It would be nifty if a kind of "spreadsheetyness"
could infiltrate Inkscape. For example, I often wanted to add a list of areas
(that I manually calculated and noted as text objects here and there)
together and display a total area in a text object on another layer. If that
could be automated by variables and formula... Just imagine!
8. A way to group objects *across* multiple layers: I wanted to clone my
entire plan which has many layers (one for lights, one for doors, one for
walls, etc.) so that I could rotate it to face North-East. I wanted to be
able to work within the original group and have the clone reflect the changes
in scale, shape and movement I make. But as soon as I group my plan, all the
layers snap to one layer.
9. Node aligning:
1) Align to bottom/top/left/right as opposed to an average align to the
middle of all the nodes selected.
2) Select more than one object and select nodes across them and align.
Great for lining walls up when they are not one path.
10. A way to export the selected item(s) out to an svg file. I find that
copy/paste between Inkscape instances on Kubuntu just plain does not work. So
I end up making "cut.svg" files with one item in it so I can import that to
the next file. Boring really. So being able to pull something out of a busy
file and send it to a file would speed that.
11. Layers: For both lock and visible; a way to on/off all at once, also a way
to affect the "others" - for example: "hide all other layers".
12. Layers: A way to view a particular layer as an outline while the others
show fills etc.
13. Layers: A way to have guides on a per-layer basis. I often wanted guides
for the walls and different guides for sundry things and there are just too
many guides to use properly. I suppose I could draw lines on a layer and snap
to them, but it's not the same as guides.
14. Dialogues: It would be super if one could close a dialogue by hitting ESC.
That's my list. I've prob. forgotten some. Many of these things should not be
an SVG version clash -- they are something Inkscape could do in the
background to make life easier. (Except, perhaps, wish 7.5)
I did more digging into the gcc3 compile failure in nodepath.cpp and I
think I found the source of the problem.
nodepath.cpp includes 2geom/path.h (via live_effects/effect.h via
live_effects/lpeobject.h) which defines the class Path in the
namespace Geom. livarot/livarot-forward.h declares 'class Path',
without a namespace. This seems to cause gcc3 confusion.
Possibly this is the problem mentioned in the comment in nodepath.cpp:
"/// evil evil evil. FIXME: conflict of two different Path classes!"
Has anyone thought about a fix to this before? It seems like a
possible solution would be to add a namespace around the Path class in
livarot or to rename one of the classes, but I'm not sure what the
ripple effect would be. I tried adding "Geom::" or "::" to Path in a
couple places, but it didn't seem to work.
From: staff-gmail <john.staff2222@...400...>
Subject: Re: [Inkscape-devel] Inkscape House plan wish list
As an engineer, I like Inkscape because it is NOT like CAD (I like the
simplicity and free form nature), though I do enjoy some of the newer
features that bring Visio and Sketchup type abilities. However, some
the things you are looking for are possible (see below) and you are
welcome and encouraged to contribute patches for anything else you
like. Some things could be done with the python extension script
> 1. Rotate entire page - the plan is designed square, but the house is
> at an angle. Nice to be able to see the house angled, but continue to
Have you tried selecting all the objects, grouping and then rotating ?
I think what he really wants is to have the entire coordinate system rotated... not just the graphics.
> 3. It would be super if "symbols" (original groups that are used as
> could be kept in a separate .svg file and referred-to within other
> That way, the symbols don't have to be *in* every file that uses
then you start to have file dependency hell. I do keep a separate file
for my favorite symbols/drawn objects which I copy into various
drawings. I want them to be a pure copy so I can modify them any way I
want in that particular drawing.
File dependency is not an entirely bad thing. Being able to modify a graphical widget in one file and have instances of the widget updated in many files can be very useful. It would be a cool option to be able to save dependencies... but I wouldn't want it to be the default.
> 4. Measurements: If there were at least a ruler tool that could be
> length (at any angle) rather than the width/height of it's bounding
> it would really help in designing accurately when things don't remain
> Better yet, a way to get the length of a section of an element -
> selecting nodes and having it show the lengths in a readout
> Or, when you draw a line it could show the length along with the
> usual info.
yes, a ruler tool would be nice, in fact, the whole SVG unit
transformation specifications could use some work - feel free to
contribute some ideas on this.
The Measure Path effect can already do measurement at any angle. What seems to be missing is some code that updates the measurement text when the measured path is modified.
> 7.5 (I just remembered) It would be nifty if a kind of
> could infiltrate Inkscape. For example, I often wanted to add a list
> (that I manually calculated and noted as text objects here and there)
> together and display a total area in a text object on another layer.
> could be automated by variables and formula... Just imagine!
Sounds like a great Inkcape offshoot project... CADscape! I'd certainly give it a go when I needed to do some CAD work if somebody wanted to create it... but I would hate it if Inkscape became too much like other CAD tools.
> 10. A way to export the selected item(s) out to an svg file. I find
> copy/paste between Inkscape instances on Kubuntu just plain does not
> I end up making "cut.svg" files with one item in it so I can import
> the next file. Boring really. So being able to pull something out of
> file and send it to a file would speed that.
Cut and paste between files does work - you just have to open the 2nd
file from within the first file
Sending selected objects to a new file isn't all that difficult or complicated. Select your objects > CTRL/C > CTRL/N > CTRL/V. Presto... all selected objects are now exported to a new document.
Currently in Filter Effects dialog "Link" caption is used for cases
when two values should be changed together. Should we probably switch
to traditional chain icons already used in GIMP, Scribus and other
well known applications?
On 11/10/2007, at 10:22 AM, greg fenton wrote:
> I am using some images from openclipart.
> I am trying to copy two different balloons (clipart/recreation/
> party/balloon-red-aj.svg and balloon-blue-aj.svg) into a single new
> I first copy -red and paste into the new image and all is good.
> When I copy -blue and paste into the new image, it is pasted also
> as red (not blue). Nothing I seem to do will copy the image over
> as blue.
> If I create a second new image and paste just the blue, it copies
> over as blue. If I then copy red and paste, it pastes as blue.
> Any suggestions as to how I can get the copy to happen?
Just a guess...
I had an SVG file where some of the colour were defined using CSS as
a top-level style tag. When they were opened in Inkscape they
displayed fine, but those colour came out wrong when copied to a new
file since I guess the CSS values were not copied across.
I was able to paste it to the other file with correct colours by:
1) Open the file in Inkscape
2) Select the relevant objects and copy
3) Paste them within the same document
4) Copy the newly pasted selection
5) Paste that into the new document
These steps don't work with you balloon example. Your problem looks
similar but with gradients instead of CSS, probably because the
gradients are named the same in different coloured balloon images, so
the pasted blue balloon just references the red balloons gradients in
the pasted version since they are named the same.
I'm not sure if this should be considered a bug or not (multiple
pasted balloons use the same gradients).
CC'ing to the developers list to see what people think about this,
and whether there is any kind of hidden option to get the behaviour
Does anyone has a slightest idea, or even a suggestion, of why we have
these two commands on Windows but not on Linux? What is the
This was recently discussed in this bug:
whose findings can be summarized as follows:
- Linux has the single Print command, it offers a choice between
PS/bitmap printing, and it works (at least the PS printing works, I
didn't test bitmap printing much).
- Windows has "Print" and "Print Direct". The former works but offers
no PS/bitmap switch, and works only as a bitmap. The latter offers the
switch but does not work :)
I think it's high time to do something about this mess.
Inkscape. Draw Freely.
In looking for XSLT scripts that'd be useful for Linux I ran across:
It's a script to use the XML format that is used by Visio, and turns it
into SVG. Seems potentially useful. But, I'm e-mailed the author and
he's not really interested in maintaining it. It seems like he'd
probably be willing to answer questions, but I didn't ask explicitly.
Anyone have Visio and interested?