How to set start station of OpenRoads alignment in c#?

Hello.

I have a question.

How can I set start startion of Alignment in c#?

I found a property to get start station but I can't find anything to set one.

Is there a way to set start station in c#?

Thank you.

Parents
  • Hi,

    You need to use the edit SDK classes.

    // You can see an example at ComplexAlignmentCreator.cs file on ManagedSDKExample
    // Search for AddStationing
    
    // I assume you already heve your alinment
    Alignment al = alignment you want to edit
    
    // Use AlignmentEdsit class
    AlignmentEdit editAl = al as AlignmentEdit;
    
    // Use AddStationing method
    editAl.AddStationing(startStation, startDistance, byName);
    
    // Don't formet to persit the change

    I hope it helps,

    Henrique

Reply
  • Hi,

    You need to use the edit SDK classes.

    // You can see an example at ComplexAlignmentCreator.cs file on ManagedSDKExample
    // Search for AddStationing
    
    // I assume you already heve your alinment
    Alignment al = alignment you want to edit
    
    // Use AlignmentEdsit class
    AlignmentEdit editAl = al as AlignmentEdit;
    
    // Use AddStationing method
    editAl.AddStationing(startStation, startDistance, byName);
    
    // Don't formet to persit the change

    I hope it helps,

    Henrique

Children
No Data