::Beginning of Sample Code ;;;;If the dimension style exists, set it current; if the dimension style does not exist, insert a drawing that contains the dimension style and set it current. In this example, the inserted drawing file is named dim_template.dwg. (defun c:checkds() (setq ds (getstring "\nEnter dimstyle name to restore: ")) (if (tblsearch "dimstyle" ds) (progn (if (/= (getvar "dimstyle") ds) (command "-dimstyle" "restore" ds) ) );;close progn (progn (command "-insert" "DIM_TEMPLATE" nil) (command "-dimstyle" "restore" ds) );;close progn );;close main if statement );end defun ;;End of Sample Code