Normal property example

 

Sub Normal_Example()

' This example creates an circle and determines its Normal property.

' It then creates a vector and uses it to reset the Normal property.

     Dim myCircle As AcadCircle

     Dim ctrPt(0 To 2) As Double

     ctrPt(0) = 5: ctrPt(1) = 3

     'Add the arc to the .dwg

     Set myCircle = ThisDrawing.ModelSpace.AddCircle(ctrPt, 5)

     ' Display the entity

     myCircle.Update

     ThisDrawing.Application.ZoomExtents

     

     Dim vNormal As Variant

     vNormal = myCircle.Normal

     MsgBox "Circle's normal Vector:" & _

     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's normal Vector is now:" & _

     Chr(13) & "x = " & vNormal(0) & _

     Chr(13) & "y = " & vNormal(1) & _

     Chr(13) & "z = " & vNormal(2)

End Sub

 

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.