Retrieving Built-In Parameters with Python

Hi all,

I’m trying to access the Built In ‘Function’ parameter for a set of Curtain Wall families using Python.

I’m feeding a list of curtain walls into the below script and am iterating over the list to try retrieve the Built In parameter. However, my output is returning as null. Any idea where I am going wrong here?

I’m using the boilerplate setup code from the dynamo python primer which is quite long, so I’ve omitted it for legibility.

Thanks for your help :slight_smile:

element = UnwrapElement(IN[0])

cwfunction =
for i in element:
cwfunction.append(i.get_Parameter(BuiltInParameter.FUNCTION_PARAM))

OUT = cwfunction

Not sure what the built in parameter you’re looking at is/does, but you can get the ‘function’ that’s shown under type parameters by calling this method:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import WallFunction

walls = UnwrapElement(IN[0])
functions = []

for wall in walls:
	functions.append(wall.WallType.Function)

OUT = functions

Yep that works - probably should have checked wall methods before heading straight into Built In one. Thank you!