OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Tharwat on August 17, 2016, 11:09:36 PM

Title: How to avoid shutting down AutoCAD on every modification on codes
Post by: Tharwat on August 17, 2016, 11:09:36 PM
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.
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: roy_043 on August 17, 2016, 11:56:10 PM
(dcl-Project-Load ProjectFilePath [as String] {ForceReload [as Boolean]} {NewProjectKey [as String]})
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: Tharwat on August 18, 2016, 12:51:07 AM
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.
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: Fred Tomke on August 18, 2016, 01:37:11 PM
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
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: Tharwat on August 19, 2016, 03:54:56 AM
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:

Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: Fred Tomke on August 19, 2016, 04:10:14 AM
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
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: owenwengerd on August 19, 2016, 07:13:49 AM
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.
Title: Re: How to avoid shutting down AutoCAD on every modification on codes
Post by: Tharwat on August 19, 2016, 07:24:48 AM
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.