Convert element parameter to string

Hi,

I’m importing different Revit categories (Structural framing, columns etc) and want to extract various element parameters. When I’m using Element.Parameters I get the following output,
“Family : Construction timber”. For my purpose I am only interested in “Construction timber”, since that is the actual family. I would like to modify this output so I am only left with “Construction timber”, but since the output is a parameter and not a string, I do not know how to do it. I have not been able to find any method of converting Parameter to String.

Any suggestions? Would i.e. a code block do the trick?

You need to use GetParameterValueByName instead of GetParameter.

You can create string with code block as a sum of nothing string: example X+"" :smiley:, if you want to get rid of the parameter and : , you can split the string and get the second value resulting, but for what you want there’s directly a node that gives you the family name as string without this or the previous suggestion

Like this, @Nick_Boyts?

I still get error related to parameter type.

With respect to a code block that converts parameter to string, Im not able to find any litterature on this.

Thanks for feedback on my post.

Almost. Because the specific parameter you’re looking at returns an element (the family element) you need to get the Name of the element too. That will be a string that you can compare against your condition. You don’t need to check for a colon (:) once you have the correct value.

That worked, thank you. The Element.Name returns “50x150”, but this is actually the family type and not the family. The Family is “Konstruksjonsplank”. Is this a problem related to how the families are arranged in Revit, or is there a reasonable solution for this I can solve in Dynamo?

The solution is to use the family type to get the name of the parent family with the FamilyType.Family node like so: