OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: jambanks on August 27, 2009, 09:04:54 AM

Title: Close then open form
Post by: jambanks on August 27, 2009, 09:04:54 AM
I am trying to allow the user to close the dialog pick a point the the dialog reopen. but am having trouble getting the form to show again.

(defun c:1_OnClicked (/)
    (progn
      (dcl_Form_Close SarensOutriggerCoOrdinates_SaOutrigger)
      (setq insertpoint (getpoint "\npick Known Northing/Easting Point: "))
      (dcl_Form_Show SarensOutriggerCoOrdinates_SaOutrigger)
          )
  )

Any suggestions?
Title: Re: Close then open form
Post by: owenwengerd on August 27, 2009, 10:01:15 AM
You need to call Form_Close from your OnClicked handler, then immediately return.  Your code that calls Form_Show to intially show the form should handle the point pick and re-opening the dialog after the initial Form_Show returns.  There are samples of this in the help file and here in the forums, but I don't have a ready link.
Title: Re: Close then open form
Post by: Fred Tomke on August 27, 2009, 11:11:44 AM
Hi,

it took me a while until I've found but finally I got it. You can find here a codesnippet (http://www.opendcl.com/forum/index.php?topic=557.msg2519#msg2519). It's part of the German help (http://www.opendcl.com/HelpFiles/index.php?lang=DEU&page=Concepts/Development.htm).

HTH, Fred