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: 

How to edit the length of the transition (for a widening) ?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
joantopo
1118 Views, 7 Replies

How to edit the length of the transition (for a widening) ?

Hi.

 

In the OffsetAlignmentInfo class, we can add widenings. (automatic or user).

 

A widening is composite by 1 Region and 2 Transitions (input and output).

However, when we create a widening, we can´t specify the length of each transition.

 

We can´t edit the length of the transition if we get the transition object:

 

 

AlignmentTransition members:

 

Methods

  Name Description
Public method Slim
This method sets the TransitionType to TransitionType.Linear and sets the length of the transition to 0.

Collapse imageProperties

  Name Description
Public property NextRegion
Returns the AlignmentRegion object where the transition ends.
Public property PreviousRegion
Returns the AlignmentRegion object from which the transition starts.
Public property TransitionDescription
Returns a data structure containing parametrical information to describe the transition depending on the TransitionType.
Public property TransitionType
Sets or gets the type of the transition.

 

 

 

 

 

AlignmentRegion members:

 

 

Methods

  Name Description
Public method Split
Split an AlignmentRegion in half creating a widening region with the second AlignmentRegion.

Collapse imageProperties

  Name Description
Public property EndStation
Gets or sets the end station of the region.
Public property EntryTransition
Gets the AlignmentTransition object located at the beginning of the AlignmentRegion.
Public property ExitTransition
Gets the AlignmentTransition object located at the end of the AlignmentRegion.
Public property IncreasedWidth
Gets or sets increased width from the standard.
Public property Length
Gets or sets the length of the region.
Public property Offset
Gets or sets the offset of the region.
Public property OffsetDist Obsolete.
Gets or sets the distance of offset.
Public property RegionType
Gets or sets the type of the region.
Public property StartStation
Gets or sets the start station of the region.
Public property WideningCriteria
Gets the widening criteria on the current AlignmentRegion.

 

 

So, Can´t I edit the length for the transitions?

 

Thanks in advance.

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
7 REPLIES 7
Message 2 of 8
joantopo
in reply to: joantopo

I have read this property:

 

AutoWideningInfo.TransitionLength

 

But it´s for automatic widening.

Can I create automatic widening without selecting an XML file? I don´t think we can.

 

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 3 of 8
joantopo
in reply to: joantopo

It seems that there are 5 methods to add widenings:

 

Public method AddAutoWidenings(AutoWideningCriteriaInfo, AlignmentSubEntityArc[])
Adds automatic widenings using criteria on the specified specified curve groups of parent Alignment.
Public method AddAutoWidenings(AutoWideningCriteriaInfo, SweptCurveLocation)
Adds automatic widenings using criteria on the specified specified location of Offset Alignment.
Public method AddAutoWidenings(AutoWideningInfo, AlignmentSubEntityArc[])
Adds automatic widenings using manual windening properties on the specified curve groups of the parent Alignment.
Public method AddAutoWidenings(AutoWideningInfo, SweptCurveLocation)
Adds automatic widenings using manual windening properties on the specified location of the Offset Alignment.
Public method AddWidening
Adds a widening with two 0-length linear transitions to the Offset Alignment.

 

The first two need a XML file.

 

The last (AddWidening), the length of each transition(input and output) is 0, and I can´t modify this later.

 

I can use the third or the fourth type,  (automatic widenings using manual windering properties).

In this case, I can put the length for the transition, but the length is the same for the input and output transition. Then, I can change the transition´s type ( from automatic to user).

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 4 of 8
joantopo
in reply to: joantopo

Ok, I think I have found it:

 

OffsetAlignmentInfo.Transitions---------------------> (get our Transition in the Transitions collection)---------------->AlignmentTransition.TransitionDescription

 

 

The TransitionDescriptionBase type exposes the following members.

Collapse imageProperties

  Name Description
Public property EndStation
Sets or gets the end station for the transition.
Public property Length
Sets or gets the length for the transition.
Public property StartStation
Sets or gets the start station for the transition.

 

We can edit the length of the selected transition.

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 5 of 8
Anonymous
in reply to: joantopo

Hola Joantopo, 

 

