Problems Getting Family Types by name

Hi everyone

I´d like get structural framing family types by name, but dont work.
I think both methods below are the same, but only one of them work
anybody know why?

Thanks in advance

Can you show us what you’ve tried so far?

Sorry, i forget the image:

You’re getting the text within the Text Note (which seems to have a break in it), not the name. You should be able to plug your list of elements directly into the FamilyInstance.GetType node.

Ill try

Like this?:

@jesusgarciaarquitect This should work (Element.ElementType node returns the TextNoteType “Element” of the collected text note elements. I added the Element .Name node just to show the names of the elements, which you may or may not choose to do depending on where you are going with this script.)

@Nick_Boyts I don’t believe Text Note Elements are treated as “Family Instances” but I could be wrong :thinking:

Yeah I just realized that. I think they’re system families.
There’s also a node for this exact occasion: TextNote.Typename :grin:

1 Like

@Nick_Boyts I didn’t use that node because I wasn’t sure if @jesusgarciaarquitect wanted the Type elements or just the names! But can get the elements from that node by adding the TextNoteType.ByName afterwards. :slight_smile:

1 Like

I dont speak english very well, but ill try it:

Id like to select some structural framing types whose name are the text “inside” text note.

For example, i have a tex note with a “30x30” text, then i want to select the 30x30 structural framing types.

And id like do it by te first method in the image below

Thanks

@jesusgarciaarquitect This process seems to work on my end. What is the error you are getting on that FamilyType.ByName node? (hover over the yellow text box above the node)

(si quiere ayuda en español, puede enviame un mensaje y puedo ayudase cuando tengo tiempo… o tal vez mejor, puede publicar aquí en inglés lo mejor que pueda, con su explicación en español debajo)

Thanks for answering

In your example, have u used Structural framing types?

In the image below u can see the error, one more thing, the list 1 and 2 looks like diferent, may be the error?

Thanks

Yes I used structural family types. It appears that your text notes all have an extra line/space beneath them like this:

"30x30

"
Try plugging your TextNote.Text string output into the “TrimTrailingWhiteSpace” node, and then into the FamilyType.ByName node and see if that works. :slight_smile:

2 Likes

Solved!!!
Thank u very much!!!
That was the problem, but in the model, the text have NOT got spaces at the end…:thinking:

Thanks a lot…

You’re welcome! :smiley:

I’m not sure how that could be. Just out of curiosity, did you type the text notes manually, or did they come from an exploded DWG?