Detect and set structural usage of Structural Framing elements

For context: I work for a contractor and need to quantify structural framing members based on their structural usage (Girder, Joist primarily). Easy enough using a schedule. However, my source for this is the engineer’s model, and not all engineers assign anything to the Structural Usage parameter. I know I can set the parameter via Dynamo, but what I need to figure out is how to detect what structural usage each one should be. What I’m thinking is something like if the Structural Framing instance is connected at each end to a column, set its Structural Usage to Girder. If it is connected to a Girder at either end, set its Structural Usage to Joist. I know there may be one-offs that I’ll need to address, but the above process describes what I’m trying to do for now.

Are there parameters that would indicate what each end of a Structural Framing instance is attached to that I can utilize for this? If so, can anyone suggest the best method to get this information?

Hello,
here are 2 deliberately incomplete approaches

2nd geometric approach if <= 4 joist intersections
beyond beams

You have to try to show what you have already tried to do on your side to promote your learning

Cordially
christian.stan