.NET

Reply
Mentor
SRSDS
Posts: 250
Registered: ‎04-15-2011
Message 1 of 4 (163 Views)

Undo command disables DocumentCollection reactors

163 Views, 3 Replies
04-27-2012 12:29 PM

Hi,

 

Can anyone suggest a reason why Undo might disable DocumentCollection reactors?

It has something to do with me undoing the annotation scale as when I remove the line

db.Cannoscale = tstAnnoScale

The problem doesn't occur.

 

Distinguished Contributor
Artvegas
Posts: 104
Registered: ‎04-21-2011
Message 2 of 4 (143 Views)

Re: Undo command disables DocumentCollection reactors

04-28-2012 12:58 AM in reply to: SRSDS
Sounds strange. Can you post some code that replicates the problem?
Board Manager
StephenPreston
Posts: 419
Registered: ‎05-22-2006
Message 3 of 4 (126 Views)

Re: Undo command disables DocumentCollection reactors

04-29-2012 07:53 AM in reply to: SRSDS

Hard to say without seeing code. Event handlers can become disabled if you allow an exception thrown in your event handler to propagate to AutoCAD (i.e. if you don't catch and handle the exception in your event handler). 

Cheers,

Stephen Preston
Autodesk Developer Network
Mentor
SRSDS
Posts: 250
Registered: ‎04-15-2011
Message 4 of 4 (121 Views)

Re: Undo command disables DocumentCollection reactors

04-29-2012 08:28 AM in reply to: StephenPreston

Hi,

I've only just fixed the problem but I'm not entirely sure where the exact problem was as I changed a few things and moved a few buits of code around.

One thing I found was that two events were bouncing off each other but for some reason it wasn't and endless loop.

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!