OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Emiliano on September 20, 2012, 06:30:11 AM

Title: Problem with OnDocActivated and Bricscad
Post by: Emiliano on September 20, 2012, 06:30:11 AM
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
Title: Re: Problem with OnDocActivated and Bricscad
Post by: Fred Tomke on September 20, 2012, 07:26:15 AM
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
Title: Re: Problem with OnDocActivated and Bricscad
Post by: owenwengerd on September 20, 2012, 12:28:44 PM
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.
Title: Re: Problem with OnDocActivated and Bricscad
Post by: Emiliano on September 20, 2012, 10:56:46 PM
Ok
thank you!
I hope that the next built to be published very soon  ;)
Title: Re: Problem with OnDocActivated and Bricscad
Post by: owenwengerd on September 21, 2012, 01:28:21 PM
If all goes according to plan, I will upload a new build this weekend.