cart: empty [ Login ]

block rotation

1 
ABS
7/18/2013 11:10 AM
Hi Wout, I try to rotate block from 0 to 90 angle. but it did not work fine. How can I get the correct block rotation?
Visual Basic Code:
Dim Elem As DxfEntity Dim blk As DxfInsert m_CADModel = DwgReader.Read(filename) For Each Elem In m_CADModel.Entities If Elem.AcClass = "AcDbMInsertBlock" Then blk = TryCast(Elem, DxfInsert) blk.Rotation = 90 End If Next
Please help!
blockratate.png
rammi
7/18/2013 11:39 PM
The rotation angle is defined in radians, not degrees.
Visual Basic Code:
blk.Rotation = System.Math.PI/2;
- Rammi
ABS
7/19/2013 10:15 AM
Thank you very much. It works!
Sachin Tripathi
2/12/2020 12:08 PM
Hi Rammi/Wout, I have similar question related to DxfInsert block rotation. If I'm correct, every DxfInsert block rotated by default it's bottom left corner only. Do we have any method to change that rotation point from bottom left to anywhere in the block like center, bottom right etc.? See the diagram for more details. Thanks. Sachin
Rotation.png
Wout
2/12/2020 3:10 PM
The block is rotated around the DxfBlock.BasePoint. - Wout
1