SAC VB Expressions API Functions
SAC VB Expressions API Functions
SAC VB Expressions API Functions
VB Expressions: Math
Emphasized values can be changed to reference the applicable value.
Math VB Expression Output Description
math.round(2.568,2) 2.57 Returns a value rounded to the nearest specified
decimal places (ex. -2 = hundreds, -1 = tens, 0 =
whole number, 1 = tenths, 2 = hundredths, etc.)
math.floor(2.568) 2 Returns the largest integer that is less than or equal
to the specified value (i.e. rounds down)
math.ceiling(2.568) 3 Returns the smallest integer that is greater than or
equal to the specified value (i.e. rounds up)
math.max(2.568,0.813) 2.568 Returns the larger of two specified values
math.min(2.568,0.813) 0.813 Returns the smaller of two specified values
math.abs(-2.568) 2.568 Returns the absolute value
math.pi 3.14159... Returns the value of the constant pi
math.e 2.71828... Returns the value of the constant e
math.sin(math.pi) 0 Returns the sine of a specified angle measured in
radians
math.cos(math.pi) -1 Returns the cosine of a specified angle measured in
radians
math.tan(math.pi) 0 Returns the tangent of a specified angle measured in
radians
math.asin(1) 1.57079... Returns the angle measured in radians whose sine is
the specified value
math.acos(1) 0 Returns the angle measured in radians whose cosine
is the specified value
math.atan(1) 0.78539... Returns the angle measured in radians whose
tangent is the specified value
math.log(math.e) 1 Returns the natural (base e) logarithm of a specified
value
math.log10(10) 1 Returns the base 10 logarithm of a specified value
math.exp(1) 2.71828... Returns e raised to the specified power
math.pow(2,3) 8 Returns a value raised to the specified power
math.sqrt(81) 9 Returns the square root of a specified value
math.ieeeremainder(7,2) 1 Returns the remainder of the first value divided by the
second value
math.sign(-2.1) -1 Returns an integer indicating the sign of the number
VB Expressions: Casting
Emphasized values can be changed to reference the applicable value.
Ctype VB Expression Output Description
CType(10%,double) 0.10 Converts the first value into the specified variable
type (integer, double, string)
Superelevation Class
Superelevation API Function Description
SE.HasLeftLI Left lane inside superelevation slope is present & valid to use
(T/F)
SE.HasLeftLO Left lane outside superelevation slope is present & valid to
use (True/False)
SE.HasLeftSI Left shoulder inside superelevation slope is present & valid to
use (T/F)
SE.HasLeftSO Left shoulder outside superelevation slope is present & valid
to use (T/F)
SE.HasRightLI Right lane inside superelevation slope is present & valid to
use (T/F)
SE.HasRightLO Right lane outside superelevation slope is present & valid to
use (T/F)
Baseline Class (*Note assembly baseline may or may not be the subassembly
origin)
Baseline API Function Description
Baseline.Station Station on assembly baseline
Baseline.Elevation Elevation on assembly baseline
Baseline.RegionStart Station at the start of the current corridor region
Baseline.RegionEnd Station at the end of the current corridor region
Baseline.Grade Grade of assembly baseline
Baseline.TurnDirection Turn direction of assembly baseline (Left = -1, Non-curve = 0,
Right = 1)
EnumerationType Class
Enumeration API Function Description
EnumerationType.Value The string value of the current enumeration item
Subassembly Class
Subassembly API Function Description
SA.IsLayout Current preview mode is Layout Mode (T/F)
Cant Class
Cant API Function Description
Cant.PivotType Pivot method assigned to the current curve:
Low Side Rail (left rail) = -1
Center Baseline = 0
High Side Rail (right rail) = 1
Cant.LeftRailDeltaElevation Differential elevation for the left rail
Cant. RightRailDeltaElevation Differential elevation for the right rail
Cant.TrackWidth Track Width assigned to the alignment
Cant.IsDefined Cant has been calculated on the alignment (T/F)