AddDimAligned 方法 (ActiveX)
创建对齐的尺寸对象。 支持的平台:仅限 Windows 签名VBA: RetVal = object.AddDimAligned(ExtLine1Point, ExtLine2Point, TextPosition) 言论在对齐尺寸中,尺寸线平行于延伸线原点。延长线原点是使用 和 属性指定的。ExtLine1PointExtLine2Point 例子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 可视化 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) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 22:29
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.