Working with Alignment.StationOffsetByPoint dictionary

I’m trying out the new Alignment.StationOffsetByPoint and looking for a way to get the minimum station in the list. Then get its corresponding offset. In the example shown, I have the stations/offsets for two points listed. I would like to take the minimum station and corresponding offset and write it to a property set property and/or file.
image

1 Like

Hi @keith.sowinski ,

Try to sort them prior to using Alignment.StationOffsetByPoint.

Here’s the concept:
Guide1

Here’s the sample:
Guide2

Cheers,
Jowenn

Thank you @JowennLua for the suggestion. I’m trying to do something a little different. In my case, I only have 1 alignment, but multiple points. I want to get the station/offset values for the multiple points based on the 1 alignment. Then, I want to get the point that has the lowest station value and it’s corresponding offset. In other words, the station values must be known before they can be sorted.

@JowennLua I think I figured this out. If you see a simpler way, I’m all ears, but this seems to work.

1 Like

Hi @keith.sowinski ,

I originally thought you got multiple alignments vs multiple points. If you aim to have 1 alignment and multiple points then what you have there is already good. Maybe, just a suggestion to make a list of station and offset and use List.GetItemAtIndex to treat them both. Here’s a sample and maybe convert to csv.

Cheers,
Jowenn

1 Like

Thanks @JowennLua.

Another note about the Alignment.StationOffsetByPoint node: The output is raw station, so if you want the station with station equations, you’ll need a python script using the Alignment.GetStationStringWithEquations method.