乐筑天下

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

[编程交流] Fix 'unselectable' o

[复制链接]

10

主题

26

帖子

16

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 10:39:59 | 显示全部楼层 |阅读模式
It is not an uncommon problem for AutoCAD users to find unselectable or phantom elements in their drawings.
 
An effective remedy to this issue are the following steps:
 
1. select all
2. erase
3. "oops"
 
...then the unselectable element become selectable, and you get on with your day.
 
We have received a set of drawings where these phantom elements crop up quite regularly.
 
I want to make a lisp, and then a button, to run the commands listed above.
 
I can't quite get it to work right. This is what I've done:
 
(defun c:fixphantoms ()
(command "_ai_selall")
(command "_.erase")
(command "oops")
)
(princ)
)
 
If I run this is leaves me at a position where I am prompted to select objects (which I don't want).
 
If I go: Cntrl+A, then press delete, then type "oops", it's all over and my phantoms are fixed.
 
Can someone please advise how I can change the lisp code so that the three commands get executed and I'm not at a prompt to 'select objects'.
 
Thanks
回复

使用道具 举报

10

主题

109

帖子

99

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 11:17:49 | 显示全部楼层
Try writing the command so : (command "_ai_selall" "")
回复

使用道具 举报

10

主题

26

帖子

16

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 11:30:00 | 显示全部楼层
Thanks CALCAD
 
Gave that a try, but I'm still having the same issue
where, after running "fixphantoms", I'm prompted to select objects.
 
Cheers for the suggestion
回复

使用道具 举报

10

主题

109

帖子

99

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 11:45:38 | 显示全部楼层
hosannabizarre,
  Sorry, I thought that would work, but alas. I don't have the ai_selall command in my Bricscad or Intellicad, so I don't know the proper syntax. You might try Selgrips as in : (command "._selgrips" "all" ""), which may accomplish the same thing. Just a thought.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-2 20:39 , Processed in 1.200606 second(s), 60 queries .

© 2020-2025 乐筑天下

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