rreicher Posted February 17, 2014 Posted February 17, 2014 I really like line drawn along the measuring pass. I modified DIST command automatically start it Multiple mode. (defun C:SMD () (setvar "ORTHOMODE" 1) (setvar "OSMODE" 0) (setvar "cmdecho" 0) (setq a (getpoint "First point: ")) (COMMAND "DIST" a "m") (princ) ) The only problem is that I cannot preserve ORTHOMODE and OSMODE settings before using this routine. For example, I had OSMODE set to 19 before and I want it back automatically after SMD command. Please advise... Quote
MSasu Posted February 17, 2014 Posted February 17, 2014 Welcome to the Forum, Rreicher! Please edit your post to add the required code tags. As for your request, you will need to store current values into variables and restore them at the end of processing. (defun C:SMD ( / [color=red]oldOrt oldOrt a[/color] ) [color=magenta] (setq oldOrt (getvar "ORTHOMODE"))[/color] (setvar "ORTHOMODE" 1) [color=magenta] (setq oldOrt (getvar "OSMODE"))[/color] (setvar "OSMODE" 0) (setvar "cmdecho" 0) (setq a (getpoint "First point: ")) (COMMAND "DIST" a "m") [color=magenta] (setvar "ORTHOMODE" oldOrt)[/color] [color=magenta] (setvar "OSMODE" oldOrt)[/color] (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.