I am looking to write an AutoBlock counter using reactors, but I don't quite have the concept yet.
So I was wondering how other people would approach this topic?
My pseudo code:
1. Select block to count
2. Find all occurrences of block in drawing
3. Insert text showing the count
4. Attach handle of text to reactor for block name
5. Expand insert command to include a callback that checks blockname, If its the block name specified in reactor add to count.
6. Store reactor in drawing to eliminate need to load reactor manually while in drawing
That is what I have so far.
I am having problems with the concept of the reactor checking the block name, and having the reactor react automatically, so that i don't have to load the reactor manually.
I am using the following example as a guide somewhat…
http://www.theswamp.org/index.php?topic=7308.0Is the pseudo possible?
Any help would be appreciated....