Convert Selection to FilteredElementConnector?

Convert Selection to FilteredElementConnector?

wils02
Enthusiast Enthusiast
416 Views
2 Replies
Message 1 of 3

Convert Selection to FilteredElementConnector?

wils02
Enthusiast
Enthusiast

Okay here goes nothing:

 

I am trying to implement the PickBox example that is commonly shown http://help.autodesk.com/view/RVT/2014/RUS/?guid=GUID-97372731-5ACA-4EB7-ABDF-7E6B56640DA2

 

with the idea to select multiple elements at the same time and then use a FilteredElementCollector to make sure I only retain supply air terminals.

 

For the life of me, I cannot figure out how to do this, and any help would be greatly appreciated!

 

wils02

0 Likes
417 Views
2 Replies
Replies (2)
Message 2 of 3

arnostlobel
Alumni
Alumni

Hello Wils02:

 

One of the FilteredElementCollector constructors takes a list of element Ids. If such a list is provided then the collector will filter the given elements only, Thus if you get a list of elements from the Selection object, pass it over to the collector. That should do the trick you're after. 

Arnošt Löbel
0 Likes
Message 3 of 3

wils02
Enthusiast
Enthusiast

AWesome thanks for the reply. That makes sense and I will give that a shot.

0 Likes