Modify Built in Parameter of Window glass heat transfer coefficient using python

Dear Network,
I am trying to set heat transfer coefficient (I assumed this is a built in parameter named - —ANALYTICAL_HEAT_TRANSFER_COEFFICIENT) of window glass using following python command,

But this results following error in python node .
Warning: AttributeError : ‘NoneType’ object has no attribute ‘Set’ [’ File “”, line 32, in \n’]

your help is appreciated!

#Built In parameters cannot be looked up like that.
p = i.get_Parameter(BuiltInParameter."ANALYTICAL_HEAT_TRANSFER_COEFFICIENT")

#No need here for the "ElementId" as that isn't the type of value stored
p.Set(3.5)
1 Like

Hi,
Thank you very much for your prompt reply. I modified my code accordingly. Now python code do not output any errors, yet the properties are not updated in the Window Family Type.

Do you find any error in the code?

From Revit Look up tool the parameter can be identified as “Not ReadOnly”

Are you using Types or Instances? The reason I ask is because the type parameters clearly show a value, but then Lookup shoes it’s 0. So, not sure if they are the same parameters.

Alternative:

i.LookupParameter("Heat Transfer Coefficient (U)").Set(3.5)

1 Like

Thank you for the response. Well, alternative method proposed works well.

I think I have misunderstood changing of Revit parameters. This link ( Built-In Parameters - Dynamo Python Primer (gitbook.io)) helped me to understand a bit about parameters and classes in revit.

Actually I am trying to extract data from Type level and IN[0] is connected to All elements of category node which gives outputs at Instance Level . Then I had to go downstream with following code modification.

for i in UnwrapElement(elements):
family_type_id = i.GetTypeId()
family_type = doc.GetElement(family_type_id)

1 Like