Replace/Remove letters from list


#1

So, I’m creating lists of revit parameters for export to excel. Some of my parameters contain unit notation (m, m^2), which I want removed or replaced with “0”. Unfortunately, all of the replace/remove nodes that I’ve seen are for strings, not lists. I can imagine two approaches:

  1. A node that replace/removes items from a list.

  2. A method for applying string nodes to lists.

Thanks in advance,


#2

I you want to get rid of units, just use a formula node, like so:

stripunits


#3

Here’s a picture of the Element.GetParameterValueByName nodes leading up to Create.List.

Dynamo_Units

 

 

On a minor note: The parameters come out as metric (except for Area) even if the base file is imperial. Is there a way to convert units globally, or pull unit system from the RVT?


#4

That works! Thank you.

What does the “a” do?


#5

The “a” acts as a variable that can be filled by the input it generates in the Formula node. One of the handy features of the Formula node is that it completely ignores units. That’s why you can use it to strip units.

With regard to your other question about the units of parameters pulled from a Revit element - I am on the 0.7.5 release candidate and everything I receive is in metric.

Generally, units are still a rather tricky subject in Dynamo. Have a look at these threads for more fun with units: