.NET

.NET

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

Undo command disables DocumentCollection reactors

165 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 (145 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?
ADN Support Specialist
StephenPreston
Posts: 422
Registered: ‎05-22-2006
Message 3 of 4 (128 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: 256
Registered: ‎04-15-2011
Message 4 of 4 (123 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.