Close then open form

Started by jambanks, August 27, 2009, 09:04:54 AM

Previous topic - Next topic

jambanks

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?

owenwengerd

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.

Fred Tomke

Hi,

it took me a while until I've found but finally I got it. You can find here a codesnippet. It's part of the German help.

HTH, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]