AddDimOrdinate Method (ActiveX)

Creates an ordinate dimension given the definition point and the leader endpoint.

Supported platforms: Windows only

Signature

VBA:

RetVal = object.AddDimOrdinate(DefinitionPoint, LeaderEndPoint, UseXAxis)
object

Type: Block, ModelSpace, PaperSpace

The objects this method applies to.

DefinitionPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the point to be dimensioned.

LeaderEndPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the endpoint of the leader. This will be the location at which the dimension text is displayed.

UseXAxis

Access: Input-only

Type: Integer

  • Non-zero (positive or negative): Creates an ordinate dimension displaying the X axis value.
  • 0 (zero): Creates an ordinate dimension displaying the Y axis value.
Note: While the argument accepts an integer, it is recommended to use True and False. True creates an ordinate dimension that displays the X axis value and False displays the Y axis value.

Return Value (RetVal)

Type: DimOrdinate

The newly created ordinate dimension object.

Remarks

Ordinate dimensions display the X or Y coordinate of an object along with a simple leader line. The absolute value of the coordinate is used according to the prevailing standards for ordinate dimensions.

An ordinate dimension measuring the absolute X position of a point tangent to a circle

Examples

VBA:

Sub Example_AddDimOrdinate()
    ' This example creates an ordinate dimension in model space.
    
    Dim dimObj As AcadDimOrdinate
    Dim definingPoint(0 To 2) As Double
    Dim leaderEndPoint(0 To 2) As Double
    Dim useXAxis As Long
    
    ' Define the dimension
    definingPoint(0) = 5#: definingPoint(1) = 7#: definingPoint(2) = 0#
    leaderEndPoint(0) = 10#: leaderEndPoint(1) = 7#: leaderEndPoint(2) = 0#
    useXAxis = True
    
    ' Create an ordinate dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimOrdinate(definingPoint, leaderEndPoint, useXAxis)
    ZoomAll
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_AddDimOrdinate()
    ;; This example creates an ordinate dimension in model space.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Define the dimension
    (setq definingPoint (vlax-3d-point 5 7 0)
          leaderEndPoint (vlax-3d-point 10 7 0)
          useXAxis :vlax-true)
    
    ;; Create an ordinate dimension in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj (vla-AddDimOrdinate modelSpace definingPoint leaderEndPoint useXAxis))
    (vla-ZoomAll acadObj)
)