guitarguy1685 Posted January 4, 2019 Posted January 4, 2019 I want to create a lisp that will toggle this property of individual dimensions. I looked through the DXF codes on the autodesk website and I also went through the VLA-OBJECT properties but I can't find it. Quote
guitarguy1685 Posted January 4, 2019 Author Posted January 4, 2019 wow lol. Where would I even find that info? Thanks man! Quote
guitarguy1685 Posted January 4, 2019 Author Posted January 4, 2019 Never mind. I guess I totally missed it in the list. I went over it several times too lol. Thanks again. Quote
ronjonp Posted January 4, 2019 Posted January 4, 2019 (edited) 9 minutes ago, guitarguy1685 said: Never mind. I guess I totally missed it in the list. I went over it several times too lol. Thanks again. Glad to help .. I used the VLIDE to find it: VLA-PUT-TEXT then CNTRL+SHIFT+A or CNTRL+SHIFT+SPACE Edited January 4, 2019 by ronjonp 1 1 Quote
guitarguy1685 Posted January 4, 2019 Author Posted January 4, 2019 well that's a nice little trick. I learned more than I anticipated. Quote
Lee Mac Posted January 4, 2019 Posted January 4, 2019 This is one particular task where the individual ActiveX properties accessible through Visual LISP are a huge advantage... Consider the following toggle implemented in Visual LISP: (defun c:txtin-visual ( / i o s ) (if (setq s (ssget "_:L" '((0 . "*DIMENSION")))) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (vlax-put o 'textinside (~ (vlax-get o 'textinside))) ) ) (princ) ) (vl-load-com) (princ) Compared with the corresponding Vanilla AutoLISP solution: (defun c:txtin-vanilla ( / a b e i s x ) (if (setq s (ssget "_:L" '((0 . "*DIMENSION")))) (progn (regapp "ACAD") (repeat (setq i (sslength s)) (setq i (1- i) e (ssname s i) ) (cond ( (not (and (setq x (cdadr (assoc -3 (entget e '("ACAD"))))) (setq a (cdr (member '(1000 . "DSTYLE") x))) ) ) (setq x (append x '( (1000 . "DSTYLE") (1002 . "{") (1070 . 174) (1070 . 001) (1002 . "}") ) ) ) ) ( (not (setq b (cdr (member '(1070 . 174) a)))) (setq x (append (reverse (member '(1000 . "DSTYLE") (reverse x))) '( (1002 . "{") (1070 . 174) (1070 . 001) ) (cdr a) ) ) ) ( (setq x (append (reverse (member '(1000 . "DSTYLE") (reverse x))) (reverse (member '(1070 . 174) (reverse a))) (cons (cons 1070 (- 1 (cdr (assoc 1070 b)))) (cdr b)) ) ) ) ) (entmod (append (entget e) (list (list -3 (cons "ACAD" x))))) ) ) ) (princ) ) 2 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.