Efeezy Posted October 11, 2021 Share Posted October 11, 2021 Is there a way to set the text angle to 0? I have tried multiple lisp and I cant get one that will work with our callouts on our blocks. I am using a have a flag note bock. Every time I rotate the block I have to double click and work in the Enhanced Attribute Editor. Does anyone have a fast way to fix this? I would like the text to always be set to angle 0. Quote Link to comment Share on other sites More sharing options...
mhupp Posted October 12, 2021 Share Posted October 12, 2021 (edited) Remake the Block using the following https://www.cad-notes.com/how-to-keep-readable-text-orientation-in-autocad/ Edited October 12, 2021 by mhupp Quote Link to comment Share on other sites More sharing options...
Efeezy Posted October 12, 2021 Author Share Posted October 12, 2021 I work with over 50 engineers and we have add on software. I was just looking for a answer. Quote Link to comment Share on other sites More sharing options...
mhupp Posted October 12, 2021 Share Posted October 12, 2021 41 minutes ago, Efeezy said: I work with over 50 engineers and we have add on software. I was just looking for a answer. Did you look at the link? It will do what you are asking without a lisp. Quote Link to comment Share on other sites More sharing options...
Efeezy Posted October 12, 2021 Author Share Posted October 12, 2021 it didn't work sorry. I found what I was looking for ATTROT2 UDATES ALL BLOCKS TO ZERO TEXT ROTATION (defun C:ATTROT2 ( / obj att att_vla att_ss) (setvar "cmdecho" 0) (command "_.undo" "be") (if (not faopt) (setq faopt "Absolute")) (initget "Absolute Object Specify") (if (/= (setq faoptq (getkword (strcat "\nSpecify rotation [Absolute/Object/Specify] <" faopt ">: "))) nil) (setq faopt faoptq) ) (cond ((= faopt "Absolute") (setq rot 0.0) ) ((= faopt "Specify") (initget (+ 1 2 4)) (setq rot (getint "\nSpecify attribute rotation angle: ")) ) ) (setq ent (entsel "\nSelect block to update attribute rotation: ")) (setq att_ss (ssget "X" (list (cons 0 "INSERT") (cons 2 (cdr (assoc 2 (entget (car ent))))) (cons 66 1)))) (if att_ss (progn (while (/= (ssname att_ss 0) nil) (setq obj (ssname att_ss 0)) (if (= faopt "Object") (setq rot (rtd (vla-get-rotation (vlax-ename->vla-object obj)))) ) (setq att (entnext obj)) (while (and (/= att nil) (/= (cdr (assoc 0 (entget att))) "SEQEND")) (setq att_vla (vlax-ename->vla-object att)) (vla-put-rotation att_vla (dtr rot)) (setq att (entnext att)) ) (setq att_ss (ssdel obj att_ss)) ) ) ) (command "_.undo" "end") (setvar "cmdecho" 1) (princ) ) ;;;Degrees to Radians;;; (defun dtr (ang) (* pi (/ ang 180.0)) ) ;;;Radians to Degrees;;; (defun rtd (ang) (/ (* ang 180.0) pi) ) Quote Link to comment Share on other sites More sharing options...
aridzv Posted October 15, 2021 Share Posted October 15, 2021 (edited) @Efeezy have a look on those 2 LSP: they change the rotation of an attributes in a multiple blocks by selection. CHATTAH is more elaborate and chatht15 is a simpler version. you can see the thread it came from here. hope it will help. CHATTAH.lspchatht15.lsp Edited October 16, 2021 by aridzv Quote Link to comment Share on other sites More sharing options...
Efeezy Posted October 20, 2021 Author Share Posted October 20, 2021 Thank you so much Aridzv I really appreciate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.