Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how do I rotate a block where the attributes are always readable

28 REPLIES 28
SOLVED
Reply
Message 1 of 29
Anonymous
10978 Views, 28 Replies

how do I rotate a block where the attributes are always readable

I have blocks with attributes (lighting instruments).  There is a front and a back to the block with attributes on both.  When I created the block I made the attributes read correctly with the front of the block pointing up.  When I place the blocks on drawings they may be placed pointing up but also pointing at an angle or pointing down.  Unfortunately the attributes, when the block is rotated, will always rotate with the block but not adjust to the correct angle for reading.  For example when the block is rotated from pointing to pointing down, the attributes are upside down.  Is there a way to have the attributes rotate correctly when the block is rotated?  If not, is there a way to correct the rotation of the attributes.  When I use Enhanced Attribute Editor, I can correct the attributes one attribute and one block at a time but the attributes are not where they were placed when the block was pointing up.  The relationship of attribute location to block is changed.  Anyone have any ideas?

28 REPLIES 28
Message 2 of 29
Ranjit_Singh2
in reply to: Anonymous

Before creating attributes set text style to annotative and check the match orientation boxText_Style.jpg

Now when you create an attribute it should stay horizontalatt_horiz.gif

Message 3 of 29
Anonymous
in reply to: Ranjit_Singh2

Is there anyway to correct all the blocks I have already built?
Message 4 of 29
imadHabash
in reply to: Anonymous

Hi,

 

Dynamic blocks is the most proper way to do that .

 

Regards,

Imad Habash

EESignature

Message 5 of 29
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> Is there anyway to correct all the blocks I have already built?

You only have to edit the block-definition to make the attribute(s) to match the settings. Once done that you can run command _ATTSYNC and all block-insertions for that one definition (this block-name) are updated.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 6 of 29
Anonymous
in reply to: Alfred.NESWADBA

If I go into INSERT then BLOCK DEFINITION, I only see SET BASE POINT and SYNCHRONIZE options.  I don't see how I can match the text orientation to layout.  Is there a way to do this without rebuilding all my blocks?  I also don't see that option in MANAGE ATTRIBUTES.  I went to HOME, Annotation, and Text style and set it to annotative and match the text orientation to layout and then set that as Current but nothing has changed on my drawing.  I also selected a block went to BLOCK ATTRIBUTE MANAGER, selected an attribute and edited it to be Annotative but again nothing has changed.  Any ideas.  I have a lot of blocks already made and I hate to have to remake them again.  Thank you

Message 7 of 29
pendean
in reply to: Anonymous

Your blocks/attributes have to be set this way ahead of use.

For after-the-fact customization to deal with the problem consider posting in the LISP forum here and asking for coding help https://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1
Message 8 of 29
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> I went to HOME, Annotation, and Text style and set it to annotative and match the

>> text orientation to layout and then set that as Current but nothing has changed

>> on my drawing

Please show us a drawing where you did the steps you described (just a few block-insertions of one type) so we can look into it and (hopefully) find what was missing.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 9 of 29
Anonymous
in reply to: Alfred.NESWADBA

Hello,

    Here are two light blocks facing up and down with no change in the attribute rotation.  I did the HOME, ANNOTATION and TEXT STYLE and set it to annotative and match the text orientation to layout to the two I rotated down.  As you can see no change in the text.  I did this after the blocks had been created.  I am being led to believe I have to create the blocks again and do those steps first.  I have a lot of blocks, please let me know if there is a way to fix this.  Thank You

Message 10 of 29
Ranjit_Singh2
in reply to: Anonymous


@Anonymous wrote:
Is there anyway to correct all the blocks I have already built?

Not that I know of. You have to manipulate each individual block. See if this lisp helps. It does mess up the text positions though.

