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: 

Having problem with AddWidening()

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
alexisgacia
789 Views, 4 Replies

Having problem with AddWidening()

Hi All,

 

Good day.

 

I'm trying to create widening using the below code but not able to find a way to remove the exit transition.

OffsetAlignmentInfo _SrcOffSetNfo = _oSrcAlign.OffsetAlignmentInfo;
mStation = 400;
_TransitionLength = 100
_SrcOffSetNfo.AddWidening(mStation, mStation + _TransitionLength, 25);

AlignmentRegionCollection oRegs = _SrcOffSetNfo.Regions;

foreach(AlignmentRegion oReg In oRegs)
{                                
    AlignmentTransition oExitTrans = oReg.ExitTransition;
    oExitTrans.TransitionDescription.Dispose();
    oExitTrans.Dispose();
}

Output:

alexisgacia_1-1602140197940.png

 

 

Output needed to be achieve

alexisgacia_0-1602136631220.png

 

 

Thanks in advance.

Labels (3)
4 REPLIES 4
Message 2 of 5

You'll always have the end transition. If you want it to not go back towards the alignment, then you'll want the end of your transition to match the end of the alignment. 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 3 of 5

Thank you for your reply.

 

What I am trying to achieve is to merge with the other roads with the different setup.

alexisgacia_0-1602393523909.png

 

 

 

Message 4 of 5

I dont know on how to match the end of the transition. There is no option or properties where we can put the offset value for the end of the transition.

alexisgacia_0-1602393811652.png

 

Message 5 of 5
alexisgacia
in reply to: alexisgacia

I found an alternative solution is to remove the region.

 

OffsetAlignmentInfo _SrcOffSetNfo = _oSrcAlign.OffsetAlignmentInfo;
mStation = 400;
_TransitionLength = 100
_SrcOffSetNfo.AddWidening(mStation, mStation + _TransitionLength, 25);

// Remove the end region
_SrcOffSetNfo.Regions.Remove(2);
_SrcOffSetNfo.Regions[1].StartStation = mStation;
_SrcOffSetNfo.Regions[1].EndStation = 750; // optional

 

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report