Dynamo geometry not matching Revit coordinates

Hello everyone,

I’m currently working on a student project that involves generating a 3D graph of electrical connections inside a Revit model. I’m using Dynamo to process the elements, extract their 3D coordinates, and create visual connections between devices (lights, switches, detectors, etc.).

However, I’ve encountered an issue:
The lines I generate in Dynamo (using Line.ByStartPointEndPoint) appear very far away from the actual model in Revit. I’m not working with an IFC file — the data is coming directly from my Revit model — but it seems like the point coordinates are offset or not in sync with the model’s actual geometry.

Has anyone encountered this before even if it’s not the same project?
How can I align my Dynamo-generated geometry with the actual model position in Revit?

If anyone has advice or a solution, I would really appreciate your help :folded_hands:
Thank you in advance!

Are you using the Element.Location for this, or something else? 6/10 times this is because the context is in the wrong coordinate system (i.e. extracting coordinates from the survey point), and another 3/10 times it is because the location reported isn’t related to model space but to something else (which can be the case with linked elements and annotation elements in some contexts).

I think you should have set the project base point in revit and then not corrected the coordinate in dynamo.
Because i meet too.

Yes, For extracting 3D coordinates, I do use the Element.GetLocation node.

Yes, I’m using the Element.GetLocation node to extract 3D coordinates.
Is there another recommended or more reliable way to extract the position of these elements, especially to make sure the coordinates match the model space correctly?

Thanks for your reply!
I’m still quite new to Revit, so I’m not very familiar with how the Project Base Point works.
If I understand correctly, I should set the base point properly in Revit first, and then avoid doing any manual coordinate corrections in Dynamo, right?

Do you have any tips, steps, or examples on how to set the Project Base Point correctly to avoid this kind of offset when using Element.GetLocation in Dynamo?

The coordinates do match the models space. To confirm, isolate a single element in a 3D view, then in Dynamo use a Select Model Element node to select the instance, then use Element.GetLocation node to get the point location. Assuming you haven’t disabled geometry preview you should now have a blue box representing the location point from Dynamo in the 3D view. The X Y Z coordinates of which are the values listed in Dynamo for the point.

So now the question is how do you get the X Y and Z coordinate to align to your expected values. This requires transforming the node from the internal coordinate system to the one you want to report. Without more info from you or a basic model (one element in it, coordinate system adjusted and a tag on the insertion point of the element), I can’t tell you exactly which method/node to use as I’m not sure which value you want to report for those X Y and Z values. This has been covered quite a few times, but as you mention you’re new to Revit it is likely hard if not difficult to know which terms to search for here - might be best to post a model as a result.