;;;--- Dialog Control Language - Part 7
;;;--- Moved this line to the top to force all variables to be local
;;;--- See if the user wants to save the settings
;;;--- Get the selected item from the layer list
;;;--- If the index of the selected item is not "" then something was selected
;;;--- Something is selected, so convert from string to integer
;;;--- And get the selected item from the list
(setq layerName
(nth sIndex layerList
)) )
;;;--- Else, nothing is selected
;;;--- Set the index number to -1
;;;--- And set the name of the selected item to nil
)
)
)
;;;--- Main application
;;;--- Load the dcl file from disk into memory
;;;--- Else, the DCL file was loaded
;;(progn
;;;--- Load the definition inside the DCL file
(alert "The SAMPLE7x definition was not found.") )
)
;;;--- Else, the definition was loaded
(setq layerList
(list "0" "LINE1" "LINE2" "LINE3" "LINE4" "LINE5")) (setq StyleList
(list "L080" "L100" "L120" "L140" "L175" "L200"));;Do I use this list to make the text style current?
;;;--- Add the layer names to the dialog box
;;;--- Add the code here to check for defaults
)
)
;;;--- If an action event occurs, do this function
;;;--- Display the dialog box
;;;--- Unload the dialog box
;;;--- If the cancel button was pressed - display message
(princ "\n \n ...SAMPLE7 Cancelled. \n ") )
;;;--- If the "Okay" button was pressed
;;;--- Save the old layer and reset to new layer
)
)
;;;--- Else draw a polygon
)
)
;;;--- See if we need to save the settings
;;;--- Add code here to save the settings as defaults
)
)
)
)
)
;;;--- Suppress the last echo for a clean exit
)