Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We are implementing an application, where we are drawing objects, representing a panel, which represents the columns of the wall. I need to rotate the set of objects (the columns) together on one axis.
How do I achieve it?
Expected Result
I have the following code, but it's for rotating each objects.
using (Transaction acTrans = dwgDb.TransactionManager.StartTransaction()) { // Access drawing block table pBlockTbl = acTrans.GetObject(dwgDb.BlockTableId, OpenMode.ForWrite) as BlockTable; pBlockRef = (BlockReference)acTrans.GetObject(thePANBLKBlockReference, OpenMode.ForWrite); pBlockRef.ColorIndex = colorIndex; Point3d tempPoint = pBlockRef.Position; Matrix3d curUCSMatrix = acDoc.Editor.CurrentUserCoordinateSystem; CoordinateSystem3d curUCS = curUCSMatrix.CoordinateSystem3d; // Rotate the polyline 45 degrees, around the Z-axis of the current UCS pBlockRef.TransformBy(Matrix3d.Rotation(0.7854, curUCS.Yaxis, tempPoint)); acTrans.Commit(); }
Solved! Go to Solution.