Message 1 of 4

Not applicable
07-25-2017
02:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
the code I made is to creat a new dimension style if not exist, then change all existing dimension to this new style. Not sure which part has problem and don`t know how Vlide works.
; dimension style and texts to be ARIAL (defun c:adim () ;CHECK IF "NEUF-ARIAL-ANNO" EXIT (setq new_dim "NEUF-ARIAL-ANNO") (if (tblsearch "DImstyle" new_dim ) (command "_dimstyle" "_R" new_dim) (command "_.dim" "_DIMADEC" "0";; Angular decimal places "_DIMALT" "Off";; Alternate units selected "_save" new_dim ;; to save dimstyle and become current "_exit");; to exit the command );; if (if (setq ss (ssget "_X" (0 . "DIMENSION"))) (setq n 0) (repeat (sslength ss) (setq en (ssname ss n)) (setq endata (entget en)) (setq entype (cdr (assoc 3 endata))) (if (not (= entype "ARIAL")) (sub_dim_style) );if (setq n (1+ n)) ); end repeat (prin1) ); if ); defun (defun sub_dim_style() (setq old_3_list (assoc 3 endata)) (setq new_3_list (cons 3 new_dim)) (setq endata (subst new_3_list old_3_list endata)) (entmod endata) ) (prompt "change dimension style") (prin1)
Solved! Go to Solution.