Michaels 发表于 2022-7-6 09:43:58

添加ssget以选择特定B

你好
 
如何将选择集添加到这些代码中以获得特定块?
 

(if (setq ss (ssget "_:L" '((0 . "INSERT"))))
   (progn

非常感谢。

pBe 发表于 2022-7-6 09:49:41

2

alanjt 发表于 2022-7-6 09:52:27

......................

Michaels 发表于 2022-7-6 09:55:36

alanjt 发表于 2022-7-6 09:57:53

but not always needed. :wink:

Michaels 发表于 2022-7-6 10:03:04

 
Now it is new to me.

Michaels 发表于 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.

Lee Mac 发表于 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...   
 
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

Michaels 发表于 2022-7-6 10:10:56

I am sorry , it's not clear enough yet.
 
many thanks.

Lee Mac 发表于 2022-7-6 10:15:42

 
Which part isn't clear?
页: [1] 2
查看完整版本: 添加ssget以选择特定B