乐筑天下

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

[编程交流] cancel insert doesn't wor

[复制链接]

20

主题

81

帖子

61

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 10:28:23 | 显示全部楼层 |阅读模式
I want to overwrite a block and not insert it. I use this code:
  
I have one lisp running just fine but now I want to use it for another lisp and it hangs on pick a point :@
And I have no idea why it does that....
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 10:37:54 | 显示全部楼层
Edit:
 
 
Technically, you are inserting the block. Your result is that the block definition within your drawing is 'overwritten' as a result of the "=" in the block name declaration.
 
Experiment with the pause function, to manually specify the insertion point:
 
  1. (command "._-insert" "TEMPLATE=TEMPLATE" pause)
 
 
If you simply want all blocks to be 'overwritten', then this may be what you want:
 
  1. (command "._-insert" "TEMPLATE=TEMPLATE" nil)
 
 
Hope this helps!
回复

使用道具 举报

20

主题

81

帖子

61

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 10:43:08 | 显示全部楼层
*sigh the "y" screwed things up it wasn't needed, I thought you needed to confirm overwriting?  (In another script of mine the "y" works just fine  )
@renderman You didn't get me exact right but helped any way  tnx
回复

使用道具 举报

20

主题

81

帖子

61

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 10:48:48 | 显示全部楼层
pffff the real problem was I was using script-pro and because I cancel the insert cmd script-pro thought hmm something got canceled lets just stop working...
I now used doc.lsp, could also insert the block and then delete it.
回复

使用道具 举报

48

主题

1073

帖子

1043

银币

后起之秀

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

铜币
238
发表于 2022-7-6 10:57:55 | 显示全部楼层
I usually insert the block and then ERASE L
回复

使用道具 举报

20

主题

81

帖子

61

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 11:02:15 | 显示全部楼层
I knew there was such a cmd but didn't know how it was called. Gonna try it out tnx!
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 11:08:25 | 显示全部楼层
  1. (command "._-insert" "NAME=" nil)
The equal will tell it to redefine an existing definition and cancel before block is actually inserted.
回复

使用道具 举报

48

主题

1073

帖子

1043

银币

后起之秀

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

铜币
238
发表于 2022-7-6 11:13:47 | 显示全部楼层
isn't it "NAME=" ?
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 11:17:25 | 显示全部楼层
Oops, you're correct. Not enough sleep.
回复

使用道具 举报

20

主题

81

帖子

61

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-6 11:24:49 | 显示全部楼层
Script-pro stops when you cancel a command. So I can't use nil.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 17:31 , Processed in 0.427698 second(s), 83 queries .

© 2020-2025 乐筑天下

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