close_all ?? how to activate when exiting drawings?

Started by Hypersonic, August 06, 2011, 09:18:17 AM

Previous topic - Next topic

Hypersonic

I have a problem withi dialogs remaining open when I open a different drawing or reopen the current drawing, and then the dialogs are not really loaded.
Does anyone have any pointers on how to automatically close out dialog boxes when reopoening a drawing or opening a different drawing?

Thanks!

Fred Tomke

Hello, Hypersonic, you have two possibilities: either you define a editor or drawing reactor which closes or update the form when a new drawing will be opened. Otherwise you define a command which will be automatically started when your lisp application will be loaded in each drawing.

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

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

Fred Tomke

Hi, Hypersonic, my answer followed the contents of your topic. When following the title of your topic I'd rather activate the EnteringNoDocState event.

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

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


Hypersonic

I have never done a reactor, but have always thought it would be useful to learn how, would you be able to point me in the right direction as to where to learn about them?

Thanks!

Fred Tomke

Hello, Hypersonic, during the AutoCAD installation you can add the VisualLISP tutorium. That includes the garden path sample using reactors.

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

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

Hypersonic

I used this in my startup routine and it works great!  (dcl_Form_CloseAll 0);closes all open dialog boxes

Thanks!

vpost

Hello. I have a question on the same subject.
At me in AutoCAD some windows are open. How to execute a command (dcl_Form_CloseAll 0) upon transition from one window in another. I tried EnteringNoDocState but it works only when closing the last window?

Regards

Fred Tomke

Hi, EnteringNoDocState is only used for modeless forms (modeless, palette, dockable) when the last drawing ist closed.

(dcl_Form_CloseAll 0) closes all OpenDCL forms. Querying the systemvariable CMDACTIVE tells you, if a modal AutoCAD form is active.

(vl-remove-if-not 'dcl_form_isactive (apply 'append (mapcar 'dcl_project_getforms (dcl_getprojects)))) returns a list of all open forms.

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

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