Python Node GetCompoundStructure() Fails on WallType

I’d like to call:

in a python node in Dynamo but I’m getting an error that says WallType doesn’t have an “attribute GetCompoundStructure” which seems false given the Revit API documentation. All I can think of is that I’m not importing the Revit API properly. Could someone please check to see what I’ve done wrong?

I’m working in Dynamo 2.0 and Revit 2017.2


Try unwrapping your input

element = UnwrapElement(IN[0])

Thanks for the suggestion, unfortunately it didn’t help. With your suggestion the error reads “FamilySymbol” has no attribute GetCompoundStructure… :confused:

@nicolass Please post your dyn (or a link)

Google drive link to the DYN file


1 Like

@nicolass It’s working for me in Revit 2018.3 & Dynamo 2.0.2


Hmmm I think I may have to uninstall and reinstall Dynamo… what a pain. Is there some mismatch between Dynamo 2.0 and Revit 2017?

@nicolass it works also in Revit 2017.2.3. Try upgrading Dynamo and Revit?

Thanks - yeah just reinstalled Dynamo and it’s still not working. Dynamo 2.0.2 and Revit 2017.2.3 very strange and very annoying.


I might be wrong, but you are feeding Elements of Category, where you need to feed Types?

See if this is useful?

Or you can get types like this? (thanks to Clockwork)

Hope that helps,


Hi All - fixed this during the daylight as is often the case. Turns out the call was failing on a few walls in the project, used try except and it worked. Thanks for all your help.

I think something you may also want to look at is determining the WallKind.Basic == WallType.Kind to filter out Curtain walls and stacked walls etc. This will help you filter out problematic walls.

I believe the Clockwork package has nodes for this to help.

API Reference:

1 Like

I have nodes for compound structures… why invent the wheel one more?