Quería consultarte respecto a la modificación de las longitudes de transición en un widening. Con la clase TransitionDescriptionBase se puede modificar la longitud, abscisa de inicio y fin tanto de la transición de entrada como de salida, pero como puedo cambiar el tipo de transición, es decir si es lineal, linea-curva-linea, etc., y como cambiar los parámetros dependiendo de esta, taper, radios, etc. Revisando la API he encontrado las siguientes clases:

 

LinearTransitionDescription

CurveLineCurveTransitionDescription

CurveReverseCurveTransitionDescription

CurveCurveReverseCurveTransitionDescription

 

Pero no he logrado conseguir modificar los parámetros dependiendo del tipo de transición.

 

Te agradezco si me puedes ayudar.

 

Saludos cordiales.

 

Mauro Vega

 

AutoCAD Civil 3D 2018.2

Intel Core i7-6700HQ CPU 2.6 GHZ

32 GB RAM 2133 MHz

NVIDIA Quadro M3000M

Windows 10 Pro 64 Bits

Tags (2)
Message 6 of 8
joantopo
in reply to: Anonymous

Supongo que tendrás que poner:

 

AlignmentTransition.TransitionType.  (después del punto, poner la que quieres.. En Visual Studio, ya te ofrecerá las que hay)

 

En AlignmentTransition, obviamente debe ser el nombre de la instancia que le has puesto.

 

Mira lo que pone:

Remarks

The transition's TransitionType will be changed to TransitionType.Linear automatically when it fails to autofit with the input type according to the transition's length and other constraints.
 
Los constraints (radios, etc..) no sé si se pueden cambiar, no siempre está todo disponible desde la API.
Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 7 of 8
Anonymous
in reply to: joantopo

Hola Joantopo,

 

Muchas gracias por la información. 

 

Creo que para los constraints se emplean los miembros de las clases 

 

LinearTransitionDescription

http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/html/dc373630-6327-7ab1-92d3-be9104b326a...

CurveLineCurveTransitionDescription

http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/html/da7d7983-8ff7-12b3-fafd-6dfa9185603...

CurveReverseCurveTransitionDescription

http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/html/26fd642d-e289-4216-1ca6-611054beebf...

CurveCurveReverseCurveTransitionDescription

http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/html/c325022a-ce7c-1e23-090c-4877f9e1c7c...

 

Pero no he logrado implementarlo dentro de Visual Studio.

 

Te agradezco si me puedes ayudar.

 

Saludos cordiales.

 

Mauro Vega

 

 

Message 8 of 8
Anonymous
in reply to: Anonymous

Para definir el tipo de transición y los parámetros (constraints) de la misma, primero es necesario necesario identificar a que región se va a agregar el sobreancho (widening),  recorriendo la colección AlignmentRegionCollection. Una vez identificada la región se define la transición de entrada y de salida según sea el interés mediante el metodo AlignmentRegion.EntryTransition o ExitTransition. Posteriormente, se define el tipo de transición mediante AlignmentTransition.TrasitionType = TransitionType.Linear o TransitionType.CurveLineCurve, etc, y finalmente empleando el método TransitionDescription se definen los parámetros. A continuación un ejemplo.

 

Dim rc As AlignmentRegionCollection
Dim ra As AlignmentRegion
Dim tent As AlignmentTransition
Dim tsal As AlignmentTransition
Dim lita As LinearTransitionDescription
Dim lclt As LinearTransitionDescription
Dim stain As Double
Dim staen As Double
Dim station As Double
rc = alignment.OffsetAlignmentInfo.Regions stain = 100
staen = 200
station = (stain + staen) / 2
For Each ra In rc
If station > ra.StartStation And station < ra.EndStation Then MsgBox("Inicio:" + ra.StartStation.ToString + "- Fin:" + ra.EndStation.ToString) tent = ra.EntryTransition tsal = ra.ExitTransition tent.TransitionType = Autodesk.Civil.TransitionType.Linear tsal.TransitionType = Autodesk.Civil.TransitionType.Linear lita = tent.TransitionDescription lita.StartStation = stain lita.Length = 5 lita.StartStation = stain lclt = tsal.TransitionDescription lclt.EndStation = staen + 5 lclt.Length = 5 Exit For End If
Next

Saludos!

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report