明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1581|回复: 2

[求助] 如何通过在getpoint 来定点来做引线

[复制链接]
发表于 2005-1-18 09:25:00 | 显示全部楼层 |阅读模式
我想做一条引线,通过getpoint        取点         ,并且屏幕如何能在一点和


二点之间有画线的痕迹
 楼主| 发表于 2005-1-18 10:07:00 | 显示全部楼层
Me.Hide
Dim basepoint1, basepoint2, basepoint3 As Variant
Dim leaderObj As AcadLeader
Dim points(0 To 8) As Double
Dim leaderType As Integer
Dim annotationObject As AcadObject ' Return a point using a prompt
basepoint1 = ThisDrawing.Utility.GetPoint(, "请输入引线第一个点: ")
basepoint2 = ThisDrawing.Utility.GetPoint(basepoint1, "请输入引线第二个点: ")
basepoint3 = ThisDrawing.Utility.GetPoint(basepoint2, "请输入引线第三个点: ")


points(0) = basepoint1(0): points(1) = basepoint1(1): points(2) = basepoint1(2)
points(3) = basepoint2(0): points(4) = basepoint2(1): points(5) = basepoint2(2)
points(6) = basepoint3(0): points(7) = basepoint3(1): points(8) = basepoint3(2) leaderType = acLineWithArrow
Set annotationObject = Nothing ' 在模型空间中创建引线对象
Set leaderObj = ThisDrawing.ModelSpace. _
AddLeader(points, annotationObject, leaderType) ZoomAll
发表于 2005-1-18 10:50:00 | 显示全部楼层
多谢了!刚才把代码测试了一下,真的很好,又学到了不少东西。


谢谢czj老师。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 21:05 , Processed in 0.155944 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表