- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Sub GetBound() Dim i As AcadEntity Dim obj As AcadBlockReference, pBlock As AcadBlock Dim dot(2) As Double ThisDrawing.Utility.GetEntity obj, pnt Set pBlock = ThisDrawing.Blocks(obj.Name) pRotation = obj.Rotation For Each i In pBlock i.Rotate dot, pRotation Next i obj.Rotation = 0 obj.Update obj.GetBoundingBox pMin, pMax For Each i In pBlock i.Rotate dot, -pRotation Next i obj.Rotation = pRotation obj.Update ThisDrawing.SendCommand "_.RECTANG " & pMin(0) & "," & pMin(1) & vbCr & pMax(0) & "," & pMax(1) & vbCr End Sub
|
|