根据引出线直径和长度上的两个点,为圆或圆创建直径尺寸。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddDimDiametric(ChordPoint, FarChordPoint, LeaderLength) 言论根据圆或弧的大小、引出线的长度以及 AutoCAD DIMUPT、DIMTOFL、DIMFIT、DIMTIH、DIMTOH、DIMJUST 和 DIMTAD 系统变量的值,创建不同类型的直径尺寸。 对于水平尺寸文本,如果尺寸线的角度与水平线的角度超过 15 度,并且位于圆或弧之外,AutoCAD 将绘制一条钩线,也称为着陆线或狗腿线。钩线长一个箭头,放置在尺寸文本旁边,如前两个插图所示。 ![]() 此函数使用LeaderLength参数作为从ChordPoint到维度将对批注文本执行水平狗腿的点的距离(如果不需要狗腿,则停止)。 “引线长度”设置仅在创建尺寸期间使用(即使如此,也仅在尺寸设置为使用默认文本位置值时使用)。首次关闭维度后,更改LeaderLength值不会影响维度的显示方式,但新设置将被存储并显示在 DXF、LISP 和 ARX 中。 例子工 务 局: Sub Example_AddDimDiametric()
' This example creates a diametric dimension in model space.
Dim dimObj As AcadDimDiametric
Dim chordPoint(0 To 2) As Double
Dim farChordPoint(0 To 2) As Double
Dim leaderLength As Double
' Define the dimension
chordPoint(0) = 5#: chordPoint(1) = 3#: chordPoint(2) = 0#
farChordPoint(0) = 5#: farChordPoint(1) = 5#: farChordPoint(2) = 0#
leaderLength = 1#
' Create the diametric dimension in model space
Set dimObj = ThisDrawing.ModelSpace.AddDimDiametric(chordPoint, farChordPoint, leaderLength)
ZoomAll
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_AddDimDiametric()
;; This example creates a diametric dimension in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the dimension
(setq chordPoint (vlax-3d-point 5 3 0)
farChordPoint (vlax-3d-point 5 5 0)
leaderLength 1)
;; Create the diametric dimension in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq dimObj (vla-AddDimDiametric modelSpace chordPoint farChordPoint leaderLength))
(vla-ZoomAll acadObj)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 08:51
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.