0% found this document useful (0 votes)
33 views

SAC - Logical and Mathematical API Functions

This document describes the most commonly used API and math functions in Subassembly Composer. Includes functions for points, lines, targets, and subassemblies that return values such as coordinates, distances, slopes, and validations. It also explains mathematical operations such as rounding, trigonometric, maximums and minimums, as well as logical operators.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

SAC - Logical and Mathematical API Functions

This document describes the most commonly used API and math functions in Subassembly Composer. Includes functions for points, lines, targets, and subassemblies that return values such as coordinates, distances, slopes, and validations. It also explains mathematical operations such as rounding, trigonometric, maximums and minimums, as well as logical operators.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SUBASSEMBLY COMPOSER COURSE

ING. RONALD BRAÑEZ SAAVEDRA


AUTODESK CERTIFIED PROFESSIONAL

List of API functions


The API (Applied Programming Interface) functions allow us to call properties or determine
characteristics of many SAC elements.
Below is a list of the most used API functions, according to their class (Element Type):
Class Function Description Example
Spot x Returns the X value relative to the P1.X
(P or AP) Subassembly insertion point AP1.X
AND Returns the Y value relative to the P1.Y
Subassembly insertion point AP1.Y

DistanceTo Returns the distance to another point P1.DistanceTo(“AP1”)


SlopeTo Returns the slope to another point AP1.SlopeTo(“P2”)
DistanceToSurface Returns the vertical distance from the point to P2.DistanceToSurface(SurfaceTarget)
a target surface Point below surface =
Negative
Point above surface = Positive
IsValid Evaluate the existence of the True or False P100.IsValid
point
Lines slope Returns the slope of the line L1.Slope
(L or AL)
Length Returns the length of the line L2.Length
LengthX Returns the projected length on the horizontal L2.XLength
axis
LengthY Returns the projected length on the vertical L2.YLength
axis
StartPoint Returns the name of the start point of the line L100.StartPoint

EndPoint Returns the name of the end point of the line L100.EndPoint

Max Returns the Maximum elevation from the


L200.Max
points that make up the line
Mainly used on Surface Link, which can
have multiple breakpoints

min Returns the Minimum elevation from the


L200.Min
points that make up the line
It is mainly used in Surface Link, which
can have several break points

Goals of Offset Bring back the distance horizontal OT1.Offset


displacement displaced, from the baseline (BaseLine)

1
SUBASSEMBLY COMPOSER COURSE
ING. RONALD BRAÑEZ SAAVEDRA
AUTODESK CERTIFIED PROFESSIONAL

(OffsetTarget)
Goals of Elevation Returns the elevation of the target ET1.Elevation
Elevation
(ElevationTarget)
Goals IsValid Evaluate the application of the True or False SurfaceTarget.IsValid
objective OffsetTarget.IsValid
ElevationTarget.IsValid
Subassembly IsLayout Evaluates whether the SA is in False or True SA.IsLayout
Layout mode
Enumeration value Converts the values of the enumerated list to MyList.Value
(Enumerate) Text (String)
Source : self made

Mathematical and logical functions


The mathematical functions associated with SAC belong to the function lists of the C# programming
language. The CLASS corresponding to the mathematical functions library is MATH.
Operation Function Description Example
Rounding Round Returns the value rounded according to the assigned Math.Round(Value,Decimals)
rounding number Math.Round(2.1472,3)=2.147
Floor Returns the value rounded to the nearest integer Math.Floor(Value)
Math.Floor(2.71)=2
Ceiling Returns the value rounded to the highest integer Math.Ceiling(Value)
Math.Ceiling(2.71)=3
Trigonometric Without Returns the SIN of the indicated value Math.Sin(Value)
Cos Returns the COSINE of the indicated value Math.Cos(Value)
So Returns the TANGENT of the indicated value Math.Tan(Value)
Atan Returns the ARCOTANGENT of the indicated value Math.Atan(Value)
Pi Returns the value of Pi Math.Pi
Absolutes Abs Returns the absolute value Math.Abs(Value)
Highs Max Returns the maximum or minimum value of a list of Math.Max(V1,V2,...,VN)
min values Math.Min(V1,V2,...,VN)
and
Source : self made
ING. RONALD BRAÑEZ SAAVEDRA
AUTODESK CERTIFIED PROFESSIONAL

Logical operators are Boolean functions (False/True); those that can be applied in SAC are:
Operator Function Example
Greater than > A>B
Smaller than < A<B
Equal = A=B

2
SUBASSEMBLY COMPOSER COURSE
Greater than or >= A >= B
Equal A <=B
<=
Less than or Equal
AND AND (A >= 0.5) AND (A <= 5)
Both comparisons must be met for it to be
true.
EITHER OR (A >= 0.5) OR (A <= 5)
HE has to achieve a of the
comparisons to make it true
Source : self made

You might also like