Surface manual / automatic selected for placing facebased family

hi everyone,

I have made an script that filters the top face of an structural framing element. but when I put this into the familyinstance.byface node it will give an error… when I manually select the faces then its working fine.
my problem I don’t want to select every time an surface when I also can filter this surface. does anyone have a clue why this isn’t working? both are surfaces and I cant see the difference, see also script.

Whats the error say?
The watch may look the same but the structure (list structure) of what you feed into FamilyInstance.ByFace may be different.

screenshot of warning when I put filtering top face into the familyinstance.byface node.

Its saying that basically you’re not putting in the correct format into ‘face’ input

try using Object.Type node in both your manual and your filtered results to see what format your data is.

I have a feeling your manual one is a ‘revit’ face…but you filtered one is a dynamo ‘surface’ or something along those lines…

object.type seems the same… or do I use the wrong methode? I have also filtering the surface by topology.faces but did didn’t do the trick.

I have added the .dyn file if you want to look into it. filter topfaces.dyn (89.7 KB)

I do have the solution, I had to use Element.faces instead of Element.geometry and then it works :wink:

afbeelding