Reactor for block edit

Reactor for block edit

Anonymous
Not applicable
1,453 Views
8 Replies
Message 1 of 9

Reactor for block edit

Anonymous
Not applicable

Problem:

If have a bunch of blocks in a drawing (e.g, "A1" "A2" "B1" "B2" etc.......).

 

Can i use a reactor/reactors to detect when one of these has been modified and change the colour of all the lines in the modified block and then add some xdata so i can search a drawing for modified blocks?

 

From what i have read i think i may need an object reactor to get the vla-object and use this with a command end reactor to then modify the block when its been modified with blockedit/refedit?

Am i anywhere near or am i making this far too complicated??

0 Likes
1,454 Views
8 Replies
Replies (8)
Message 2 of 9

Ranjit_Singh
Advisor
Advisor

You may need to catch more than blockedit/refedit. For instance, what if the block is changed through a lisp? If you don't care about those events then I think you are on the right track. If you do care about those events then just using a command reactor may not be sufficient. You will have to play around and see what works best.

0 Likes
Message 3 of 9

SeeMSixty7
Advisor
Advisor
That is an excellent point. Another one would be insert equals. There is also the possibility of the block being defined in another drawing already and then copy the contents of one drawing into that one. @Anonymous you may want to consider a block audit at drawing load or at save.

Good luck
0 Likes
Message 4 of 9

Anonymous
Not applicable
I only need to catch modifications that are done 'manually', lisp and .net I won't need to catch. I'm very green to reactors and activex, the syntax and results are confusing me at the moment.
0 Likes
Message 5 of 9

Anonymous
Not applicable
@SeeMSixty7, the blocks are created and belong to that drawing. There is no danger of the blocks being taken out of the drawing or the same blocks being brought in. What would be the advantage of a block audit?
0 Likes
Message 6 of 9

SeeMSixty7
Advisor
Advisor
It sounds like your purpose is pretty specific. I thoughtvyour were trying to maintain your blocks had certain properties maintained if a user modified it. It sounds like you are trying to track changes to a drawing within blocks. An audit of the block was basically so you could verify the components and settings in the block to make sure they were like you wanted them. That's all.
0 Likes
Message 7 of 9

Anonymous
Not applicable
Ah ok, all I'm after is to change the colour of the contents of the block so it's easily identified as modified, and to add xdata to it so I can interrogate the drawing to get a list of blocks which have been changed
0 Likes
Message 8 of 9

scot-65
Advisor
Advisor
Another situation I can think of is when the block editor is opened,
and one decides not to edit the block by discarding all changes,
the result is what you are trying to accomplish yet nothing was
modified.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 9 of 9

Anonymous
Not applicable
These are fairly simple blocks so I could save all sub entity data and check the 'edited' block to see if they match. What's the best way to get the vla-object of a block when exiting block/ref editor?
0 Likes