Placing a line based family in a wall


I’m trying to make a script that places a line-based family at a point of my wall. Right now I made a face selection from my outside wall. I want to place a lintel at my windows on the right level.

This is my first idea.

I think I should end with something like this.

I hope you could help me.

Thanks in advance!

Or is this maybe an option?

Is it something like this you are attempting to place?

If so, can I ask why you aren’t implementing this in the window family?

Because I’m trying to create something like this for my company. Eventually my purpose is to link in an Revit file, select the windows or select faces of wall to create lines where my family will be placed on.

This is the next thing I tried but it gives me an error.

Warning: FamilyInstance.ByFace operation failed.
Family cannot be placed as hosted on an input face reference, because its FamilyPlacementType is not WorkPlaneBased
Parameter name: symbol

The family is workplane based so i don’t know why it says that.

Sharing a dummy rvt and the family would ease the proces of helping you :slight_smile: