Roof Default Thickness to new text parameter

Hi,

as you know a roof has default thickness, but when we add a variable layer to it and modify that, that default thickness goes blank in schedule.

i created text based parameter called Thickness for roofs so i can manually enter that number there but i have a problem, i’d appreciate any help/ideas.

thanks

Capture

What does the error say?

Untitled

Well there ya go. That parameter type is not a string. It’s likely a number so you’ll have to convert your “Default Thickness” value before applying it to your new “Thickness” parameter.

same error

Other way around. You need to convert the string (Default Thickness) to a number.

Are you working in metric? Could be a units issue. It would be helpful if you showed more info.

i work in millimetric

i renamed my text based parameter to Thickness 2 and now this is the error
Untitled

this shouldn’t be zero!

That’s on the Revit end. You’ll have to look at your roof types.

have only 1 roof type and the thickness is 494

Ah. It’s because you’re trying to get a type parameter from an instance. You’re actually getting a value of null that’s converting to 0. Is Thickness/Thickness2 an instance parameter or a type parameter? You’ll want to get the Default Thickness value from the Roof Type then assign the Thickness value to either the same Type or the Instance depending on the parameter. You’ll probably need something like Element.Type to get the instance’s type.

there are 3 parameters

1- Thickness which is instance, revit default and not editable in properties panel and is locked to Default Thickness.
2- Default Thickness which is a Type Parameter and changes based on the structure layer thickness
3- Thickness 2 which is a text based type parameter that i created.

I gotcha. I was a little confused by your parameters. You’ll need to work with the element Types and not the instances.

1 Like

first it said the text parameter should be number,
i changed it to number and based on thickness, thickness 2 changed to 0
then i changed it to default thickness and this is the error i get

and just to mention, i can not use the instance parameter (Thickness)
cuz when i modify the roof with variable layers and points, it changes to 0!
so i have to get Default Thickness which is always a number and Type parameter.

Nick,

although it runs with error but it works!!!

the error says the parameter’s storage type is not a string, but it changes the number for me, so i’m good i guess … lol

try after the node Element.GetParamterValueByName the archilab node ToDouble and use that as input in value
Probably some rooftype have no Default Thickness the node ToDouble create in that case a zero and the OOTB node string.ToNumber creates null

1 Like