I’m trying go make an alignment report with dynamo.
I can get the R-value by using the “AlignmentExtensions.GetInstantaneousRadiusAtStation” node.
But there isn’t a similar node for the A-value…
Is it possible to get the A-value of an alignment spiral?
from Autodesk.DesignScript.Geometry import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil.DatabaseServices.Styles import *
adoc = Application.DocumentManager.MdiActiveDocument
civdoc = CivilApplication.ActiveDocument
alignment = IN
output = 
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
alignmentId = alignment.InternalObjectId
obj = t.GetObject(alignmentId, OpenMode.ForWrite)
criteriaStationColl1 = obj.Entities.SpiralIn.A
criteriaStationColl2 = obj.Entities.SpiralOut.A
OUT = AlignmentSpiralMembers(IN)
Assuming that ‘A’ value of a transition curve defines the ‘flatness’ of the spiral and is expressed as A=SQRT(R*L) where R = Radius and L = Transition Length from this source is correct, I believe you can use the “AlignmentSubEntity.Length” to get the length and calculate A.
Hope this helps
Thank you hosneyalaa and Assem.Daaboul,
For my “hor…alignement report” script I used the idea that A=sqrt (R*L).
I used the radius at the start and the end of the spiral.
Applied the formula and counted them together. (one will always be 0)
Calculating A value is one way to go about it. There is also a way to get the A value without calculation and pulling directly from the spiral subentity parameters using the GetParameterByName node or GetParameters node in the Civil3DToolkit. I find these node goes unnoticed since it’s really general but can pull a lot of info on just about any type of object. This way may help reduce the number of nodes required as well.
Get Spiral A Value.dyn (17.9 KB)
Indeed, much easier!