OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Hypersonic on December 06, 2008, 10:55:38 AM

Title: pause autolisp?
Post by: Hypersonic on December 06, 2008, 10:55:38 AM
is it possible to pause autolisp while a dialog is open?

Thanks, Bob. :)
Title: Re: pause autolisp?
Post by: owenwengerd on December 06, 2008, 11:08:56 AM
What exactly do you mean by "pause AutoLISP"? You can use (dcl_DelayedInvoke) to execute a lisp function after a specified period of time has elapsed, but this doesn't pause AutoCAD in any way.
Title: Re: pause autolisp?
Post by: Hypersonic on December 06, 2008, 11:24:32 AM
I have a routine that is checking for a certain condition on a selection set...

When the proper condition is not met, it calls a dialog box that requests an answer.....

The problem is the autolisp routine does not stop when the dialog pops up, it continues to cycle through the
rest of the selection set.....
Ugh
Title: Re: pause autolisp?
Post by: Kerry on December 06, 2008, 02:40:05 PM
Can you post(attach) a sample dialog and code to show your problem ?

Title: Re: pause autolisp? Here is a sample
Post by: Hypersonic on December 06, 2008, 03:00:58 PM


(foreach ent entlist
(setq entdat (entget ent))

(if (and (not done) (OR (eq "POLYLINE" (cdr (assoc 0 entdat)))  (eq "LWPOLYLINE" (cdr (assoc 0 entdat))) ) )
    (progn
     (plineinfo ent);sets start1 and a bunch of other info......
     ;(command "change" ent "" "p" "c" "1" "")
     (arrowit start1 "ztemp")

     (select_profile_type);This is the routine that calls the dialog.... but it keeps going...

    (notify "in mr and it kept going")
     (addx ent tlist)
     (ssadd (entlast) ssret)
    );end progn
  )


(defun select_profile_type ()

;if open already, close the old and reopen.....
(if (Odcl_Form_IsActive Parametrics_PM_select_profile_type)
  (Odcl_Form_Close Parametrics_PM_select_profile_type)
)

(Odcl_Form_Show Parametrics_PM_select_profile_type)
(set_initial_values_profile_type)
)


);end foreach
Title: Re: pause autolisp?
Post by: owenwengerd on December 06, 2008, 03:03:45 PM
It looks like you are not using OpenDCL, but to do what you want will require a modal dialog, not a modeless one.
Title: Re: pause autolisp?
Post by: Hypersonic on December 06, 2008, 04:44:40 PM
Awesome, I can try that.

Thanks Owen!