Now that you have seen how the application is supposed to work, you can begin developing it with Visual LISP. But first, it helps to demonstrate what can happen when Visual LISP is waiting for control to return from AutoCAD. You may have already encountered this.
In the Visual LISP window, the mouse pointer appears as a Visual LISP symbol, and you cannot choose any commands or enter text anywhere in the Visual LISP window. The pointer symbol is a reminder that there is an activity you must complete in AutoCAD before resuming work with VLISP. Remember this whenever you see the Visual LISP pointer.
Now you are ready to begin building the garden path application.
;;; Function C:GPath is the main program function and defines the ;;; AutoCAD GPATH command. (defun C:GPath () ;; Ask the user for input: first for path location and ;; direction, then for path parameters. Continue only if you have ;; valid input. (if (gp:getPointInput) ; (if (gp:getDialogInput) (progn ;; At this point, you have valid input from the user. ;; Draw the outline, storing the resulting polyline ;; "pointer" in the variable called PolylineName. (setq PolylineName (gp:drawOutline)) (princ "\nThe gp:drawOutline function returned <") (princ PolylineName) (princ ">") (Alert "Congratulations - your program is complete!") ) (princ "\nFunction cancelled.") ) (princ "\nIncomplete information to draw a boundary.") ) (princ) ; exit quietly ) ;;; Display a message to let the user know the command name. (princ "\nType gpath to draw a garden path.") (princ)