Problem with OnDocActivated and Bricscad

Started by Emiliano, September 20, 2012, 06:30:11 AM

Previous topic - Next topic

Emiliano

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

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

Emiliano

Ok
thank you!
I hope that the next built to be published very soon  ;)

owenwengerd

If all goes according to plan, I will upload a new build this weekend.
Owen Wengerd (Outside The Box) / ManuSoft