创建对齐的尺寸对象。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddDimAligned(ExtLine1Point, ExtLine2Point, TextPosition) 言论在对齐的尺寸中,尺寸线平行于延伸线原点。延伸线原点使用 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) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.