Element.GetParameterValueByName Length Problem

Hello everyone,!!

I’m trying to get the Length value from an Element. The problem is that the output I obtain from Element.GetParameterValueByName is the Default Lenght from the based-lined family I want to insert on the model, instead the Lenght of the true length of the instance.

Can anyone help me? Thanks in advance.

For type parameter you need add the “Element.ElementType” node.

Thanks Vijay for your quick answer.

I think I’ve not explained properly my problem. I want to obtain the lenght for each instance. What I’m trying to show on my screenshots it’s that the value for the “Lenght” parameter of the instance is “21.22”, but the “Element.GetParameterValueByName” shows “1.35”, which is the default length of the family I’m using.

Thanks,

can you share your family?

Sure!

Auxiliar_Pasillo.rfa (308 KB)

Sew below image for you Reff.

Thanks Vijay. I’ve been working trying to find the problem on my script. It’s a weird thing. The first time I run the script Length it’s not ok on Element.GetParameterValueByName, the second time it’s ok…

1 Like