Can't create an Instance out of ISelectionFilter Custom Class

Hi Seniors,

I’m new to Revit API and im in the process of learning it.

The thing is , I’m trying to implement the IselectionFilter interface in my python code in Dynamo.

When i try to create an instancce out of my custom class, a warning pop up and say i ISelectionFilter take exactly 1 argument.


then, i just create a arbitary parameter x, and call the function with a argument of 1.

But it say the object does not implement IselectionFilter.

So what have i done wrong here?

Interfaces are not supported by CPython. This isn’t something that the Dynamo team can realistically fix - Python owns that - so your best bet is to move to an alternative engine.

If you want to stick with Python, the PythonNet engine would be my first recommendation if you are in 2025 or newer. If you’re in older builds then IronPython3 would be the way to go.

Most stable would be moving to C# which is what the API is built for. However that is a bigger lift, requiring composing the nodes in an IDE and managing package deployment.