乐筑天下

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

VBA - Getting an entity at a o

[复制链接]

9

主题

59

帖子

38

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
58
发表于 2022-7-6 22:43:28 | 显示全部楼层 |阅读模式
I'm trying in VBA to allow the user to select a line at a specific point. Something like getPoint (with the osnap visible) but in fact getting both - the coordinates of the point of selection and the selected object. It should be almost like using the GetEntity, but there I can't control visibly the point of selection.
 
Any ideas?
回复

使用道具 举报

14

主题

42

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-6 23:01:09 | 显示全部楼层
I think you'll first have to select the line, and then select the point. That's the easy way out :-)
回复

使用道具 举报

9

主题

59

帖子

38

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
58
发表于 2022-7-6 23:10:22 | 显示全部楼层
I know I can do it this way, but I'd still like to perform the operation with one selection only...
回复

使用道具 举报

14

主题

42

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-6 23:22:51 | 显示全部楼层
Well, then I haven't got a better idea  Sorry!
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 23:29:55 | 显示全部楼层
entsel gives entity and pick point but!! pick point is not necessarily on actual object but can be real close. in lsp VBA ?
回复

使用道具 举报

9

主题

59

帖子

38

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
58
发表于 2022-7-6 23:35:41 | 显示全部楼层
It's VBA. I kind of managed to pick an object at osnap point using GetPoint, where osnap works, and then iterate trough all the objects to find which of them can be picked at this point. I'd like there was a better solution but it turs out that this works quite fast  even in case of several thousands of objects
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 23:46:42 | 显示全部楼层
Another way if you can pick the object using snaps then retrieve the variable lastpoint then select object at this point ?
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2024-11-22 02:05 , Processed in 0.146076 second(s), 66 queries .

© 2020-2024 乐筑天下

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