OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: andrew on October 29, 2010, 08:43:49 AM

Title: another control bar question
Post by: andrew on October 29, 2010, 08:43:49 AM
Im trying out the control bar feature so i decided to take a working modal project and change the code a bit to use the control bar, i placed a graphic button on the control bar project and when i run my code it tell me there is no function definition.

does the control bar not allow graphic buttons?
is there something im missing?

:edit:
I commented out a part of the original code and it all works fine now
but im still curious as to why it would work with a modal form and not with a control bar form
Title: Re: another control bar question
Post by: jbuzbee on November 01, 2010, 07:57:10 AM
Modeless forms (control bars, palettes) require all controls that interact with AutoCAD (execute commands, modify tables, etc.) have the "Event-Invoke" property set to "1 - Asynchronous".

Hope that helps.

jb
Title: Re: another control bar question
Post by: andrew on November 01, 2010, 10:10:48 AM
Hi James,
I thought that would have been the case but its not.
i have it set to asynchronous and it still telling me no function definition

ill have to keep trying to debug my code im sure its something im missing
Title: Re: another control bar question
Post by: Fred Tomke on November 01, 2010, 12:02:14 PM
Hi, maybe I'm wrong but if the AutoCAD says that "no function definition" than you have to define the function at first?!

Regards, Fred
Title: Re: another control bar question
Post by: andrew on November 04, 2010, 06:07:57 AM
Hi Fred,
Yes the function loads first.
When I use the original code and form (I think you helped me with it)
it works flawlessly.
however when I take the original code and just change it from a modal form to a control bar form, it dont work correctly.
I had to change a couple lines of code to get it to work with a control bar form but I got it all working now.

thanks for the replies