Load main dialog skips sub-dialogs

Started by Peter2, August 15, 2013, 08:26:05 AM

Previous topic - Next topic

Peter2

Maybe the title of the posting is not correct, I will try to explain.

I have a project with
- 1 modeless dialogue incl "Button A" and Button B"
- 2 palettes

The lisp behind is:

Code (autolisp) Select

(defun c:myapp ()
...
(setq project ODCL_code)

(dcl_Project_Import project nil nil)
...
...
) ; end of myapp

;;----
(defun c:ButtonA_OnClicked (/)
    (dcl_Form_Show PaletteA)
)
(defun c:ButtonB_OnClicked (/)
    (dcl_Form_Show PaletteB)
)


So I do ..

Code (autolisp) Select
Command: myapp  -> modeless dialogue is displayed (fine)
Click on "ButtonA" in dialogue -> palette A is displayed (fine)
Click on "ButtonB" in dialogue -> palette B is displayed (fine)
Close main-dialogue with "X" -> modeless dialogue is disappears, palettes stay (fine)


But ...
Code (autolisp) Select
Command: myapp  -> modeless dialogue is displayed (fine), palettes disappear (not fine)

I suppose that the second call of "dcl_Project_Import" goes to the base-modus and disables the palettes. What to do that the palettes stay?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Fred Tomke

#1
Yes, you are right. :)

EDIT:
I mean: you are right that the second call closes all instances of forms of the reloaded project.

That's the solution: don't call it twice.

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

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

Fred Tomke

#2
Ok, you can suppress the second call by using

Code (autolisp) Select
(if (not (member "projects" (dcl_getprojects)))
  (dcl_Project_Import project nil nil)
); if


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

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

Peter2

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10