You have to be wary about how you do this. The Revit coordinate system can be quite complicated depending on how the project was set up. Let me explain…
Revit has three points of interest and a rotation…
- Project Base Point
- Survey Point
- and the illusive Internal Origin Point
How the project coordinates have been set up is very important to how Dynamo places geometry. For example, Unclipping while setting coordinates changes everything.
Generally speaking, when you move your Project Base Point or Specify Coordinates At Point (Clipped) this doesn’t actually move the Project Base point, it actually moves the Survey Point but gives the Project Base Point and Internal Origin Point the coordinates you specified. When placing points in Dynamo your Project Base Point will be used as 0,0,0. So, when placing points using actual coordinate values you need to move the geometry by the Vector (0,0,0 - ProjectBase Point X,Y, Z) so that is (0 - Pt.x, 0 - Pt.y, 0 - Pt.z). I hope this is making sense, we haven’t even got to rotation! .
Rotation is similar, you need to rotate the opposite way, so if there’s a positive rotation you need to multiply by -1 and use your Project Base point for point of rotation.
I won’t go into unclipped Base Points. Instead, I have attached something I wrote ages ago to help in understanding how this all works (sort of). It basically gets all 3 points, which you can use to visualise what is happening (and also use the output to do some geometry transformations later by using vector.By2Points and rotate). I would play around with a sandbox project and mess with your Basepoints and see what happens, this will help you understand more about how this all works.
ProjectLocation.dyn (11.3 KB)
Hope this helps.