Lee Mac Posted September 4, 2011 Posted September 4, 2011 Sorry, but I haven't figured it out yet. I think that it cannot be only done with AutoLisp but Visual Lisp and that I don't know anything Using this reference that I posted earlier, one can see that Oblique Angle is achieved using the "\Q" formatting code, this can also be ascertained by checking the DXF Entity data of an MText Entity that has Obliquing applied. Here is an example for use on non-formatted MText: (defun c:test ( / in ob ss st ) (vl-load-com) (while (and (setq ob (getreal "\nSpecify Oblique Angle: ")) (< 85.0 (abs ob)) ) (princ "\nOblique Angle must be -85 <= x <= 85") ) (if (and ob (setq ss (ssget "_:L" '((0 . "MTEXT") (1 . "~*\\Q*"))))) (repeat (setq in (sslength ss)) (setq st "") (foreach x (entget (ssname ss (setq in (1- in)))) (if (member (car x)'(1 3)) (setq st (strcat st (cdr x)))) ) (vla-put-textstring (vlax-ename->vla-object (ssname ss in)) (strcat "{\\Q" (rtos ob 2) ";" st "}") ) ) ) (princ) ) Quote
giovanni64 Posted September 4, 2011 Author Posted September 4, 2011 Hi Lee Mac, Thank you very much for your code which perfectly works. I'm really embarrassed and very happy at the same time. Now I try to figure out your code to make myself understand how it was accomplished. giovanni64 Quote
Lee Mac Posted September 4, 2011 Posted September 4, 2011 You're very welcome giovanni - there is no need to be embarrassed, we all have to start somewhere If you have any questions about the code I have posted, please do ask 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.