Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get station of intersection or Cogo point on alignment

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
marcelwg75
956 Views, 2 Replies

Get station of intersection or Cogo point on alignment

I want to get the station of an intersection between alignments by C#. I saw a post that there is no API for intersection yet (maybe in 2018??). An Interserction has a label option to see stations of the alignments.

 I can get the intersection points (found a post, but have not tried it yet). If I create a report station offset to points I can make an export, and I see the station numbers. 

I was wondering: is there a another way to get the station of the cogo points (created by .IntersectWith) on the alignment in C#?

2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: marcelwg75

@marcelwg75, you can use the Curve object (which Alignments derive from) and use the IntersectWith(otherAlign) method. Then use the StationOffset() method to get the raw stations, and finally, use the GetStationStringWithEquations() method to get the station string.

 

For the points, you would do essentially the same thing, except you already have the Point3D values for use with the StationOffset() method.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
marcelwg75
in reply to: Jeff_M

Thnx. 

I used Alignmentx.IntersectWith(Alignmenty) and then used the intersection points in the StationOffset() method.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report