乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 43|回复: 2

[VBA] 如何交互取点

[复制链接]
czj

3

主题

7

帖子

2

银币

初来乍到

Rank: 1

铜币
19
发表于 2005-1-17 14:25:00 | 显示全部楼层 |阅读模式
vba         我把帮助里的代码放到按钮里,会出现错误,求助
Dim returnPnt As Variant
                         
                         ' Return a point using a prompt
                         returnPnt = ThisDrawing.Utility.GetPoint(, "Enter a point: ")
                         MsgBox "The WCS of the point is: " & returnPnt(0) & ", " & returnPnt(1) & ", " & returnPnt(2) & vbCrLf & _
                                                                                         "(Enter the next value without prompting.)", , "GetPoint Example"
                         
                         ' Return a point, no prompt
                         returnPnt = ThisDrawing.Utility.GetPoint
                         MsgBox "The WCS of the point is: " & returnPnt(0) & ", " & returnPnt(1) & ", " & returnPnt(2), , "GetPoint Example"
                         
                         ' Return a point using a base point and a prompt
                         Dim basePnt(0 To 2) As Double
                         basePnt(0) = 2#: basePnt(1) = 2#: basePnt(2) = 0#
                         returnPnt = ThisDrawing.Utility.GetPoint(basePnt, "Enter a point: ")
                         MsgBox "The WCS of the point is: " & returnPnt(0) & ", " & returnPnt(1) & ", " & returnPnt(2)
                         
                         ' Create a line from the base point and the last point entered
                         Dim lineObj As AcadLine
                         Set lineObj = ThisDrawing.ModelSpace.AddLine(basePnt, returnPnt)
                         ZoomAll
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2005-1-17 16:08:00 | 显示全部楼层
前面加me.hide
后面加me.show
回复

使用道具 举报

czj

3

主题

7

帖子

2

银币

初来乍到

Rank: 1

铜币
19
发表于 2005-1-17 16:41:00 | 显示全部楼层
谢谢
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-16 19:43 , Processed in 3.136366 second(s), 58 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表