CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

AddDimRadialLarge Method (ActiveX)

2023-1-4 13:13| 发布者: admin| 查看: 506| 评论: 0|来自: AutoCAD

摘要: 为圆弧、圆或折线弧段创建渐拐径向尺寸。

为圆弧、圆或折线弧段创建渐拐径向尺寸。

支持的平台:仅窗口

签名

工 务 局:

RetVal = object.AddDimRadialLarge(Center, ChordPoint, OverrideCenter, JogPoint, JogAngle)
对象

类型:模型空间,图纸空间

此方法适用的对象。

中心

访问:仅输入

类型:变体(双精度的三元素数组)

指定圆弧、圆或折线弧段中心的 3D WCS 坐标。

和弦点

访问:仅输入

类型:变体(双精度的三元素数组)

指定弧的弦点的 3D WCS 坐标。

覆盖中心

访问:仅输入

类型:变体(双精度的三元素数组)

指定覆盖中心位置或拾取点的 3D WCS 坐标。

点动点

访问:仅输入

类型:变体(双精度的三元素数组)

指定点动位置或拾取点的 3D WCS 坐标。

角拐角

访问:仅输入

类型:

角拐角的值。

返回值(RetVal)

类型:暗径大

新创建的角拐半径尺寸。

言论



中心是要标注尺寸的圆弧、圆或折线弧段的中心。覆盖中心是尺寸的原点。

例子

工 务 局:

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)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-19 12:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部