CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

AddDimAlign Method (ActiveX)

2023-1-4 13:23| 发布者: admin| 查看: 663| 评论: 0|来自: AutoCAD

摘要: 创建对齐的尺寸对象。

创建对齐的尺寸对象。

支持的平台:仅窗口

签名

工 务 局:

RetVal = object.AddDimAligned(ExtLine1Point, ExtLine2Point, TextPosition)
对象

类型:模型空间,图纸空间

此方法适用的对象。

ExtLine1Point

访问:仅输入

类型:变体(双精度的三元素数组)

指定延长线的第一个端点的 3D WCS 坐标。

ExtLine2Point

访问:仅输入

类型:变体(双精度的三元素数组)

指定延长线第二个端点的 3D WCS 坐标。

文本位置

访问:仅输入

类型:变体(双精度的三元素数组)

指定文本位置的 3D WCS 坐标。

返回值(RetVal)

类型:暗对齐

新创建的对齐维度。

言论

在对齐的尺寸中,尺寸线平行于延伸线原点。延伸线原点使用 and 属性指定。ExtLine1PointExtLine2Point



例子

工 务 局:

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)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-11 15:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部