Inserting a sequence of numbers as text

Post questions on how to use or achieve an effect in Inkscape.
Spudz777

Inserting a sequence of numbers as text

Postby Spudz777 » Wed May 28, 2008 2:39 am

I have a multi-layer drawing, and I need to number the objects in a particular layer, with the numbers residing in a different layer than the objects. The order of the numbering is not important as long as I can edit the numbers later by hand (for a few special cases). The only way I've found to do this is by creating text boxes with numbers in them (by hand), then aligning those text boxes with the objects to be numbered (again, by hand). Considering the fact that there are over 500 objects to be numbered, it seems a little impractical to do the whole thing by hand. Is there a practical way to automate this? Thanks!

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Inserting a sequence of numbers as text

Postby microUgly » Wed May 28, 2008 9:20 am

I don't believe there is a practical way built into Inkscape.

Inkscape does have alignment functions that may make positioning the numbers, relative to the object, quick and easy.

Spudz777

Re: Inserting a sequence of numbers as text

Postby Spudz777 » Wed May 28, 2008 3:36 pm

Hmm. I knew about the alignment tools, but was hoping for an easy way to batch create and align. Oh well, I guess it's time to just start mindlessly typing and clicking. Thanks for the reply!

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Inserting a sequence of numbers as text

Postby kelan » Thu May 29, 2008 1:41 am

Spudz777 wrote:Hmm. I knew about the alignment tools, but was hoping for an easy way to batch create and align. Oh well, I guess it's time to just start mindlessly typing and clicking. Thanks for the reply!


I created a Python extension that can help you out. It adds a new option under the Effects > Visualize menu called Number Objects. It just numbers all the objects you have selected. There are a couple options for formatting the number labels: start counting at a certain number, font size, and which corner of a given object should the label appear next to. All of the labels are put into one group, so you can easily move them to any layer you want.

If you send me a PM with your email address, I can send it to you. Maybe it can save you some time.


Return to “Help with using Inkscape”