Hello,
My application inserts 4 DBText lines and 2 PolyLines into a drawing from another drawing(or Source Database). I created a special layer ("warning") into which these entities are inserted. Then I combined these entities into a group so the user can move it out of the way while they are working.
When the title block data is refreshed, I want to redraw my 4 lines of text and 2 lines at the location last set by the user.
I have succesfully implemented redrawing the object at the X and Y coordinates last placed by the user by using ent.TransformBy(Matrix3d.Displacement(acVec3d) on each entitiy at the source and then doing a DBSource.WblockCloneOjbects to put them in the destination drawing at the correct position.
However, if the user rotates the group, I need to make the rotation also. This is where I'm having problems. What is the best way to grab the rotation value(s?) from the existing, user placed group, and then redraw onto the drawing at that rotated value? Is there an easier implementation that the way I am doing it?
thanks,
Patrick
You could calculate the angle of one of the lines in the source drawing and then compare and adjust the angle of the cloned set.
Another solution may be to rotate the original objects indirect using a UCS. Then add the same UCS in the dest drawing.