乐筑天下

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

[编程交流] 添加ssget以选择特定B

[复制链接]

55

主题

293

帖子

239

银币

后起之秀

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

铜币
275
发表于 2022-7-6 09:43:58 | 显示全部楼层 |阅读模式
你好
 
如何将选择集添加到这些代码中以获得特定块?
 
  1. (if (setq ss (ssget "_:L" '((0 . "INSERT"))))
  2.    (progn

非常感谢。
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

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

铜币
211
发表于 2022-7-6 09:49:41 | 显示全部楼层
  1. 2
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 09:52:27 | 显示全部楼层
......................
回复

使用道具 举报

55

主题

293

帖子

239

银币

后起之秀

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

铜币
275
发表于 2022-7-6 09:55:36 | 显示全部楼层
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 09:57:53 | 显示全部楼层
but not always needed. :wink:
回复

使用道具 举报

55

主题

293

帖子

239

银币

后起之秀

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

铜币
275
发表于 2022-7-6 10:03:04 | 显示全部楼层
 
Now it is new to me.
回复

使用道具 举报

55

主题

293

帖子

239

银币

后起之秀

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

铜币
275
发表于 2022-7-6 10:05:38 | 显示全部楼层
 
Great work pBe. thank you so much.
 
But that's not what I am looking forward .
 
As you for sure know that the second part of my codes is to change the color of circles in Block Definitions , but I want to change the color of circles
in the selected Blocks only by the use of "ssget" to be able to select two to three blocks at the same time .
 
Appreciated a lot.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:07:54 | 显示全部楼层
Lol what's with the 'M:CAD' (you) or 'TH:CAD' (Tharwat) for your variables? You guys must think the same way...   [or are the same person]
 
Back to the original question -
 
Note that you won't be able to change specific Inserts since you are modifying the block definition - which will be applied to all Inserts for that definition.
 
You will need to add a filtered selection using ssget, perhaps with the DXF Group 2 as pBe correctly states, then, when iterating through the set, check that you haven't already processed the block name by checking against a list of processed block names, and if not, retrieve the block definition and perform your modifications, then when done, add the block name to the list of blocks already processed.
 
Lee
回复

使用道具 举报

55

主题

293

帖子

239

银币

后起之秀

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

铜币
275
发表于 2022-7-6 10:10:56 | 显示全部楼层
I am sorry , it's not clear enough yet.
 
many thanks.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:15:42 | 显示全部楼层
 
Which part isn't clear?
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 23:16 , Processed in 0.404808 second(s), 83 queries .

© 2020-2025 乐筑天下

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