Getting Parameters of the analytical Model

Hello,

i want to filter a list of columns according to their levels in the analytical model, but I don’t know how to get the parameters of the analytical model, I can only get those of the geometry model. In the picture you can see the code for filtering by the geometry levels.

I hope you understand my problem.
Thank you!

1 Like

@klara.steinMZ7FJ ,

is your analitical model active in the view?


As far as I know, no package includes easy access to the Analytical Model. Easiest is just to use a Python node. GetAnalyticalModel() allows access to the Analytical Model of your columns.

So you could just loop through your elements, get the Analytical Model and get your Level parameter.

For example:

import sys
import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
dataEnteringNode = IN

#Code:
output = []

#Inputs: Your columns and the preferred level
elements = UnwrapElement(IN[0])
level = UnwrapElement(IN[1])

for e in elements:
	elemAna = e.GetAnalyticalModel()
	if elemAna.get_Parameter(BuiltInParameter.ANALYTICAL_MODEL_COLUMN_BASE_EXTENSION).AsElementId() == level.Id:
		output.append(e)

OUT = output

Hope that helps ~

Thank you, It worked with that!