AddDimArc 方法 (ActiveX) 
创建圆弧的圆弧长度尺寸。 支持的平台:仅限 Windows 签名VBA: RetVal = object.AddDimArc(ArcCenter, FirstEndPoint, SecondEndPoint, ArcPoint) 言论![]() ArcCenter 是要标注尺寸的圆弧的中心。FirstEndPoint 和 SecondEndPoint 是两条延伸线经过的点。 例子VBA: Sub Example_AddDimArc()
    Dim PI As Double: PI = 3.141592
    Dim oMS As AcadModelSpace
    Set oMS = ThisDrawing.ModelSpace
    Dim ptCenter(2) As Double
    Dim oA As AcadArc
    Set oA = oMS.AddArc(ptCenter, 10, PI / 3, PI * 3 / 4)
    
    Dim ptArcPoint(2) As Double
    ptArcPoint(0) = 0: ptArcPoint(1) = 15
    
    Dim oAcadDimArcLength As AcadDimArcLength
    Set oAcadDimArcLength = oMS.AddDimArc(oA.Center, oA.startPoint, oA.endPoint, ptArcPoint)
    
    Update
    ZoomExtents
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_AddDimArc()
    ;; This example creates an arc and arc length dimension in model space.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq modelSpace (vla-get-ModelSpace doc))
    ;; Define the arc
    (setq center (vlax-3d-point 0 0 0))
    ;; Create the arc in model space
    (setq arc (vla-AddArc modelSpace center 10 (/ PI 3) (/ (* PI 3) 4)))
    
    ;; Define the arc length dimension
    (setq arcPoint (vlax-3d-point 0 15 0)
          startPoint (vla-get-StartPoint arc)
          endPoint (vla-get-EndPoint arc))
  
    ;; Create the arc length dimension in model space
    (setq dimArcLength (vla-AddDimArc modelSpace center startPoint endPoint arcPoint))
    (vla-ZoomExtents acadObj)
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 15:13
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.