为圆弧创建圆弧长度尺寸。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddDimArc(ArcCenter, FirstEndPoint, SecondEndPoint, ArcPoint) 言论![]() 弧中心是要标注尺寸的圆弧的中心。第一端点和第二端点是两条延长线通过的点。 例子工 务 局: 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
Visual 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-10-29 08:46
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.