I am tyring to write a command that will ask for a point on a drawing and allow the user to either pick a point and the lisp continues or to hit a key to enter an options subroutine. (setq SP (getpoint "\nSpecify first corner: or enter <s> to change settings ")) (----something here i presume------) (setq EP (getcorner SP "\nSpecify opposite corner: ")) (command ".MTEXT" SP "H" TH EP) Could anyone point me in the right direction?
Look into initget with a list of keywords before the getpoint. Then make the subsequent code contingent on the user's response (point or keyword), using a cond or if construction.
Yah, what Tom said.. Here's an example from a program I modified to allow just such an option. FYI, The "Equal" in the example is not the function equal. It is my keyword to let the user pick "Equal" spacing of the array the program will be doing.. (setq sset (ssget)) (setq pt1 (getpoint "\nPick starting point of ARRAY: ")) (setq pt2 (getpoint pt1 "\nPick end point of ARRAY: ")) (initget "Equal" 128) (setq spacing (getdist "\nPick or enter spacing or [Equal]: ")) (if (equal spacing "Equal");TEST EXPRESSION (progn (setq howmany (getint "\nEnter number of SPACES between start and endpoints of array: ")) (setq spacing (/ (distance pt1 pt2) howmany)));THEN );END OF IF