Here is a routine that allows the cad user to change to a different dimension style by picking the one he or she desires. The only problem there is a hiccup that I cannot stop. The first is the error message....
Command: dms
Select Dimension To Set That Style Current: DIM
Dim: Restore
Enter a dimension style name, [?] or <select dimension>: MeinArw
Current dimension style: MeinArw
Dim: RESTORE
Enter a dimension style name, [?] or <select dimension>: ; error: bad argument
value: AutoCAD command: #<SUBR @046473c0 QUIT>
The routine is as follows.........
(DEFUN C:DMS()
(setq nt T)
(while nt
(if (Setq ename (car (Entsel "\nSelect Dimension To Set That Style Current: ")))
(if (or (= (cdr (assoc 0 (entget ename))) "DIMENSION")
(= (cdr (assoc 0 (entget ename))) "LEADER"))
(setq nt nil)
(princ "\n**** Not A Dimension or A Leader Try Again.***: ")
);end if
);end if
);end while
(setq elist (entget ename))
(setq D (cdr (Assoc 3 elist)))
(If (/= ename nil) (Command "DIM" "Restore" D ""))
(command exit)
(prompt "\nThe Current Dimstyle is Now; ")(prompt D)
(princ)
);end defun
I am using 2004.......any assistance would be greatly appreciated.
Thanks