amb2301 Posted November 9, 2020 Posted November 9, 2020 Hi Friends, Help required on making the font to readable angles, i have created a block with Annotative, so it always in 0 degree, but now i need it to be in Most readable angle inside the blocks , wherever i insert it in drawing & rotates it. could someone help me to resolve it. attached screenshot & sample drawing of my requirements. sample.dwg Quote
Dana W Posted November 9, 2020 Posted November 9, 2020 (edited) I found this in AutoDesk HELP (F-1) by searching "USE A FIELD TO SHOW ANGLE IN A BLOCK". If you get into trouble, steven-g may come in to help. He is a member here. Good luck Dynamic Block - Display Rotation Bearing 2019-09-16 Accepted Solutions In Forums Byluke_anthony906 View Original Dynamic Block Query - is there a way to create a dynamic degree bearing number that changes when rotating a dynamic block? I know how to use the rotate parameters within a dynamic block but would love it to display the angle when using the block and of course for the number to change as the rotation angle does. luke_anthony906 2019-09-16 It is easiest inside the block editor. Add an attribute to the block and when you get to the 'attribute default'. In the field dialogue select block placeholder and then select the rotation parameter, click OK and exit the block editor. Run attsync choosing the block, and then change the rotation and run regen. steven-g Remember, you must run regen (or SAVE) to get the field to update. Edited November 9, 2020 by Dana W Quote
amb2301 Posted November 9, 2020 Author Posted November 9, 2020 Hi Dana W, Thanks for looking on this Thread, Actually i want the Text inside that Block to be Rotated as per the block angle, i can able to that by applying rotational action inside Dynamic block, but in some angles Text in getting into inverted position, i need that to be kept in Most readable angle, please check the below screenshot. i tried with the above provided solution but it just places the angle of the Block in the place of a text. Could you please help me resolve it. Quote
Lee Mac Posted November 9, 2020 Posted November 9, 2020 (edited) Quickly written: (defun c:fixatt ( / i s ) (if (setq s (ssget "_:L" '((0 . "INSERT") (66 . 1)))) (repeat (setq i (sslength s)) (foreach a (vlax-invoke (vlax-ename->vla-object (ssname s (setq i (1- i)))) 'getattributes) (if (and (vlax-write-enabled-p a) (= :vlax-false (vla-get-invisible a))) (vla-put-rotation a (LM:readable (vla-get-rotation a))) ) ) ) ) (princ) ) ;; Readable - Lee Mac ;; Returns an angle corrected for text readability. (defun LM:readable ( a ) ( (lambda ( a ) (if (and (< (* pi 0.5) a) (<= a (* pi 1.5))) (LM:readable (+ a pi)) a ) ) (rem (+ a pi pi) (+ pi pi)) ) ) (vl-load-com) (princ) Edited November 9, 2020 by Lee Mac 1 Quote
amb2301 Posted November 9, 2020 Author Posted November 9, 2020 1 hour ago, Lee Mac said: Quickly written: (defun c:fixatt ( / i s ) (if (setq s (ssget "_:L" '((0 . "INSERT") (66 . 1)))) (repeat (setq i (sslength s)) (foreach a (vlax-invoke (vlax-ename->vla-object (ssname s (setq i (1- i)))) 'getattributes) (if (and (vlax-write-enabled-p a) (= :vlax-false (vla-get-invisible a))) (vla-put-rotation a (LM:readable (vla-get-rotation a))) ) ) ) ) (princ) ) ;; Readable - Lee Mac ;; Returns an angle corrected for text readability. (defun LM:readable ( a ) ( (lambda ( a ) (if (and (< (* pi 0.5) a) (<= a (* pi 1.5))) (LM:readable (+ a pi)) a ) ) (rem (+ a pi pi) (+ pi pi)) ) ) (vl-load-com) (princ) Thank you so much Sir, i worked like a charm Thank you so much for all the special things you do Sir. Quote
Dana W Posted November 10, 2020 Posted November 10, 2020 23 hours ago, amb2301 said: Hi Dana W, Thanks for looking on this Thread, Actually i want the Text inside that Block to be Rotated as per the block angle, i can able to that by applying rotational action inside Dynamic block, but in some angles Text in getting into inverted position, i need that to be kept in Most readable angle, please check the below screenshot. i tried with the above provided solution but it just places the angle of the Block in the place of a text. Could you please help me resolve it. OK, I thought you needed the "font" (text) to show the angle of the block, since the text attribute already stays at the most readable angle (parallel with the reader) in the block. Quote
Darshan Posted January 22, 2021 Posted January 22, 2021 hi, Thanks for looking on this Thread I looking for different block attribute text width is different I want to make them right (from 0.65 to 0.80) Is there is any way to do that quickly instead of picking one by one Quote
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.