Author Topic: How to close this Modeless Form  (Read 313 times)

RGUS

  • Member
  • *
  • Posts: 34
How to close this Modeless Form
« on: February 20, 2020, 02:54:48 PM »
Hi Guys,
I have no hair left after fighting with this issue for a couple of days.

I have a DCL dialogue box that calls an OpenDCL modeless dialogue box to display steel section dimensions.
Modeless, because I want it open while I draw the necessary information from the figured dimensions that will be shown in the modeless dialogue box.
When I',m finished drawing I want to close the Modeless form... but I can't, it won't let me.

I know, I could rewrite the complete existing AutoLISP code using OpenDCL dialogue forms, but that would take forever.

I appreciate any help and slap across the face for an obvious lack of knowledge and errors.

Regards.

roy_043

  • Sr. Member
  • ****
  • Posts: 373
Re: How to close this Modeless Form
« Reply #1 on: February 21, 2020, 06:44:38 AM »
Maybe this helps:
Code: [Select]
(defun C:STEEL_DIMS ( / dcl_id ret)
   (setq dcl_id (load_dialog "STEEL_DIMS.dcl"))
   (if (not (new_dialog "STEEL_DIMS" dcl_id)) (exit))
   (action_tile "DISPLAY_SLIDE" "(done_dialog 2)")
   ; (action_tile "accept" "(done_dialog 1)")
   (action_tile "cancel" "(done_dialog 0)")
   (setq ret (start_dialog))
   (unload_dialog dcl_id)
   (if (= 2 ret)
      (sps)
   )
   (princ)
)

RGUS

  • Member
  • *
  • Posts: 34
Re: How to close this Modeless Form
« Reply #2 on: February 21, 2020, 10:27:00 AM »
Thanks, Roy,
Obvious now to close the ACAD dialogue before opening the OPENDCL form now that I see it.

Sometimes, wood and trees just look the same.
Thanks again.