CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

关于创建几何公差 (VBA/ActiveX)

2023-1-4 22:43| 发布者: admin| 查看: 1278| 评论: 0|来自: AutoCAD

摘要: 若要创建几何公差,请使用添加容差方法。

若要创建几何公差,请使用该方法。AddTolerance

此方法需要三个值作为输入:包含公差符号的文本字符串、图形中放置公差的位置以及指定公差方向的方向矢量。您还可以复制、移动、擦除、缩放和旋转容差。

创建几何公差

本示例在模型空间中创建一个简单的几何公差。

Sub Ch5_CreateTolerance()
    Dim toleranceObj As AcadTolerance
    Dim textString As String
    Dim insertionPoint(0 To 2) As Double
    Dim direction(0 To 2) As Double

    ' Define the tolerance object
    textString = "Here is the Feature Control Frame"
    insertionPoint(0) = 5
    insertionPoint(1) = 5
    insertionPoint(2) = 0
    direction(0) = 1
    direction(1) = 1
    direction(2) = 0
    ' Create the tolerance object in model space
    Set toleranceObj = ThisDrawing.ModelSpace. _
        AddTolerance(textString, insertionPoint, direction)
    ZoomAll
End Sub

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 08:59

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部