So I've recently started trying to make use of reactors (I know, I must be crazy, lol). It's going well so far, but I've run into something that's making me nervous.
At my job, we have a bunch of dynamic blocks in model space whose visibility states show different configurations. If we change a block's visibility state, that automatically means we also need to change one or more detail blocks in paper space that have a corresponding visibility state. I'm trying to create a reactor such that whenever any block's visibility state is changed, all the corresponding blocks get their visibility states changed accordingly. I actually got it working, but there's a problem. When I change the visibility state of one object, the other changes just like I want. But I also get "error: Automation error. Object is not open for write".
I suppose I could just live with the error message or try to suppress it, but I have a feeling it means there's something I don't know about reactors and it could come back to bite me. It seems the error message is coming from the if statement where I check to see which object is passed as the notifying object. Maybe there's a different way I should be checking to see which is the notifier? I can probably get around this error by only having one owner per reactor, but that doubles the size of my code and I feel like it would be much cleaner to have one reactor watch both objects. Any ideas?
TIA, you guys rock