乐筑天下

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

[编程交流] Select all or convert *X### An

[复制链接]

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-5 20:00:26 | 显示全部楼层 |阅读模式
I need a way to select all the *X anonymous blocks (Hatches) and either convert to regular blocks, back into a hatch or just delete them.
 
QSelect will only do it one at a time, wildcard doesn't seem to work, Filter doesn't appear to recognize anonymous blocks, either.
 
I have a lot to do, one at a time , while not impossible for one drawing, I have several .dwg I would like to do.
 
Thanks in advance.
 
Here is a drawing with one *X in it.
Anonymous Hatch.dwg
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 20:22:02 | 显示全部楼层
Here's some quick code to select all blocks in the active layout/viewport with block names starting "*X":
  1. (defun c:myblksel nil   (sssetfirst nil       (ssget "_X"           (list              '(0 . "INSERT")              '(2 . "`*X*")               (if (= 1 (getvar 'cvport))                   (cons 410 (getvar 'ctab))                  '(410 . "Model")               )           )       )   )   (princ))
The code could of course be modified to convert/explode/delete if necessary.
 
Lee
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-5 20:43:34 | 显示全部楼层
Thanks!!
 
Works a treat, I was surprised Filter didn't handle these.
 
Would have been nice to convert them, but I just mainly wanted them gone and they aren't really necessary for my current work.
 
Once again, I appreciate this.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 20:47:55 | 显示全部楼层
No worries Steve, you're welcome!
回复

使用道具 举报

VVA

1

主题

308

帖子

308

银币

初来乍到

Rank: 1

铜币
8
发表于 2022-7-5 21:02:50 | 显示全部楼层
Try to use U2B or U2BM command from here (download         bgtools2.32.zip from #1)
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-12 12:48 , Processed in 0.549861 second(s), 62 queries .

© 2020-2025 乐筑天下

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