With the examples above, and a few additional lines, you have the code needed to complete the gp:getDialogInput function.
To put gp:getDialogInput together
- Open your copy of gp-io.lsp in a VLISP text editor window.
- Delete the code in gp:getDialogInput (the defun gp:getDialogInput statement and everything after it).
- Enter
the following defun statement
as the first line of code in the gp:getDialogInput function:
(defun gp:getDialogInput (pathWidth / dcl_id objectCreateMethod
plineStyle tilerad tilespace result UserClick
dialogLoaded dialogShow)
The function expects a single argument (pathwidth), and establishes a number of local variables.
- Following
the code you added in step 3, enter the sample code from each of
the following sections:
- Setting Up Dialog Values
- Loading the Dialog File
- Loading a Specific Dialog into Memory
- Initializing the Default Dialog Values
- Assigning Actions to Tiles
NoteEnter just the first code example from Assigning Actions to Tiles not the fragments in the explanations that follow. Those fragments just repeat pieces of the example. - After
the last line of code, add the following:
)
)
Result;
) ;_ end of defun
- Format
the code you entered by choosing Tools
Format Code in Editor from the VLISP menu.