Check if selected element is of type Systemfamily

Check if selected element is of type Systemfamily

Anonymous
Not applicable
2,577 Views
2 Replies
Message 1 of 3

Check if selected element is of type Systemfamily

Anonymous
Not applicable

When a user makes an selection, i want it to check if the selection is a normal family, or a family that is a system family (Walls/Floors/beams/ceiling/...)

 

Im unsure how i should handle this.

 

I was thinking i could check for the Element.Category.Name, though this might not be a very solid way to check as it depends on the languish if a "Wall" is called a "Wall" or something else.

 

Is there some way to check if the element.Category if of the type BuiltinCategory ? is that sufficient enough in this case?

 

Any advice what would be a solid way to make this check ?

0 Likes
Accepted solutions (1)
2,578 Views
2 Replies
Replies (2)
Message 2 of 3

GonçaloFeio1321
Enthusiast
Enthusiast
Accepted solution

Check for the type of the element.

Non system families are (or are derived from) FamilyInstance.

0 Likes
Message 3 of 3

Anonymous
Not applicable

thanks, got it to work to check the TypeOf

0 Likes