乐筑天下

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

[编程交流] Draw point along polyline, giv

[复制链接]

1

主题

1

帖子

0

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:29:35 | 显示全部楼层 |阅读模式
friends:
How can we Draw a point along selected polyline, given length from beginning of this polyline using lisp or visual basic?
Thank you
回复

使用道具 举报

1

主题

19

帖子

18

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:51:54 | 显示全部楼层
To draw a point along selected polyline you can use Divide command or Measure command or use the Auto Lips to combine the steps to a new Lisp routine.
To give the length of polyline you can refer this following file:
Hope this helps
Cheer!!
ADDLEN.lsp
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 08:01:10 | 显示全部楼层
Perhaps see here:
 
http://www.cadtutor.net/forum/showthread.php?p=210739#post210739
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 08:09:21 | 显示全部楼层
you could try this
  1. ;places point at specified station along a polyline, measured from start LPS 2008(defun c:pop ()(vl-load-com)(setq oldosnap (getvar "osmode"))(setvar "osmode" 0)(command "ucs" "w")(setvar "pdmode" 3); if your pdmode is already set to what you want, remove or comment this line(setq ob (entsel "Select curve: "))(setq p2 (getreal "\n Specify Distance : "))(setq obj (vlax-ename->vla-object (car ob)))(setq pt1 (vlax-curve-getPointAtDist Obj p2))(command "Point" pt1)(command "ucs" "p")(setvar "osmode" oldosnap)(princ))
回复

使用道具 举报

0

主题

5

帖子

5

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-6 08:24:18 | 显示全部楼层
calculate the Length off a polyline from begin till a point                
 
                                                                                                                                                                                                                                                                                                                         I want to know the length of a line from the begin till the point where
I click or where the line cross a other line.
I can get the line and i can find where the intersection points are
with VBA but I can NOT find a function that calculate the the exact
length from begin to the intersection.
Can anyone help me to find the good way.
 
thank u all,
回复

使用道具 举报

3

主题

14

帖子

11

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 08:40:51 | 显示全部楼层
Try using a combination of these:
 
  Start Point: (vlax-curve-getstartpoint Obj)
  End Point: (vlax-curve-getendpoint Onj)
  Distance at Point: (vlax-curve-getDistAtPoint Obj pt)
  Intersection: (vlax-invoke Obj 'IntersectWith Obj2 acExtendNone)
 
  And then subtract distance between your start point and distance at your intersection point/click point.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 05:03 , Processed in 1.034099 second(s), 64 queries .

© 2020-2025 乐筑天下

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