How to put the frames on an inclined base? Rotation around the local X-axis

I place reinforced concrete frames at the coordinates of the railway track and rotate them around the local Z-axis (FamilyInstance.SetRotation) in order to align them in the XY plane. The problem is that the tunnel is sloping. How to set this slope to frames? The frames stand horizontally and a ladder is obtained.
Maybe they can be some how rotated around the local X-axis?
What should I add to the code for such rotation?

PS: Frames should lie on an inclined base.



This is not do-able in Dynamo like this. You shoud add a parameter within the Family for slope. Then you can change that parameter in Dynamo.

Could you clearly show how this can be done?
How to add a parameter to the family and how to use it in a Dynamo?

I would Model this as an adaptive component rather than a point based family, allowing you to use multiple points to place the element. I’d go with 3 points - the two the rear corners and the center of the front edge - to be sure you don’t get accidental rotation about the local Y axis.

can you give an example of how this can be implemented using the example of a parallelipiped? I’ve thought about it, but I don’t know how to implement it…

Best to give it a shot building an adaptive component version on your own as I don’t have time to build a data set, a family, and a means to programmatically place said family with Dynamo.

The help documentation for the core parts of this authoring environment can be found here Adaptive Components | Revit 2022 | Autodesk Knowledge Network, and there are TONS of good ‘follow along’ videos showing how to build adaptive components on the web already.