Fetching Type Names

Hi everyone,

I was rebuilding an existing definition in to make it more concise when I noticed some strange behaviour. While looking to fetch family type names, I found there were some element types which could be put together into a list, while there were some which would throw up errors when introduced to the same list.

After a bit of trial and error I’ve collecting together a few types which will ‘play nicely together’ when introduced to the same list. The below screenshot is everything working fine:

Yet if I switch the CurtainSystemTypes to the top list (everything should be fine) this seems to upset the bottom list.

By reading the output from All Elements of Type there does seem to be some inconsistency going on: some of the elements are coming through by their family type name (e.g. Generic 150mm), some are coming through as a generic type name (e.g. RoofType) and some are coming through prefixed with “Family Type:”. :thinking:

Does this kind of behaviour make sense to anyone?

Many thanks in advance :slight_smile:

FamilyType.Name probably only works for loadable families, not system families.
You can try Clockwork’s Element.Name+ - it should return the name of most elements…

1 Like

Yeah, I’d say that’s a hole in one :wink: Thanks Andreas, great stuff as ever!