Revit get km of a rail

Hello all,

Is it possible to get in Revit (via dynamo) the kilometers of an alignement (xml file).

Thank you in advance!

@mairh_tsek ,

can explan that ? are you working in Revit ? do get a xml file or .dwg ? do you have some screenshots

KR

Andreas

Hi
Do you mean that you want to import the stationing for Rail alignment or do you want the alignment/profile to be used as a target/object in Revit?

Hello @patrick.ericson

I want to import the stationing for rail alignement in Revit. So when I create a section in revit, I want to know exactly in which km corresponds.

Thank you!

Hello @Draxl_Andreas

Yes I work in Revit. Until now I got an xml file from the surveyor with the rail.

Alignments are tricky, in that they measure on a flat 2d plane, but the data you’re working with is often 3d.

Best bet would be to do this work in civil 3d, as that tool is built for this type of measurement.

But if you had to stay in Revit you could try something like this:

  1. Get the alignment curve into Dynamo as geometry.
  2. Get the plane of the section you want to associate to a station.
  3. Intersect the plane with the alignment, generating a list of points.
  4. Sort the points by the distance to the origin of the plane.
  5. Pull the first point out of the list.
  6. Use a Curve.SegmentLengthAtPoint to find the distance which the point sits along the curve.
  7. Convert units as required (Your project is likely measuring in meters or millimeters, not kilometers).

Note that if the section is not perpendicular to the alignment (unlikely to be the case unless you created it computationally and the alignment is static) this value may be off by more than you’re willing to tollerate. In those cases you can try to use a Geometry.ClosestPointTo node to get the point on the alignment that is closest to the view plane’s origin.

Ask your civil engineer. If you are using revit primarily surely you’re not civil based?

Second w jacob that civil 3d/dynamo is far more suitable/safer

1 Like

You might be surprised on this one, but I’ve recently met some bridge engineers who spend most of their time in Revit (detailing and drawing production), but some up front time in InfraWorks. Certainly an outlier of an org, but they’re shockingly effective.

4 Likes

Yes we see the same behavior in my company. C3D, Revit and Tekla are all beeing used by bridge engineers. We try to focus more on the information exchange even if we always want them to use C3D as their main application for design of most of the bridge :slight_smile:

3 Likes

Agree on that.
Civil 3D is more suitable than Revit to handle that kind of large coordinates that are beeing used in civil engineering project.

2 Likes

Hola Amigos buenas, Amigo @mairh_tsek check this post is very similar, what I did was the following:

  1. Download CivilConnection Package, to be able to work with C3D objects directly from Dynamo Revit (You have to have the same version C3D, Revit, CivilConnection for the package to work).
  2. From Dynamo Revit I have explored the coorridor to get its geometry and create solids, which was surprisingly ambiguous and complicated, maybe you who are more familiar with the LandXml language will have better luck.
  3. With the FamilyInstanseByGeometry node from the Springs Nodes package you import a mass from solids. See the full post for more than one solution.

I must also mention that I agree with my colleagues that it would be better to try to work directly in C3D I am sure there are ways to make cross sections in a simple way.

1 Like