the code section is as follows: ?
/
(if (= (command ".plot") ("cancel")) ---?
(quit)) \
(else ?
(setq dcl_id (load_dialog "bill.dcl"))
(if (not (new_dialog "bill" dcl_id)) (exit))
(set_tile "oh_yes" "yes")
(set_tile "oh_no" "no")
(action_tile "oh_yes" "(setq ANS 1)(done_dialog)")
(action_tile "oh_no" "(setq ANS 2)(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(if (= ANS 1)
(setq ANS2 (strcat "Yes")))
(if (= ANS 2)
(setq ANS2 (strcat "No")))
(setvar "filedia" 1)
(setq lspdir "c:\\r13\\lsp\\") ;; set to directory of default txt file
(setq txtfile (strcat lspdir "pltlog.txt")) ;;default txt file
(setq filenm (open "K:\\Plotlog\\pltlog.txt" "a"))
(setq txt (strcat DPATH " " DNAME " " date-string " " NAME " "
PLT " " ANS2))
(write-line txt filenm)
(close filenm))
Firstly, you will probably need to run a while loop, in case the user needs
to pick a window for plotting.
You can determine if the plot was cancelled with the DIASTAT variable.
(initdia)
(command "._PLOT")
(while (eq 1 (logand 1 (getvar "CMDACTIVE")))
(command PAUSE)
) ;_ WHILE
(if (zerop (getvar "DIASTAT"))
(prompt "\nPlot cancelled.")
(RUN_MY_FUNCTION)
) ;_ if
--
Stephen Tate
Stephen Tate CAD, UK
Anti-SPAM - For E-mail please use:
stephe...@stcad.co.uk
Nick Long wrote in message <365C9095...@architects-ca.com>...