How to check if a family symbol is used in Routing Preferences

How to check if a family symbol is used in Routing Preferences

dev
Contributor Contributor
327 Views
2 Replies
Message 1 of 3

How to check if a family symbol is used in Routing Preferences

dev
Contributor
Contributor

Hi,

 

Is there a performant way of checking if a FamilySymbol is used in routing preferences?

I tried with GetDependentElements() method but it doesn't handle the routing preferences.

 

My use case is that I have to update the routing preferences of a duct type with new family symbols, but I also want to cleanup the old ones if they are not used anywhere (e.g. in the model itself and the routing preferences of other duct types).

 

We can consider this as another request for a Purge API.

 

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

IbrahimNaeem
Advocate
Advocate

1. collect all duct types. 

2. iterate through them in routing preferences per each routing preference group and store all family symbols. 

3. check if the current symbol is not a member of the above collection, then remove it. 

 

Hope this helps. 

0 Likes
Message 3 of 3

dev
Contributor
Contributor

Thanks, this is the fallback brute force solution.

0 Likes