为圆弧、圆或折线弧段创建渐拐径向尺寸。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddDimRadialLarge(Center, ChordPoint, OverrideCenter, JogPoint, JogAngle) 言论![]() 中心是要标注尺寸的圆弧、圆或折线弧段的中心。覆盖中心是尺寸的原点。 例子工 务 局: Sub Example_AddDimRadialLarge()
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 ptChordPoint(2) As Double
ptChordPoint(0) = 0: ptChordPoint(1) = 10: ptChordPoint(2) = 0
Dim ptOverrideCenter(2) As Double
ptOverrideCenter(0) = -3: ptOverrideCenter(1) = -6: ptOverrideCenter(2) = 0
Dim ptJogPoint(2) As Double
ptJogPoint(0) = 0: ptJogPoint(1) = 5: ptJogPoint(2) = 0
Dim oDimRadialLarge As AcadDimRadialLarge
Set oDimRadialLarge = oMS.AddDimRadialLarge(oA.Center, ptChordPoint, ptOverrideCenter, ptJogPoint, PI / 4)
Dim ptTextPosition(2) As Double
ptTextPosition(0) = 0: ptTextPosition(1) = 6: ptTextPosition(2) = 0
oDimRadialLarge.TextPosition = ptTextPosition
Update
ZoomExtents
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_AddDimRadialLarge()
;; This example creates an arc and a jogged arc 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 jogged arc dimension
(setq ptChordPoint (vlax-3d-point 0 10 0)
ptOverrideCenter (vlax-3d-point -3 -6 0)
ptJogPoint (vlax-3d-point 0 5 0))
;; Create the jogged arc dimension in model space
(setq oDimRadialLarge (vla-AddDimRadialLarge modelSpace center ptChordPoint ptOverrideCenter ptJogPoint (/ PI 4)))
;; Set the position of the text for the dimension
(setq ptTextPosition (vlax-3d-point 0 6 0))
(vla-put-TextPosition oDimRadialLarge ptTextPosition)
(vla-ZoomExtents acadObj)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-24 08:13
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.