Insert line based detail component on top of every wall opening in floor plans

Hello everyone, My second post on this forum :). I would like to apply a line based detail component on top of all door and window openings of my floor plans. Please see the attached image. I have created a family (line based detail component) for this purpose, which I have to draw manually into the floor plans. Needless to say, this manual method is untenable for larger projects. So, I would like to be able to automate this using dynamo. Being very new to dynamo and visual programming in general I only think in general concepts, therefor I could really use your help of programming this! Below you can find my general idea of what I think that should happen:

  • First I filtered element list by parameter value, result: list of walls
  • Then, I was able to get the width of these walls, to be used later to set the width of the line based detail component
  • Next, I was able to get all openings in my selection of walls in a list.

This is how far I got, see attachment. The next step I think could be:

  • filter the element.insert list for doors and windows (I don’t want e.g. electrical equipment family’s), how to do this?
  • somehow get the starting point and end point of the door/window (relative to project or wall?), how to do this?
  • somehow draw/insert the line based detail component from previous start point to end point, doing so we would be almost there!
  • get the width of the host wall and set this width to the width parameter (instance) of the line based detail component.

Done! The sequence above is just a gut feeling of how I intuitively think it could work, if someone has a much better/faster way of getting things done, I can always modify (e.g. the family could go from line based to filled region, if that would be more convenient for a dynamo solution) I am looking forward to your insights!

Maybe look into nesting this into the door/window family itself?

Thank you for the suggestion, but unfortunately this is not an option. We are a metal stud builder who get an architectural model from the architect, which contains the doors and windows. I do not want to toil with someone elses geometry…

Any other suggestions anyone? Maybe on one of my sub questions? Thank you!