Creates an aligned dimension object.
Supported platforms: Windows only
VBA:
RetVal = object.AddDimAligned(ExtLine1Point, ExtLine2Point, TextPosition)
Type: Block, ModelSpace, PaperSpace
The objects this method applies to.
Access: Input-only
Type: Variant (three-element array of doubles)
The 3D WCS coordinates specifying the first endpoint of the extension line.
Access: Input-only
Type: Variant (three-element array of doubles)
The 3D WCS coordinates specifying the second endpoint of the extension line.
Access: Input-only
Type: Variant (three-element array of doubles)
The 3D WCS coordinates specifying the text position.
In aligned dimensions, the dimension line is parallel to the extension line origins. The extension line origins are specified using the ExtLine1Point and ExtLine2Point properties.
VBA:
Sub Example_AddDimAligned() ' This example creates an aligned dimension in model space. Dim dimObj As AcadDimAligned Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim location(0 To 2) As Double ' Define the dimension point1(0) = 5#: point1(1) = 5#: point1(2) = 0# point2(0) = 10#: point2(1) = 5#: point2(2) = 0# location(0) = 5#: location(1) = 7#: location(2) = 0# ' Create an aligned dimension object in model space Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, location) ZoomAll End Sub
Visual LISP:
(vl-load-com) (defun c:Example_AddDimAligned() ;; This example creates an aligned dimension in model space. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the dimension (setq point1 (vlax-3d-point 5 5 0) point2 (vlax-3d-point 10 5 0) location (vlax-3d-point 5 7 0)) ;; Create an aligned dimension object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq dimObj (vla-AddDimAligned modelSpace point1 point2 location)) (vla-ZoomAll acadObj) )