Stop DCL closing and hiding DCL

Stop DCL closing and hiding DCL

Anonymous
Not applicable
791 Views
2 Replies
Message 1 of 3

Stop DCL closing and hiding DCL

Anonymous
Not applicable

I have a simple DCL setup but cannot figure out how to resolve these two issues:

 

1) It is closing DCL form after running the first function. How can I stop it?

 

2) How can I assign a lisp to second button to hide my DCL and prompt me to select entities in a drawing and by hitting ESC it delete selected items and back to DCL?( I supposed to finish it by now but complicate enough for my knowledge!)

 

thanks for the help

 

0 Likes
792 Views
2 Replies
Replies (2)
Message 3 of 3

scot-65
Advisor
Advisor

Please search (2) previous posts I had replied to, not too long ago for proper program structure when

dealing with DCL. On one of the posts I had attached a looping dialog template which will temporary

close the dialog for user selection. It is a steep learning curve to loop dialogs.

 

I have rewritten sections of your code in a more proper form.

Have a look and see what you did not do correctly.

 

 

;
;; DELETE LISP ROUTINE
;;
  (action_tile "BUT_LAY" "(done_dialog 1)")
  (action_tile "BUT_DELETE" "(done_dialog 2)")
  (action_tile "cancel" "(done_dialog 0)")
  (setq sd (start_dialog))
  (unload_dialog dcl_id)
  ;;
(if (and sd (> sd 0))
(cond
((= sd 1) (c:BYLAY) (C:SETLAY)) (sd (c:DELM) (C:SETLAY)) );cond
);if (princ)

If you code requires one to select a button, temporary close the dialog for selection, then reopen,

you will need to take a "snapshot" of the current dialog state before executing the main program.

To do this, here is an example: (action_tile "BUT_LAY" "(DELLSP_GET)(done_dialog 1)"). The template

will explain this.

 

The unload_dialog should be located just outside the while loop and is no longer just after the start_dialog.

 

Hope this helps.

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes