乐筑天下

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

[编程交流] vba - Grab the intersection po

[复制链接]

1

主题

1

帖子

0

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 22:08:26 | 显示全部楼层 |阅读模式
Hey guys,
 
I wrote to ask for some help about the VBA coding in AutoCAD. I have some circles as well as some lines attached to the edge of each circle in my map. Now I'm supposed to extend the line to the center point of each circle. Since there are thousands of circles in the map, I'd like to use VBA macro to automatically extend the lines one by one.
 
My problem is that how can I grab the intersection point at each circle. I have no idea what command I can use to get the location of the intersection point.
 
The second problem is that some lines even don't rest on the edge of the circle. So I should grab the endpoint closest to each circle and change the right end point to the center of the circle. Is there anyway I can use VBA command to find the nearest endpoint?
 
Note: All the circles and lines are in the pline format.
 
Thanks a lot for your time to see my post. Any suggestions or codes will be highly appreciated!
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 23:48:04 | 显示全部楼层
Please post a image or dwg etc so its a bit clearer to understand a before and after. A circle has a centre pt thats easy to find and making a vertice re pline go to center is again easy.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-4 11:11 , Processed in 0.928659 second(s), 56 queries .

© 2020-2025 乐筑天下

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