ibach Posted July 17, 2018 Posted July 17, 2018 after using the following lsp dwg units revert to the value from the time the dwg was created even though the -dwgunits was set to new value before. How to avoid that? if dwg was created in inches, changed to cm using -dwgunits it will change back to inches after the frollowing code on autocad 2018 and 2019... here is the code: (defun gc:GetDictEntries (dict / result) (and (= (type dict) 'ENAME) (setq dict (entget dict))) (while (setq dict (vl-member-if (function (lambda (x) (= (car x) 3))) (cdr dict))) (setq result (cons (cons (cdar dict) (cdadr dict)) result)) ) (reverse result) ) ;; delete all AEC* (defun c:removeAEC () (foreach dict (gc:GetDictEntries (namedobjdict)) (if (wcmatch (car dict) "*AEC*") (foreach entry (gc:GetDictEntries (cdr dict)) (entdel (cdr entry)) ) (entdel (cdr dict)) );fin if ) (princ) );fin defun 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.