Floor Slab Outlines - Query Wall Constraints

I had a quick look around google and similar topics, but I couldn’t find anything in a reasonable amount of time.

I am re-building a structural model and looking for a way to check which slabs have been drawn with the wall-constraints command, and also to group those associated walls with that slab in dynamo.

Here’s what I don’t know how to do:

  1. Collect sketch and test if the sketch line is associated with a wall.
  2. Get the wall associated with the sketch line.

Any help is appreciated…and unfortunately, I have zero python skills, aside from copy-pasting code between the dynamo forum and the script node.