Started by andrew ·
2010-10-29 15:43 UTC ·
4 replies · SMF topic #1363
andrew
2010-10-29 15:43 UTC
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
jbuzbee
2010-11-01 14:57 UTC
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
andrew
2010-11-01 17:10 UTC
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
fred_tomke
2010-11-01 19:02 UTC
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
andrew
2010-11-04 13:07 UTC
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