(defun c:somefunc  (/ ent etdata rot)
 (mapcar '(lambda (x)
           (setq ent x
                 rot (cdr (assoc 50 (entget ent))))
           (and (and (> rot (* pi 0.5)) (<= rot (* pi 1.5)))
                (while (/= "SEQEND" (cdr (assoc 0 (setq etdata (entget (setq ent (entnext ent)))))))
                 (and (= "ATTRIB" (cdr (assoc 0 etdata)))
                      (entmod (subst (cons 50 (+ pi (cdr (assoc 50 etdata)))) (assoc 50 etdata) etdata))))))
         (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget '((0 . "insert") (66 . 1)))))))
(princ))

flip_attribs.gif

 

Message 11 of 29
MMcCall402
in reply to: Anonymous

I have a weird solution for this.

 

Take an autocad dimension, strip away the lines and you have a text-like object that will auto-flip when you try to rotate it upside down.  Text Override this dimension value with a field to get the value of an attribute. Do this for each of the attributes that should be visible and then make the attributes invisible. Next add a rotation parameter and action to rotate the linework for the light and these dimension texts.  Save the block and run an attribute sync.  Rotate these blocks with the rotation grip only, never the block itself.

 

For blank values use a space instead of leaving it blank of the dim will show "----" instead of nothing.

 

 

I edited it into the two blocks in the posted dwg. (see attachment)  It took about 2-3 minutes each once I figured out what to do.

 

 

Its sad that this programming is in the code of the software but only applied to dimensions.

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 12 of 29

It just occurred to me (after reading post 5, thanks @Alfred.NESWADBA) that you could edit the block definition to change text justification on all attributes to middle center. Now call attsync and synchronize all attributes. Then call the lisp routine and it may fix the slight shifting problem! I am not on AutoCAD right now so cannot test. But will give it a try later. Hopefully it works.

Message 13 of 29
Anonymous
in reply to: Ranjit_Singh2

Hi,     I am unfortunately brand new to Autocad, self taught, and have no idea what your solution is or how to apply it.  It is important that the positioning relationship of the text to the block does not stay the same then the solution wouldn't work for me.  There are a lot of these blocks on a drawing, sometimes very close together so to avoid confusion and congestion the text has to stay close to the block.  It sounds like the best solution would be to redraw all the blocks again.  Thanks
Message 14 of 29
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> It is important that the positioning relationship of the text to

>> the block does not stay the same

Do I understand that correct? The position of an attribute within the block should not be constant? What rules should the position of the attribute within the block then follow?

 

Can you please show a drawing with one of your blocks, on time the block is rotated by 0° and then another rotated by 45° ... then create text objects (not attributes, to make the sketch more simple), so we can see how you expect the textual information behave while you rotate your block.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 15 of 29
Anonymous
in reply to: Alfred.NESWADBA

Hi Alfred,    Attached are 4 views of same instrument with how text should follow.  To save a little time I did not actually make these into blocks. The text always has to be read, if possible, from straight on so as not to have to turn the drawing to read it.  Please let me know if there is any more info I can send.  Thanks again - Mike
Message 16 of 29
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> Attached are 4 views

Sorry, nothing attached here (please don't use email for replying here if you want to add attachments, use the "reply" in the internet browser).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 17 of 29
Anonymous
in reply to: Alfred.NESWADBA

Hi,

   Sorry about that.  Attached, hopefully now, are the 4 views of one light.   Let me know if you need anything else.  Thank You - Mike

Message 18 of 29
Anonymous
in reply to: Anonymous

Hi,

   I made a new block with attributes and selected annotative and match orientation box text styles but the text, although oriented the right way, is still messed up. I have attached it.  I tried your text manipulation technique but couldn't figure out how to make it work.  I although tried to rearrange the text in refedit but it did nothing.  Any ideas? - Mike

Message 19 of 29
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> are the 4 views of one light

That can't work, sorry. As far as I understand your need you want to have a constant dist between geometry and the text-bounding box, and therefor I don't find any tool built in into AutoCAD.

 

The reason is you have to define one point of the attribute to be the rotation base point.

Looking just to your first text "L132" neither using the lower-left point of the text nor using mid-center would give you the result you have shown.

 

This image shows in red the 2 options I see you would have, in black your text position from your drawing.

 

 

20171203_113608.png

 

>> I made a new block with attributes and selected annotative and match

>> orientation box text styles but the text, although oriented the right way,

>> is still messed up

Great to know that you have got the attributes stay horizontally from our suggestions, but the reason for "still messed up" is the same as described above..

 

I guess without development of a tool it's not possible (and even this tool can be tricky).

 

Sorry, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 20 of 29
MMcCall402
in reply to: Anonymous

Try out the blocks in the attached drawing.  I got a better understanding after seeing the second example file.

 

The blocks use a couple dynamic features. One is a point parameter with a move action the other is a rotation parameter with a rotation action. The move actions for the point parameters move the attributes.  The rotation action rotates all the line work and the point parameters, but not the attributes themselves. The actions of the point parameters are chained to the rotation action so the rotation action will rotate the position of the attributes without rotating their direction.  Where two attributes are stacked only one point parameter and move action are required at a mid-point between the two.  I left the grips for the point/moves if you needed to fine tune their position in a crowded area.

 

 

Its not a matter of rebuilding your current blocks, just few additions to make them a little smarter.

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report