How Do I add text label for block

Use this forum to ask questions about how to do things in QCAD version 3

Moderator: andrew

How Do I add text label for block

Postby akisal » Mon Aug 20, 2012 7:06 pm

I would like to have label like B1, B2, B3 on my blocks.

Is there better way than adding separate text on top of each block?

Could I use some variable in block to auto count? How?
akisal
Newbie Member
 
Posts: 3
Joined: Thu Feb 02, 2012 12:47 am

Re: How Do I add text label for block

Postby andrew » Tue Aug 21, 2012 10:09 am

No, I cannot think of a better way at the moment.

If you need this functionality a lot if might be worth creating a script for this. A tool that inserts the selected block and adds a text on top of it with a number that increments for every block reference that is created.
User avatar
andrew
Site Admin
 
Posts: 2668
Joined: Fri Mar 30, 2007 6:07 am

Re: How Do I add text label for block

Postby finson » Thu Feb 21, 2013 4:30 am

Similarly, I'd like to be able to have a dummy text item in my standard blocks that can be edited after a reference is added to a drawing. I would imagine this is actually quite common. In my case, for example, I have a standard resistor symbol and I want to add a different value label for each block reference. I can easily imagine people wanting to add name labels to desk blocks, content labels to valve blocks, etc. In every case, it's important that the label exist in every reference and be filled in appropriately.

The problem with adding loose text labels is that they get forgotten, they get left behind when the reference is moved, and so on.

Unfortunately, a text item that is part of a block cannot be selected and edited by itself (I think). The best technique I have come up with so far is to include a dummy text entry "xx" in the library object, then explode the reference after adding it, edit the text, and then reblock it. This is a little cumbersome ...

Are there better ways to do this?

Thanks.
finson
Newbie Member
 
Posts: 4
Joined: Thu Nov 29, 2012 7:20 am

Re: How Do I add text label for block

Postby Clive » Fri Feb 22, 2013 1:23 pm

Hello finson and welcome to the forum.

Unfortunately this option is not available currently, but as you say it is one option that everyone would use!

Fell free to add a feature request:
http://www.qcad.org/bugtracker/

For now this 'workaround' may help, I have used this method many times :wink:

1. Design 'empty' text label - e.g. simple rectangle. Place a very small circle (radius 0.01) or a point in the labels center.

Text label workaround 1.png
Text label workaround 1.png (17.77 KiB) Viewed 2006 times


2. Create a block from this draft.

Text label workaround 2.png
Text label workaround 2.png (12.96 KiB) Viewed 2006 times


3. Place 'Label' blocks into your drawing and select and add your first text.

Text label workaround 3.png
Text label workaround 3.png (9.29 KiB) Viewed 2006 times


4. Continue to place and change the text contents, height and angle as needed 'on the fly' as it were.


Text label workaround 4.png
Text label workaround 4.png (20.36 KiB) Viewed 2006 times

Hope this helps :wink:
User avatar
Clive
Moderator
 
Posts: 955
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: How Do I add text label for block

Postby finson » Fri Feb 22, 2013 8:22 pm

Thanks Clive. If I add the box&dot to the original library drawing, then at least it will be obvious when a label text has been left behind or not entered for any particular reference.

It's interesting to think about how to phrase this as a feature. I think the basic feature is: attach an editable item definition to a block definition, and then create a new instance of that item type whenever a reference is placed. There are lots of little nuances that could be issues, I suppose. For example, when the reference is selected, the attached item should be selected too, but when the item is selected for editing it must be selected alone. Will we need a command "expand selection to include parent reference" or something? Ugh.

Anyway, I'll try to think of a way to state the feature request without assuming too much about the design and see where I get to. Of course, if I were to get really ambitious I could try to implement it myself and see what happens, but that may be a little down the road.

In the meantime, box&dot!

Thanks.

Doug
finson
Newbie Member
 
Posts: 4
Joined: Thu Nov 29, 2012 7:20 am


Return to QCAD 3 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron