OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: jb on May 15, 2008, 11:15:06 AM

Title: OpenDCL Document Events
Post by: jb on May 15, 2008, 11:15:06 AM
The VLR reactors are pretty limited when going from document -> lisp interpreter -> OpenDCL.arx.  I guess it's because of the interpreter, objects don't get released during CommandEnded, AttachEnded, and DataBase call-backs.  Or maybe it's because dcl_Functions are commands?

In any event, it would be nice if OpenDCL had some built-in event handlers.  The ones I've had the most trouble with are when Objects are added or removed from the Drawing Database.  Most of the others work fine: CommandEnded works for most Object Table update functions.  Obviously, this would be for Modeless, Dockable and Palette forms.  These forms need to react to the Documant environment real-time.  Right now I have refresh buttons when reactors aren't working.

Maybe:
dcl_objectAppended
dcl_objectUnAppended               
dcl_objectReAppended
dcl_objectErased
dcl_objectUnErased

Any thoughts?  Any others?
Title: Re: OpenDCL Document Events
Post by: hermanm on September 26, 2008, 09:09:58 PM
Events related to switching documents would be on my list.

I haven't yet tried using

:vlr-documentBecameCurrent
:vlr-documentToBeActivated

although I may try it this weekend.

Scenario:

Modeless form which needs to use a document-specific variable (either a LISP global or a dictionary variable) to update the value displayed by a control.

Anyone have any experience to share on this topic?
Title: Re: OpenDCL Document Events
Post by: BazzaCAD on September 26, 2008, 10:30:33 PM
The modeless forms have an "OnDocActivated" event for that.

Title: Re: OpenDCL Document Events
Post by: owenwengerd on September 27, 2008, 05:05:41 AM
Quote from: jb on May 15, 2008, 11:15:06 AM
The VLR reactors are pretty limited...

It would be helpful if you could post some sample code that demonstrates the problem.
Title: Re: OpenDCL Document Events
Post by: jb on September 27, 2008, 07:06:54 AM
I'll put an example together.
Title: Re: OpenDCL Document Events
Post by: hermanm on September 27, 2008, 10:58:34 AM
Quote from: BazzaCAD on September 26, 2008, 10:30:33 PM
The modeless forms have an "OnDocActivated" event for that.

Ah! cool.:)

Thanks, Barry