Family parameter Value

Hi there,

I’m trying to get a family parameter value in the family editor with python.

I’ve seen in the revitapidocs that we can’t get Values in the FamilyParameter propierties
https://www.revitapidocs.com/2022/7fbf26b7-0b8f-4e4e-3833-a95ff1bd58bd.htm

The thing is that Mr.Orchid(@erfajo ) has done it with his node:
imagen

I would like to know how to do it in order to get the value of a family parameter working in the family editor.
I’ve tried this, but as Revitapidocs says, ther’es no attibute for Value:

imagen
Thks

Manel

Have you looked into this class? FamilyManager Class

Hi Jacob,
Yes, Indeed.
I’ve looked that I could GetParameters, even SetValueString, but I can’t find how to get parameter value that is what I would like to achive.

Thks

Manel

Hello @Manel_Fernandez
to get the values of parameters, you need this class
here is a small example, (values ​​vary according to each type)

out = []	
if doc.IsFamilyDocument:
	famManager = doc.FamilyManager
	for familyType in famManager.Types:
		paraTypeDescription = famManager.get_Parameter(BuiltInParameter.ALL_MODEL_DESCRIPTION)
		typeDescriptionValue = familyType.AsString(paraTypeDescription)
		out.append([familyType.Name, paraTypeDescription.Definition.Name, typeDescriptionValue])
		
OUT = out
3 Likes