Trying to help a member of
a different forum, I have created a small reactor based solution. It works fine in BricsCAD (the program I use) but, sadly, for some reason, not in AutoCAD.
The goal of the solution is to link objects in modelspace and paperspace: if you erase one of these objects all objects that are linked to it will automatically also be erased. Comparable to the group mechanism except the objects need not be in the same space.
I have created two versions. One version uses a temporary command reactor, the other a 'post process'. In both cases data is stored as Xdata.
Test (works in BC not in AC):
1. Open the dwg file.
2. Load one of the two Lisp files.
3. On Layout1 erase the 'PS' text.
4. Result: the 'MS' text, in modelspace, is also erased.
5. Use _U.
6. Activate the VP.
7. Erase the 'MS' text.
8. Result: the 'PS' text is also erased.
9. There are also some paired entities in modelspace.
In AC there is an error message that is not very informative:
; error: Automation Error. Description was not provided.
If anybody can shed some light on this I would really appreciate it.