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?
Solved! Go to Solution.
Solved by Ranjit_Singh2. Go to Solution.
Solved by MMcCall402. Go to Solution.
Before creating attributes set text style to annotative and check the match orientation box
Now when you create an attribute it should stay horizontal
Hi,
Dynamic blocks is the most proper way to do that .
Regards,
Imad Habash
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 -
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
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 -
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
@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))
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.
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.
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 -
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 -
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
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
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.
>> 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 -
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.
Can't find what you're looking for? Ask the community or share your knowledge.