Copying Linked Objects

Copying Linked Objects

Kyudos
Advisor Advisor
575 Views
4 Replies
Message 1 of 5

Copying Linked Objects

Kyudos
Advisor
Advisor

If I move or copy a linked objects (i.e., one that 'Hard-points' to another, or several others) is there an easy way to show what will actually happen via the move/copy marquee clone ghost thingy?

 

For example, Line A owns Point B and Point C, I select A and COPY. The drag clone shows a line(A), how do I get it to also show the points? (B and C) Should I call my point clone functions from my line clone function for instance?

0 Likes
576 Views
4 Replies
Replies (4)
Message 2 of 5

BerndCuder8196
Advocate
Advocate
You can add B and C in AcEdSSGetFilter::endSSGet.
0 Likes
Message 3 of 5

Kyudos
Advisor
Advisor

Well, yeah I could manually change the selection set. But given that the Deep Clone process has the concept of linked objects - I copy A - B and C are also copied - it would seem like AutoCAD would have a built in way to show this during the copy process. Manually constructing the selection set (i.e. following the links myself) means I wouldn't be taking advantage of the existing 'linking' system.

0 Likes
Message 4 of 5

BerndCuder8196
Advocate
Advocate
I think there is no mechanism to copy entity A in the drawing and automatically copy B and C when A has an hardpointer to these. These works in copypaste well, also copypaste in the same drawing.
I think this is because hardpointer are designed for hardpointing layers, styles, not between entity's.
But if I remember right, if you select A and add C and D manualy to the selection set, AutoCAD check this and make an Id translation.
So, if you only copy A, the copy has an hardpointer to B and C, like the origin. But if you copy A, B and C, the copy of A has an hardpointer to the copy's of B and C (idMapping). But I'm not sure, I have tested this in my app only between two entities they have an softpointer together.
0 Likes
Message 5 of 5

Kyudos
Advisor
Advisor

Its possible I'm cheating 🙂 My objects (of different types) are separate and independent entities, but need to maintain "connectivity". Each object stores pointers to its connected objects, but I store the pointer differently depending on the filer type and the 'owner' direction. (For a deep clone filer I use hard ownership pointers, for a wblock clone hard pointers, otherwise soft pointers).

 

This allows me to copy one object and have its mates automatically included in the copy and the ids remapped correctly, to maintain my connectivity in the copied group of objects.

 

But I see that the deep cloning doesn't occur until after the 'drag' part of the copy, which would make it difficult to do what I want without, as you say, manually adding my linked objects to the selection set. It just seems odd that Autocad has a nice method for linking deep cloned objects that works really well for me, but there is no way to leverage that system to draw a 'proper' drag clone...

0 Likes