Started by Emiliano ·
2012-09-20 13:30 UTC ·
4 replies · SMF topic #1895
Emiliano
2012-09-20 13:30 UTC
Hello to all,
I have a problem with the event "OnDocActivated" assigned to a Control Bar
In AutoCAD works correctly, but in Bricscad starts continuously every time you start a new command.
I recommend you see the example and the video in the attached file.
Can you tell me how to fix this?
thanks
fred_tomke
2012-09-20 14:26 UTC
Hi, I remember similar behaviour in the past in AutoCAD, because OnDocActivated does not mean OnActiveDocumentChanged. I believe, OnDocActivated will also be fired when the palette had the focus before clicking into ModelSpace of current drawing. I solved that using blackboard and I compared the vla-object of ActiveDocument with the content of the blackboard variable. If it is equal, OnDocActivated will be skipped.
Regards, Fred
owenwengerd
2012-09-20 19:28 UTC
It looks like Bricscad's document events are fired differently than AutoCAD's. I have changed the OpenDCL code for the next build so that OnDocActivated is not called unless a *different* document is activated. This should make the Bricscad behavior consistent with AutoCAD.
Emiliano
2012-09-21 05:56 UTC
Ok
thank you!
I hope that the next built to be published very soon ;)
owenwengerd
2012-09-21 20:28 UTC
If all goes according to plan, I will upload a new build this weekend.