How to avoid shutting down AutoCAD on every modification on codes

Started by Tharwat, August 17, 2016, 11:09:36 PM

Previous topic - Next topic

Tharwat

Hi,

I am working on a program with OpenDCL palette so during writing AutoLISP codes logically I need to test the program to see the result of functions / codes and how the codes work in general but the problem is that every time I modify my codes or even adding a new Button or Label , Edit Box ... etc, I need to exit AutoCAD and restart it once again to be able to test the codes out and to see the new changes / adds to my palette.

Is there any way to work around this bothering and time consuming process to avoid shutting down AutoCAD on every modification on codes?

Thank you in advance.

roy_043

(dcl-Project-Load ProjectFilePath [as String] {ForceReload [as Boolean]} {NewProjectKey [as String]})

Tharwat

Thank you roy , that works great.

I already have that function at the first line of the program but without T symbol to force a reload and this is cool option indeed.
I have read the help document for the previous said function but I still don't know what is the meaning of the NewProjectKey in the function ? although that I kept this option empty and the function works without it.

Fred Tomke

Hi, you are correct: leave the NewProjectKey empty in general.
Using this argument you can load your project.odcl with an alternative projectname. So call your form (and controls) not by
Code (autolisp) Select
(dcl_form_show project/form) but with
Code (autolisp) Select
(dcl_form_show project2/form).

Not sure if anybody is using it in productive environments.

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

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

Tharwat

Thank you Fred for your reply and input.

I just have another question about Combo Box in palette which is the background color of Combo Box.

The problem is that the color changes to background color of palette itself so this matter would make the current layer name a bit hard to read as shown in the attached image:


Fred Tomke

Hi, yes you are right. Not sure if this is by design. I didn't use the built-in layercombobox.
I'll add a ticket.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

owenwengerd

The layer combo is implemented in the host app, so it's possible OpenDCL cannot override background color. Furthermore, if 'Use Visual Style' is enabled for the control, then your current Windows theme can override any custom color selection for the control.

Tharwat

Quote from: owenwengerd on August 19, 2016, 07:13:49 AM
if 'Use Visual Style' is enabled for the control, then your current Windows theme can override any custom color selection for the control.
Actually when I disabled the Visual Style it did show the ComboBox's layers clearly as if it is normal ComboBox with a list of strings added to it which means that it is much better than setting this option on / being enabled. me thinks.

Thank you.