乐筑天下

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

[编程交流] What's wrong in my code

[复制链接]

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 22:52:10 | 显示全部楼层 |阅读模式
What's wrong in my code , i wanna after running this code draw an arc from specified point to other one .but when run the code start from previously point
How can deactivate start from previously point to new one ???
 
  1. (COMMAND "_PLINE" "" "A" "D")
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 23:06:27 | 显示全部楼层
Just pick point 1st not tested
 
  1. (DEFUN C:AR ( / pt)(setq pt (getpoint "\nPick start point"))(COMMAND "_PLINE" Pt "A" "D"))
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 23:14:57 | 显示全部楼层
thanxxxxxxxxxx bigal that's okkkkkkkkkkk
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:24:58 | 显示全部楼层
The empty string you used as first input is equivalent to  and this will triger that behavior. To keep you code as one statement try:
  1. (DEFUN C:AR ()(COMMAND "_PLINE"[color=red] pause[/color] "A" "D"))
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:30:39 | 显示全部楼层
Hosyn, if you intend to add other code after that polyline draw, just ensure that you don't leave AutoLISP interpreter:
  1. (DEFUN C:AR ()(COMMAND "_PLINE" pause "A" "D")[color=magenta] (while (> (getvar "CMDACTIVE") 0) (command pause))(prompt "Done!")   ;this statement is reached[/color])
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 23:36:55 | 显示全部楼层
thnxxxxxxxxxxx to Msasu and Bigal greaaaaaaaaaaaat:D
And I have a another question about::: is that possible use above define command  "AR" and call and run in another lisp file like that:
  1. (defun c:aaa()(command  "_INSERT" "b1")(command  "_AR" ""))
If answer no , How we can call and run this command in new lisp file??
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 23:46:24 | 显示全部楼层
just change this
 
  1. (command "_AR" "")to(c:ar)
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 23:54:52 | 显示全部楼层
Thanxxxxxxxxxxxxxxxxxxxx again BIGAL ,appreciate.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 03:00 , Processed in 0.512504 second(s), 77 queries .

© 2020-2025 乐筑天下

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