Automatic Dimensions of Beam System in an inclined Reference Plane

Hi, I created this dynamo file to add dimensions to a beam system elements which works perfect when the beam system is placed in a flat workplane, like a Level 01, etc. However, when I create an inclined reference (called “inclined ref”) in the attached file, and use it as a workplane for the new beam system, the dynamo file doesn’t work. If someone can give me a clue how to achieve that?

The only package I am allowed to use is ‘Data_shapes’ and also I can use a python script node. Other package or language is not allowed in my company.
Question File.dyn (13.9 KB)
Question File.rvt (932 KB)