Normal property example
Sub Normal_Example()
Dim myCircle As AcadCircle
Dim ctrPt(0 To 2) As Double
ctrPt(0) = 5: ctrPt(1) = 3
Set myCircle = ThisDrawing.ModelSpace.AddCircle(ctrPt, 5)
myCircle.Update
ThisDrawing.Application.ZoomExtents
Dim vNormal As Variant
vNormal = myCircle.Normal
MsgBox "Circle
Chr(13) & "x = " & vNormal(0) & _
Chr(13) & "y = " & vNormal(1) & _
Chr(13) & "z = " & vNormal(2)
Dim vecNormal(0 To 2) As Double
vecNormal(0) = 0.5: vecNormal(1) = -0.8
myCircle.Normal = vecNormal
myCircle.Update
ThisDrawing.Application.ZoomExtents
vNormal = myCircle.Normal
MsgBox "Circle
Chr(13) & "x = " & vNormal(0) & _
Chr(13) & "y = " & vNormal(1) & _
Chr(13) & "z = " & vNormal(2)
End Sub
© Bricsys NV. All rights reserved. |