乐筑天下

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

[编程交流] (getpoint) wont set new coordi

[复制链接]

218

主题

699

帖子

483

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1090
发表于 2022-7-5 22:57:06 | 显示全部楼层 |阅读模式
  1. (setq plst (cons (getpoint "\nPick first point") plts ))      (while    (setq plst (cons  (getpoint  (getvar "LASTPOINT") "\nPick next point") plst ))   )
回复

使用道具 举报

0

主题

99

帖子

99

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-5 23:07:24 | 显示全部楼层
Shay,
 
Don't really understand your question. I think you are implying about the rubber band effect of getpoint function.
 
try this:
 
  1. (setq plst (cons (getpoint "\nPick first point") plst ))     (while plst    (setq plst (cons  (getpoint  (car plst) "\nPick next point") plst ))        ;(entmakex (list (cons 0 "LINE") (cons 10 (car plst)) (cons 11 (cadr plst)))))
 
回复

使用道具 举报

218

主题

699

帖子

483

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1090
发表于 2022-7-5 23:14:22 | 显示全部楼层
 
thanks
didnt think about this
 
why (getpoint) clicks are not saved in lastpoint?
回复

使用道具 举报

0

主题

99

帖子

99

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-5 23:23:00 | 显示全部楼层
 
Bump, sorry don't know the answer.
 
On your code that lastpoint was saved on your plst list but just didn't show the visual effect that you want to achieve.
回复

使用道具 举报

218

主题

699

帖子

483

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1090
发表于 2022-7-5 23:34:21 | 显示全部楼层
Bdw have u notice the code  store  nil recevied by getpoint?
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 23:35:37 | 显示全部楼层
This is short and sweet may be usefull, lots of get pline pts code then just erase last but points still exist.
 
  1. ; create pline by picking points press enter when finished(command "_pline") (while (= (getvar "cmdactive") 1 ) (command pause))
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:43:58 | 显示全部楼层
Samifox, from what it seems, that system variable is set only by native commands, not AutoLISP.
回复

使用道具 举报

218

主题

699

帖子

483

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1090
发表于 2022-7-5 23:49:55 | 显示全部楼层
 
thanks Bigal, i didnt know about that trick
 
 
 
yap....relay on lisp...not autocad:glare:
thanks
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 00:00:40 | 显示全部楼层
I stumbled on the code can not remember where would acknowledge author.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 03:28 , Processed in 0.378780 second(s), 70 queries .

© 2020-2025 乐筑天下

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