(setq saveSet
(atoi(get_tile "saveset"))) ;;;--- See if the user wants to save the settings (setq sStr
(get_tile "layerlist")) ;;;--- Get the selected item from the layer list
(if(/= sStr
"") ;;;--- If the index of the selected item is not "" then something was selected (setq sIndex
(atoi sStr
)) ;;;--- Something is selected, so convert from string to integer (setq layerName
(nth sIndex layerList
)) ;;;--- And get the selected item from the list )
;;;--- Else, nothing is selected
(setq sIndex
-1) ;;;--- Set the index number to -1 (setq layerName
nil) ;;;--- And set the name of the selected item to nil )
)
(setq sStr1
(get_tile "Stylelist")) ;;;--- Get the selected item from the text list (if(/= sStr1
"") ;;;--- If the index of the selected item is not "" then something was selected (setq sIndex1
(atoi sStr1
)) ;;;--- Something is selected, so convert from string to integer (setq StyleName
(nth sIndex1 StyleList
)) ;;;--- And get the selected item from the list )
;;;--- Else, nothing is selected
(setq sIndex1
-1) ;;;--- Set the index number to -1 (setq styleName
nil) ;;;--- And set the name of the selected item to nil )
)
)
;;; ;;;--- Get the selected item from the text list
;;; (setq sStr2(get_tile "LineTypeList"))
;;;
;;;
;;; ;;;--- If the index of the selected item is not "" then something was selected
;;; (if(/= sStr2 "")
;;;
;;; (progn
;;;
;;; ;;;--- Something is selected, so convert from string to integer
;;; (setq sIndex2(atoi sStr2))
;;;
;;; ;;;--- And get the selected item from the list
;;; (setq LineTypeName(nth sIndex LineTypeList))
;;;)
;;; ;;;--- Else, nothing is selected
;;; (progn
;;;
;;; ;;;--- Set the index number to -1
;;; (setq sIndex2 -1)
;;;
;;;
;;; ;;;--- And set the name of the selected item to nil
;;; (setq LineTypeName nil)
;;; )
;;; )
;;; )
;;(if (tblsearch "style")
(setq stylename
"textstyle") (setq LineTypeName
"Celtype") ;;)
;;;--- 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 TEST7 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")) (setq LineTypeList
(list "Continuous" "Dashed" "Dashed2" "Voltage" "ZigZag"))
;;;--- 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
(setvar "Celtype" LineTypeName
) )
)
;;(setvar 'textstyle "stylename")
(setvar "clayer" layerName
) ;;this is not working...................... )
)
;;;--- 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
)