Something odd with ControlBar and ModalForm

Started by khann, May 28, 2009, 07:35:39 PM

Previous topic - Next topic

khann

In my ODCL file there're one Controlbar and some ModalForm.
When opening an AutoCAD Document the Controlbar always shows up where it docked place.
Then I popup a ModalForm, at first the docked Controlbar loses its inner controls and when the ModalForm closed the Controlbar gone away too.
Is this just for my case?

owenwengerd

Can you upload a very simple .odcl and .lsp that demonstrates the problem? Also, which versions of Windows and AutoCAD are you using?

khann

#2
Thanks owen for your reply.
Sorry, I've tried  but the LISP codes so complecate to make a sample.
But I captured screen shots of that problem and attach them.

01.png - At first the Controlbar of BlockList preview the blocks.
02.png - Then I select a pline in AutoCAD the P_SIDE form pops up and the Controlbar changes gray.
03.png - After close the P_SIDE form with click Cancel button, the controlbar also disappears.

Before I build my project, while testing sample the Controlbar and Form make no problem.
I think somewhere of my LISP code is wrong.
I coded two places (command "opendcl") and ("dcl_project_load")

Code (autolisp) Select
(command "opendcl")   
(dcl_project_load "GBIPRMIS_ODCL.odcl" T)


in each Controlbar and Form code part.
Mabye this could cause the odd.
And there's no code of closing Controlbar but it goes away.

Still I'm trying to fix this.

Thanks.

owenwengerd

That is strange. It looks to me like something is causing the control bar to close. The "docking pane" is left behind, then eventually removed when its layout is refreshed. Please continue trying to simplify your code; this may help narrow down the code that causes the problem.

Fred Tomke

Hm, are both of the forms defined in the same project?
If so, you shut down the control pane by using

Code (autolisp) Select
(dcl_project_load "GBIPRMIS_ODCL.odcl" T)

In 02.png you can see that the controlpane is going to be closed!

I would test if it will be work after changing all the

Code (autolisp) Select
(dcl_project_load "GBIPRMIS_ODCL.odcl" T) into

Code (autolisp) Select
(dcl_project_load "GBIPRMIS_ODCL.odcl")

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

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

khann

Thank you two men!
Finally I've made a sample.
attach three files of dwg, odcl and lsp.
First load signTab with (c:LoadSignTab)
Then run the (c:selobj) and select the cyan pline in the dwg file.

Just check the result.
Thanks.

owenwengerd

Fred is correct. When you force the project to be reloaded, it must first be unloaded, which means closing any open forms from that project. The solution is as Fred said, to not force the project to be reloaded.