Specifies the three-dimensional normal unit vector for the object.
Supported platforms: Windows only
VBA:
object.Normal
Type: Arc, Attribute, AttributeReference, BlockReference, Circle, ComparedReference, Dim3PointAngular, DimAligned, DimAngular, DimArcLength, DimDiametric, Dimension, DimOrdinate, DimRadial, DimRadialLarge, DimRotated, Ellipse, ExternalReference, Hatch, Leader, Line, LWPolyline, MInsertBlock, MText, Point, Polyline, Region, Section, Shape, Solid, Text, Tolerance, Trace
The objects this property applies to.
Read-only: No
Type: Variant (three-element array of doubles)
A 3D normal unit vector in WCS.
This normal vector defines the Z axis for the given object. Although the normal is returned in WCS, it can be used to determine the OCS for the object. Use this property as the OCSNormal in the TranslateCoordinates method when converting coordinates to and from OCS.
Note that this property specifies a vector, not a point. The vector defines the direction of the normal, not a location in space. You can add this normal vector to a point to obtain another point.
Tolerance: The normal vector must be perpendicular to the direction of the Tolerance object. A normal that is not perpendicular to the Tolerance object will generate an error.
VBA:
Sub Example_Normal() ' This example creates a circle in model space. ' It then finds the current normal to that circle ' and changes the normal. ' Define a circle Dim circleObj As AcadCircle Dim center(0 To 2) As Double Dim radius As Double center(0) = 4: center(1) = 4: center(2) = 0 radius = 1 ' Add the circle to model space Set circleObj = ThisDrawing.ModelSpace.AddCircle(center, radius) ZoomAll ' Find the normal for the circle Dim currNormal As Variant currNormal = circleObj.Normal MsgBox "The current normal for the circle is " & circleObj.Normal(0) & ", " & circleObj.Normal(1) & ", " & circleObj.Normal(2), , "Normal Example" ' Change the normal for the circle Dim newNormal(0 To 2) As Double newNormal(0) = 1: newNormal(1) = 1: newNormal(2) = -1 circleObj.Normal = newNormal circleObj.Update MsgBox "The current normal for the circle is " & circleObj.Normal(0) & ", " & circleObj.Normal(1) & ", " & circleObj.Normal(2), , "Normal Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_Normal() ;; This example creates a circle in model space. ;; It then finds the current normal to that circle ;; and changes the normal. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define a circle (setq center (vlax-3d-point 4 4 0) radius 1) ;; Add the circle to model space (setq modelSpace (vla-get-ModelSpace doc)) (setq circleObj (vla-AddCircle modelSpace center radius)) (vla-ZoomAll acadObj) ;; Find the normal for the circle (setq currNormal (vlax-variant-value (vla-get-Normal circleObj))) (alert (strcat "The current normal for the circle is " (rtos (vlax-safearray-get-element currNormal 0) 2) ", " (rtos (vlax-safearray-get-element currNormal 1) 2) ", " (rtos (vlax-safearray-get-element currNormal 2) 2))) ;; Change the normal for the circle (setq newNormal (vlax-3d-point 1 1 -1)) (vla-put-Normal circleObj newNormal) (vla-Update circleObj) (setq newNormal (vlax-variant-value newNormal)) (alert (strcat "The current normal for the circle is " (rtos (vlax-safearray-get-element newNormal 0) 2) ", " (rtos (vlax-safearray-get-element newNormal 1) 2) ", " (rtos (vlax-safearray-get-element newNormal 2) 2))) )