OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: andrew on January 06, 2011, 06:21:38 AM

Title: calling one odcl file from another
Post by: andrew on January 06, 2011, 06:21:38 AM
I have a odcl program that has many many sub modal windows
most of which are no longer used, however the lsp code for all these sub modal windows are co-dependant so just re-writing it to use the 2 sub modal windows i need would take me a while to do.

so my question is, is it possible to call sub modal windows in one odcl file from another?

for example
(dcl_Form_Show dwgbrowser_Form3) is from one odcl file

if i put just the above in my command line, the sub modal window opens and functions properly.
i want to put that function call into a totally different odcl file and have it open up without having to re-write any code.

if this is possible can someone explain how to get it to work

thanks
Title: Re: calling one odcl file from another
Post by: Fred Tomke on January 06, 2011, 06:34:03 AM
Sure, you can, andrew, I'm using nearly different 20 odcl project files and I call a form from my layer.odcl from my main.odcl. You just have to make sure that both projects are loaded.

Code (autolisp) Select
(dcl_project_load "main.odcl")
(dcl_project_load "layer.odcl")

[...]

(defun c:main_form1_pb_layer_OnClicked ()
  (dcl_form_show layer_selection)
); c:main_form1_pb_layer_OnClicked

[...]

(dcl_form_show main_form1)

Regards, Fred
Title: Re: calling one odcl file from another
Post by: andrew on January 07, 2011, 06:01:48 AM
Thanks Fred, got it working  ;D