I have the following in a custom lisp
(defun yes_no_cancel (/)
;; Ensure OpenDCL Runtime is (quietly) loaded
(setq cmdecho (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(command "_OPENDCL")
(setvar "CMDECHO" cmdecho)
(setq yn (dcl_MessageBox "File has been changed, do you want to save changes?" "Save Drawing?" 6 1))
(if (= yn 6)
(nclose)
)
(if (= yn 7)
(nquit)
)
)
when i first launch acad i get this error message.
I just upgraded to 2012 from 2009, there is no problem with this code in 2009
even after uninstalling opendcl and reinstalling it, i still get error.
am i missing something?
Please clarify the statement ..
>>
Quotewhen i first launch acad i get this error message.
Do you get the message without running the routine ? or is the routine called from a reactor in some way'
just for info : this works for me.
note the method name
dcl_MessageBox is blue in the IDE after the file is loaded into AutoCAD.
Quote from: Kerry on February 28, 2012, 02:38:06 PM
Please clarify the statement ..
>>Quotewhen i first launch acad i get this error message.
Do you get the message without running the routine ? or is the routine called from a reactor in some way'
when i first launch acad it opens into a blank dwg (startup set to 0)
and it gives the error.
if i set my startup to 1 and use the dialog box to open my dwg i dont get this however, a few coworkers dont like to use that.
and that code is in separate file loaded from acaddoc
You may need to put your startup code in the S::STARTUP function so that it waits to execute until the AutoCAD editor is fully initialized.
Quote from: owenwengerd on February 29, 2012, 10:43:02 AM
You may need to put your startup code in the S::STARTUP function so that it waits to execute until the AutoCAD editor is fully initialized.
i have it loading in the startup, still get the error
also i have a separate project that i have loading on every dwg and often it locks up my acad 2012 to the point where i have to bring up the task manager to end the acad process to get out of it.
i would like to think its the coding, but most of it Fred did for me and i didnt have these issues with it loading in acad 2009
Quote from: andrew on March 01, 2012, 07:20:01 AM
Quote from: owenwengerd on February 29, 2012, 10:43:02 AM
You may need to put your startup code in the S::STARTUP function so that it waits to execute until the AutoCAD editor is fully initialized.
i have it loading in the startup, still get the error
also i have a separate project that i have loading on every dwg and often it locks up my acad 2012 to the point where i have to bring up the task manager to end the acad process to get out of it.
i would like to think its the coding, but most of it Fred did for me and i didnt have these issues with it loading in acad 2009
Andrew, the the S::STARTUP function is different to loading from the startup suite.
Which are you doing ?
Is the thread about start reactors at theSwamp yours ? If so, be aware that you can't include 'commands' in a reactor callback.
Regards
Quote from: Kerry on March 01, 2012, 11:37:50 AM
Quote from: andrew on March 01, 2012, 07:20:01 AM
Quote from: owenwengerd on February 29, 2012, 10:43:02 AM
You may need to put your startup code in the S::STARTUP function so that it waits to execute until the AutoCAD editor is fully initialized.
i have it loading in the startup, still get the error
also i have a separate project that i have loading on every dwg and often it locks up my acad 2012 to the point where i have to bring up the task manager to end the acad process to get out of it.
i would like to think its the coding, but most of it Fred did for me and i didnt have these issues with it loading in acad 2009
Andrew, the the S::STARTUP function is different to loading from the startup suite.
Which are you doing ?
Is the thread about start reactors at theSwamp yours ? If so, be aware that you can't include 'commands' in a reactor callback.
Regards
no this doesnt have anything to do with reactors, two different things...
i did get it to work, i had to adjust my code to load the open dcl first before loading my functions. it seems to be working as it should now thanks for the replies