change dimstyle

robinpharoah

Usenet Archive
Joined
Jul 10, 2003
Messages
3
Reaction score
0
   Hi. I am looking for lisps that will enable me to change my dimstyle with keystrokes. For example, I have styles named "1 DECIMAL", 2 DECIMAL, etc.    I have searched this group and have found a useful lisp that lets you pick a dimension to make it's style current. But I would also like to punch in, say, "D2"(enter) for style "2 DECIMAL". (R2002)    Any help would be appreciated.       Thankyou, Robin
 
(defun c:d2
(command "_-dimstyle" "_r" "2 decimal")
(princ)
)

robinpharoah a écrit :
 
Robin,

Try this:

 

(defun c:d1(ezdimstyle "1 decimal"))
(defun c:d2(ezdimstyle "2 decimal"))

 

(defun ezdimstyle(   ;set a specified dimstyle current     dsname  ;name of the dimstyle     /   ;end of formal arguments     cmdecho     )   ;end of local variable list   (if (tblsearch "dimstyle" dsname)     (progn       (setq cmdecho (getvar "cmdecho"))       (setvar "cmdecho" 0)       (command "._dimstyle" "r" dsname)       (setvar "cmdecho" cmdecho)       )     (princ (strcat "\Unknown dimstyle name: " dsname))     )   (princ)
  )

Mike Weaver

 

"robinpharoah" <> wrote:

   Hi. I am looking for lisps that will enable me to change my dimstyle with keystrokes. For example, I have styles named "1 DECIMAL", 2 DECIMAL, etc.    I have searched this group and have found a useful lisp that lets you pick a dimension to make it's style current. But I would also like to punch in, say, "D2"(enter) for style "2 DECIMAL". (R2002)    Any help would be appreciated.       Thankyou, Robin
 
  Michel.It works great.I added (GRAPHSCR) to the end to close the text window also.                Thankyou, Robin.
 
    Thankyou Mike. This works great also, and the text screen doesn't seem to pop up and down, either.               Robin.
 

Latest threads

Back
Top