So I'm doing some scripting and I am creating some new objects. I know where I want the objects to go based on some other objects, and placing them there isn't the problem. The issue is that if I want to drop the object into a structure. The location I'm dropping is correct, but the owner isn't. I can set the owner of the object using the Move method on the object but I have to provide a new position.
Now I thought about trying to get the structure position in the top level diagram, and calculating the difference, but this operation would need to be recursive since I can have diagrams in diagrams.
So is there an easy way to move an object (or drop it in the first place) at a position relative to the top level diagram, but has its owner set to a different diagram?