@326047736
Since you are programming autolisp using DCL I'll assume that you are an advanced user.
There are various methods how to handle temporarily hide DCL dialog.
I'll describe method that I use.
Values of all edit boxes are stored either in autolisp lisp of pair like :
(("editbox1" . "100") ("editbox2" . "200") ("popuplist1" . "3"))
or written to outer txt file
editbox1 100
editbox2 200
popuplist1 3
Function that creates DCL dialog populates its tiles with the values stored in a list or file. only values stored in a list are initialized to DCL tiles.
So to enable use one or more Autocad commands in conjunction with DCL menu and not to break windows chain (DCL dialogs are special type of windows window object), create helper functions that read and write current state of particular DCL menu and initialize it.
At first it may look complicated, but once you get familiar with this method you can be sure that your application is bulletproof and it won't hang up Autocad because of non closed DCL menu.
To any button or tile that has to give focus to Autocad application assign a function that:
1) calls a function that writes down or store status of all DCL tiles
2) close active DCL
To return back to DCL menu call command that you or simply on main function start up
call lisp function that will populate DCL tiles.
Benefits.
This way most of the values are set on load and user needs to maybe change just one value or use values that were
set in previous function run (this enables fast and accurate repetition).
If values are stored in outer file same settings can be used tomorrow, in 10 days if temporary outer file is not deleted. If you use outer files you have to assure that they exist so initialization function should create them in case they don't exist.
Here is the sample code I use to organize one or multiple DCL menus.
To work with DCL you have to know how to work with either of tiles used and to create your strategy how you'll program them.
Miljenko Hatlak
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.