How to calculate stationing (kilometer) along an axis in Dynamo?

Hi everyone,
I’m trying to calculate the kilometer (stationing) of modeled elements along a axis using Dynamo.

Here is what I have:

I already have a working script that extracts element coordinates and exports them to Excel.

I know the coordinates of two reference points:
Point A → KM 13,5
Point B → KM 17,5

I want to compute the kilometer value of each object by projecting its coordinate onto the axis vector between those two points.

The geometry and coordinates are taken from Revit elements, and the base point can be hardcoded.

What is the best way to do this projection in Dynamo?

Would this do what you need as it gives you a distance between two points.

1 Like

Hi @Sabine_weber,

You have two options:

  1. Use Dynamo for Revit to access Civil 3D objects and get the station of any Revit element based on the alignment in Civil 3D.
    You can use the BriMohareb package for this.

for the base point coordiantion transform the revit location to the C3d location by use this node

  1. Project the location of the Revit element onto the polyline (axis); the output will be the station parameter.**