I would start by drawing two columns on a scrap piece of paper. I would record what I type at the command line on the right column and AutoCAD's reply on the left column. This would help me remember each step for writing the Autolisp macro.
As an example, say I drew a line with two points and hit enter to finish the LINE command:
| LINE
-------------------|------------------
Pick first point: | point 1
Pick next point: | point 2
Pick next point: | enter
This allows me to turn this into a macro. I can pause my macro twice and wait for the user to pick a point then end the LINE command my passing a space " " which acts like pressing enter:
(defun c:drawline ( / )
(command "LINE" pause pause " "))
Using this system you can capture the actions you use to draw for most tasks. Happy coding.
No comments:
Post a Comment