CAD2005 Posted 6 hours ago Posted 6 hours ago Hi everybody. I found on the web lisp change dimension style. But the lisp part does not have object selection. So I hope those who understand lisp can help me fix it! Sincerely thank you (I do not understand lisp programming) (defun c:CHDM (/ sclst dms dmlst dcl_id wri) (setq dmlst '() obj (vlax-get-acad-object) doc (vla-get-activedocument obj) dms (vla-get-dimstyles doc)) (vlax-for x dms (setq dmlst (cons (vla-get-name x) dmlst))) (setq dcl_id (vl-filename-mktemp nil nil ".dcl") wri (open dcl_id "w")) (foreach x '( "dimsty : dialog" "{label = \"DimStyle List\";" ":list_box {key = \"dmstyle\";" "multiple_select = false; height=10;}" "ok_cancel;" "}" ) (write-line x wri)) (setq wri (close wri)) (< 0 (setq dcl-load (load_dialog dcl_id)) (if (not (new_dialog "dimsty" dcl-load))(exit))) (start_list "dmstyle")(mapcar 'add_list dmlst)(end_list) (action_tile "dmstyle" "(setq sclst (get_tile \"dmstyle\"))") (action_tile "accept" "(done_dialog)(setq clk t)") (action_tile "cancel" "(done_dialog)(setq clk nil)") (start_dialog) (unload_dialog dcl-load) (if clk (if sclst (progn (setq secstl (nth (atoi sclst) dmlst)) (vla-put-activedimstyle doc (vla-item (vla-get-Dimstyles doc) secstl))))) (princ)) 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.