Dynamo does not report internal Origin's Z Coordinate (always shows 0.000)

So, I have a file, the internal origin of which lies exactly 300 cm higher than the project’s Base Point:


However, I found there seems to be no way to obtain that information through Dynamo:

As you can see (marked in red), X and Y coordinates of Base Point and Internal Origin are the same, just the Z coordinate is always shown as 0 for the Origin. I noticed points seem to be located correctly within Dynamo itself (blue), so I tried building a vector to get the right translation, but it still returns the wrong one… it shows a vector with length of 53480, instead of 300, as it should

Internal origin is always 0,0,0. All geometry is relative to this position and the base points transform the coordinates (only the coordinates - not the geometry) so you read them in their respective coordinate systems.

You can read more about revit coordinate systems here…


Here is another blog by @c.poupin which also explains coordinate conversions…

1 Like

I had not had the opportunity to deal with this particular case (set Project Location + set Base Point Location)

here an example

import sys
import clr
from Autodesk.DesignScript.Geometry import *

#import Revit API
import Autodesk
from Autodesk.Revit.DB import *

import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

import Revit

pt = IN[0].ToXyz()

# get Offset beetween internal and Base Project Point
basePt = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_ProjectBasePoint).FirstElement()
ele = basePt.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM).AsDouble()
baseTranslatedPt = XYZ(0,0,ele) - doc.ActiveProjectLocation.GetTotalTransform().Inverse.OfPoint(XYZ.Zero)
# Topo Coordinates calculation 
translatedpointA = doc.ActiveProjectLocation.GetTotalTransform().Inverse.OfPoint(pt) + baseTranslatedPt
OUT = translatedpointA.ToPoint(), "Offset BasePoint/Internal : {}".format(baseTranslatedPt.ToPoint().Z)

Hi, thank you for your answer. I’m aware of that, but I am afraid it’s not completely true. My particular issue came from dealing with geometry from linked file, whose base point has an offset in relation to internal origin. After transforming the coordinate system within Dynamo, the geometry still has the same offset, as within the file(from BP to IO) and finding the right vector to translate it ended up problematic, as the Origin is always reported with a Z coordinate of 0, as shown in my screenshot. By the way, X and Y coordinates are not reported 0,0 - see the screenshot in the first post.

Thx, Cyryl ! I think that solves it. I will also check the way it behaves when dealing with geometry from links :slight_smile:

This is most likely because when dealing with linked files, the linked instance also has a transform on it when imported, this is for placement of your linked instance and in turn all geometry within (including internal origin). You have to transform the point by the links transform and then convert to whatever other host basepoint to get coordinates relative to the host

For example, if you were to bring a linked instance into revit and align by say project basepoint rather than by internal origin, then the internal origin of the linked file would not be 0,0,0 in the host model even though in the linked file itself the internal origin is in fact 0,0,0, this is because a transform is applied to match the basepoint relative from host to linked instance so these are placed as preferred.

1 Like

The screenshot provided was from within the linked file, not the host model