Cancel
Showing results for 
Search instead for 
Did you mean: 

Create a set from an existing set based on element type

Pioneer
Pioneer

Hi,

 

I added elements from a selected group into a Set X using ADDGROUP. Now i need to create a new Set Y from Set X to based on element type. I looked into addsetrule and addrule. Addsetrule is where a set is created from an existing set...but looks like using using element type does not work there. Any thoughts ?

 

Thank you.

K

4 REPLIES

Re: Create a set from an existing set based on element type

Siemens Genius Siemens Genius
Siemens Genius

This might not be the best way but might get you what you need is to have 3 sets. The first set would be set1.AddGroup(...). Then set2.AddRule(....) where you add your elements by type. Then set3.AddCommon(set1.ID, set2.ID) 

Re: Create a set from an existing set based on element type

Pioneer
Pioneer

Thank you. That will work for now. I did not know abt addcommon.

Re: Create a set from an existing set based on element type

Siemens Phenom Siemens Phenom
Siemens Phenom

Just a point of clarification to what was already said. It isn't that using element type doesn't work with AddSetRule.. it does. It is just that AddSetRule doesn't work quite as you might have expected. It requires that the Set that you are providing is filled with the "types" that you want to select or other appropriate values based on the rule you choose. It can't be filled with the IDs of elements to limit the selection. That would be an interesting future enhancement, but is not there today. The suggestion to use AddCommon is the correct solution.

Re: Create a set from an existing set based on element type

Pioneer
Pioneer

Thanks