- (defun GetCurrentSpace (Doc / BlkCol SpaceList CurSpace ActSpace temp1)
- ; Returns the "block object" for the active space
- ; Thanks to Jeff Mishler
- (if (= (getvar "cvport") 1)
- (vla-get-PaperSpace Doc)
- (vla-get-ModelSpace Doc)
- )
- )
- (defun SingleSelect (Listof Message Toggle / DiaLoad tmpStr tmpTog tmpList)
- (setq DiaLoad (load_dialog "MyDialogs.dcl"))
- (if (new_dialog "SingleSelect" DiaLOad)
- (progn
- (start_list "listbox" 3)
- (mapcar 'add_list Listof)
- (end_list)
- (if Message
- (set_tile "text1" Message)
- )
- (if (not Toggle)
- (mode_tile "toggle1" 1)
- )
- (action_tile "listbox"
- "(if (= $reason 4)
- (progn
- (setq tmpStr (get_tile \"listbox\"))
- (if Toggle
- (setq tmpTog (get_tile \"toggle1\"))
- )
- (done_dialog 1)
- )
- )"
- )
- (action_tile "accept"
- "(progn
- (setq tmpStr (get_tile \"listbox\"))
- (if Toggle
- (setq tmpTog (get_tile \"toggle1\"))
- )
- (done_dialog 1)
- )"
- )
- (action_tile "cancel" "(done_dialog 0)")
- (if (= (start_dialog) 1)
- (progn
- (setq tmpList (read (strcat "(" tmpStr ")")))
- (if (= tmpTog "1")
- (cons T tmpList)
- tmpList
- )
- )
- )
- )
- )
- )
|