
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm not exactly sure what the term is, but I want to learn how to add the option for user input, similar to many of the standard AutoCAD commands, such as "ZOOM" or "FILLET", that have a default setting with the option to modify the command in the middle.
Example: call the fillet command and you can fillet immediately or press "M" for multiple fillets or "R" to change the radius and continue with the command. I have used the "getkword" function a little bit, but it seems like it behaves differently. How would I go about, for a simple example, adding the option to press "M" to add "MULTIPLE" to this program which just changes the current layer, calls the "POINT" command and pauses for location input and then changes the layer back. I want to have the option to call "vportpoint" and be able to have the option to press "M" for multiple, and maybe "T" or something for "M2P", if that's possible.
(defun c:vportpoint ( / oldlayer) (setq oldlayer (getvar "clayer")) (command "-layer" "set" "_VPORT" "") (command "point" pause) (setvar "clayer" oldlayer) (princ) )
If you have done something like this with a custom lisp command before your help would be much appreciated!
Thank you,
Michael
Solved! Go to Solution.