Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody,
I do have a lisp file which changes the defined width length of a Mtext to 0.0 if I use this.
By using the command "WD" I need to select the Mtext objects and after selecting those, I'll see "Width <0.0>:" in my command bar.
But the width doesn't change to 0.0 but keeps the same as before using the lisp.
I'm using AutoCad 2016, the lisp had worked but not anymore...
Who can help me with this problem?
Thank you
(defun c:WD (/ ss wd) ;; CHANGE WIDTH MTEXT TO 0.0 (vl-load-com) (if (and (setq ss (ssget "_:L" '((0 . "MTEXT,MULTILEADER")))) (setq wd (initget 4) wd (cond ((getdist "\nWidth <0.0>: ")) (0.) ) ) ) (progn (vlax-for x (setq ss (vla-get-activeselectionset (cond (*AcadDoc*) ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object) ) ) ) ) ) ) (vl-catch-all-apply (function vlax-put-property) (list x (cond ((eq (vla-get-objectname x) "AcDbMText") 'Width) ((eq (vla-get-objectname x) "AcDbMLeader") 'TextWidth) ) wd ) ) ) (vla-delete ss) ) ) (princ) )
Solved! Go to Solution.