length(list) given a list value, it returns the number of items on the list.
Example 1:
<P N="MyList" V="length([12,16,18])" />
This will return as shown below.
MyList = 3
Example 2:
<P N="MyList" V="[12,16,18]" />
<P N="NoMyList" V="length(MyList)" />
NoMyList parameter will return as shown below.
NoMyList = 3
listitem(list, index1, index2 ...) given a list value and a zero-based index, it returns the value on the list at the specified index.
Example 1:
<P N="MyList" V="[12,16,18]" />
<P N="V1" V="listitem(MyList,1)" />
V1 parameter will return as shown below.
V1 = 16
Example 2:
<P N="MyList" V="[[12,16,18],[13,17,19]]" />
<P N="V1" V="listitem(MyList,1,2)" />
V1 parameter will return as shown below.
V1 = 19
sum(list, start index, end index) given a list value, it returns to the sum of values in the list. If a start index is given, it returns to the sum of values where values before the start index are not included. If an end index is given, it returns to the sum of values where values after the end index are not included. Both start and end indexes are zero-based indexes.
Example 1:
<P N="MyList" V="[12,16,18]" />
<P N="total" V="sum(MyList)" />
total parameter will return as shown below.
total = 46
Example 2:
<P N="MyList" V="[12,16,18]" />
<P N="total" V="sum(MyList,0,1)" />
total parameter will return as shown below.
total = 28
mergel(list) given a multi-dimensional list, it returns into a one-dimensional list.
Example:
<P N="MyList1" V="[[12,16,18],[13,17,19]]" />
<P N="MyList2" V="mergel(MyList1)" />
MyList2 parameter will return as shown below.
MyList2 = [12,16,18,13,17,19]
translate(list,off0,off1,off2) given a list with 3 values (usually represents a vector or a point) and offset values, it returns a new list (vector/point) adjusted according to given offset values.
Example:
<P N="Point1" V="[10,5,20]" />
<P N="Point2" V="translate(Point1,5,-5,10,)" />
Point2 parameter will return as shown below.
Point2 = [15,0,30]
rotate(list,r0,r1,r2) given a list with 3 values (usually represents a vector or a point) and angle of rotation in radians, it returns a new list (vector/point) adjusted according to angle of rotation.
Example:
<P N="Point1" V="[10,5,20]" />
<P N="Point2" V="rotate(Point1,PI,PI/4,PI/2,)" />
Point2 parameter will return as shown below.
Point2 = [-10.6066,10,-17.6777]
concat(list1,list2) given two lists, this function merges the lists into a single list.
Example 1:
<P N="List1" V="[10,5,20]" />
<P N="List2" V="[12,16,18]" />
<P N="List3" V="concat(List1,List2)" />
List3 parameter will return as shown below.
List3 = [10,5,20,12,16,18]
Example 2:
<P N="List1" V="[[10,5],[20,15]]" />
<P N="List2" V="[[12,14],[16,18]]" />
<P N="List3" V="concat(List1,List2)" />
List3 parameter will return as shown below.
List3 = [[10,5],[20,15],[[12,14],[16,18]]
refine(list,maxdist) given a list of numbers, this function sorts and returns to a new list where the difference between two consecutive values is no greater than the specified maximum value (maxdist). New values are added on the list to meet the required maximum value between consecutive values.
Example 1:
<P N="List1" V="[0,25,40]" />
<P N="List2" V="refine(List1,5)" />
List2 parameter will return as shown below.
List2 = [0,5,10,15,20,25,30,35,40]
Example 2:
<P N="List" V="refine([.2,2,1],0.3)" />
This will return as shown below.
List = [0.2,0.4667,0.7333,1,1.25,1.5,1.75,2]
online(line,dist) given a start and end point coordinate of a line and a distance, it returns to a new point coordinate with the specified distance from the start point coordinate.
Example:
<P N="Line" V="[[0,0,40],[30,20,45]]" />
<P N="P1" V="online(Line,15)" />
P1 parameter will return as shown below.
P1 = [12.3625,8.2416,42.0604]
onlineg(line,dist) given a start and end point coordinate of a line and a distance, it returns to a new point coordinate with the specified distance from the start point coordinate.
Example:
<P N="Line" V="[[0,0,40],[30,20,45]]" />
<P N="P1" V="onlineg(Line,15)" />
P1 parameter will return as shown below.
P1 = [12.3625,8.2416,42.0604]
onliner(line,reldist) given a start and end point coordinate of a line and a relative distance, it returns to a new point coordinate along the line specified by the given relative distance. Zero (0) relative distance will return to start point coordinate while one (1) relative distance will return to end point coordinate.
Example 1:
<P N="Line" V="[[10,0,0],[30,0,0]]" />
<P N="midpt" V="onliner(Line,0.5)" />
midpt parameter will return as shown below.
midpt = [20,0,0]
Example 2:
<P N="Line" V="[[10,0,0],[30,0,10]]" />
<P N="midpt" V="onliner(Line,0.5)" />
midpt parameter will return as shown below.
midpt = [20,0,5]
onlinex(line,xcoor) given a start and end point coordinate of a line and an x coordinate, it returns to a new point coordinate along the line specified by the given x coordinate.
Example 1:
<P N="Line" V="[[10,0,0],[30,0,0]]" />
<P N="Pt" V="onlinex(Line,15)" />
Pt parameter will return as shown below.
Pt = [15,0,0]
Example 2:
<P N="Line" V="[[10,0,0],[30,20,0]]" />
<P N="Pt" V="onlinex(Line,5)" />
Pt parameter will return as shown below.
Pt = [15,-5,0]
onliney(line,ycoor) given a start and end point coordinate of a line and an y coordinate, it returns to a new point coordinate along the line specified by the given y coordinate.
Example 1:
<P N="Line" V="[[0,10,0],[0,30,0]]" />
<P N="Pt" V="onliney(Line,15)" />
Pt parameter will return as shown below.
Pt = [0,15,0]
Example 2:
<P N="Line" V="[[10,0,0],[30,20,0]]" />
<P N="Pt" V="onliney(Line,5)" />
Pt parameter will return as shown below.
Pt = [15,5,0]
onlinez(line,zcoor) given a start and end point coordinate of a line and an z coordinate, it returns to a new point coordinate along the line specified by the given z coordinate.
Example 1:
<P N="Line" V="[[0,0,10],[0,0,30]]" />
<P N="Pt" V="onlinez(Line,15)" />
Pt parameter will return as shown below.
Pt = [0,0,15]
Example 2:
<P N="Line" V="[[10,0,0],[30,0,20]]" />
<P N="Pt" V="onlinez(Line,5)" />
Pt parameter will return as shown below.
Pt = [15,0,5]
linel(line) given a start and end point coordinate of a line, it returns to length of line.
Example:
<P N="Line" V="[[20,0,10],[25,0,30]]" />
<P N="Dist" V="linel(Line)" />
Dist parameter will return as shown below.
Dist = 20.6155
surfarea(surf) given a list of surface vertex coordinates, this returns to the area of the specified surface.
Example 1:
<P N="surface" V="[[0,0,0],[5,0,0],[5,5,0],[0,5,0]]" />
<P N="area" V="surfarea(surface)" />
area parameter will return as shown below.
area = 25
Example 2:
<O N="surface" T="Surface">
<O T="Point" X="0" Y="0" />
<O T="Point" X="5" Y="0" />
<O T="Point" X="5" Y="5" />
<O T="Point" X="0" Y="5" />
</O>
<P N="area" V="surfarea(surface)" />
area parameter will return as shown below.
area = 25
voronoi(boundary, points, cutouts) given a surface representing the boundary of an area, a list points within the specified boundary area, and a list of surfaces representing cutouts (holes) within the boundary, this colculates the areas of voronoi cells around the point and returns as a list of areas with the same order as the specified points of the boundary area.
Example:
<P N="boundary" V="[[0,0],[5,0],[5,5],[0,5]]" />
<P N="points" V="[[2,2.5],[4,2.5]]" />
<P N="area" V="voronoi(boundary, points)" />
area parameter will return as shown below.
area = [15,10]
voronoipts(boundary, points, cutouts) given a surface representing the boundary of an area, a list points within the specified boundary area, and a list of surfaces representing cutouts (holes) within the boundary, this calculates the areas of voronoi cells around the point and returns as a list of vertex coordinates of voronoi cells with the same order as the specified points of the boundary area.
Example:
<P N="boundary" V="[[0,0],[5,0],[5,5],[0,5]]" />
<P N="points" V="[[2,2.5],[4,2.5]]" />
<P N="areapts" V="voronoipts(boundary, points)" />
areapts parameter will return as shown below.
areapts = [[3,5,0],[0,5,0],[0,0,0],[3,0,0],[5,5,0],[3,5,0],[3,0,0],[5,0,0]]
linesplit(line,distlist) given a start and end point coordinate of a line and relative distance from start point (0 - start point and 1 - end point), it returns as a list new points specified by the relative distance.
Example:
<P N="line" V="[[4,3],[10,12]]" />
<P N="line2" V="linesplit(line,[0,0.4,0.75,1])" />
line2 parameter will return as shown below.
line2 = [[4,3,0],[6.4,6.6,0],[8.5,9.75,0],[10,12,0]]
linesplit(line,segments) given a start and end point coordinate of a line and the number of line segments of the line, it returns as a list of start and end coordinate points of the new line segments formed.
Example:
<P N="line" V="[[0,0],[8,0]]" />
<P N="line2" V="linesplit(line,2)" />
line2 parameter will return as shown below.
line2 = [[0,0,0],[4,0,0],[8,0,0]]
stripmesh(line1,pts1,line2,pts2) given start and end point of two lines and stations along X coordinates of these two lines, it returns as a list of quads (list of 4 points) representing mesh between two lines.
Example:
<P N="line1" V="[[0,0],[15,0]]" />
<P N="pts1" V="[0,5,12,15]" />
<P N="line2" V="[[0,5],[12,5]]" />
<P N="pts2" V="[0,4,8,12]" />
<P N="mesh" V="stripmesh(line1,pts1,line2,pts2)" />
mesh parameter will return as shown below.
mesh = [[0,0,0],[4,0,0],[8,0,0]]
intersect(line1,line2,plane) given start and end point of two lines, it returns to an intersection of the two lines. If plane is not specified, the intersection point is in 3D space. If plane = 1, the intersection point is on YZ plane and points along X axis of the given lines are ignored. If plane = 2, the intersection point is on XZ plane and points along Y axis of the given lines are ignored. If plane = 3, the intersection point is on XY plane and points along Z axis of the given lines are ignored. If two lines does not intersect, it returns to [-1,-1,-1].
Example:
<P N="line1" V="[[0,0,0],[10,10,10]]" />
<P N="line2" V="[[10,0,0],[0,10,10]]" />
<P N="intr" V="intersect(line1,line2)" />
intr parameter will return as shown below.
intr = [5,5,0]
point(pts,index) given a list of points and an index, it returns to a point specified by index.
Example:
<P N="line" V="[[2,0],[10,10],[30,5]]" />
<P N="pt" V="point(line,2)" />
pt parameter will return as shown below.
pt = [30,5]
sqrt(num) returns to a square root of a given number.
Example:
<P N="x" V="36" />
<P N="y" V="sqrt(x)" />
y parameter will return as shown below.
y = 6
abs(num) returns to an absolute number of a given number
Example:
<P N="x" V="-5" />
<P N="y" V="abs(x)" />
y parameter will return as shown below.
y = 5
acos(num) returns to an arccosine value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="acos(x)" />
y parameter will return as shown below.
y = 0.6675
asin(num) returns to an arcsine value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="asin(x)" />
y parameter will return as shown below.
y = 0.9903
atan(num) returns to an arctangent value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="atan(x)" />
y parameter will return as shown below.
y = 0.9903
atan2(y,x) returns to an arctangent of the quotient of its arguments (y = dividend; = divisor).
Example:
<P N="x" V="PI/4" />
<P N="y" V="atan2(x,2)" />
y parameter will return as shown below.
y = 0.3742
ceil(num) returns the number to a value rounded up to the nearest to the integer.
Example:
<P N="x" V="37.4" />
<P N="y" V="ceil(x)" />
y parameter will return as shown below.
y = 38
floor(num) returns the number to a value rounded down to the nearest to the integer.
Example:
<P N="x" V="37.4" />
<P N="y" V="floor(x)" />
y parameter will return as shown below.
y = 37
cos(num) returns to a cosine value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="cos(x)" />
y parameter will return as shown below.
y = 0.7071
sin(num) returns to a sine value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="sin(x)" />
y parameter will return as shown below.
y = 0.7071
tan(num) returns to a tangent value a given value in radians between 0 and PI.
Example:
<P N="x" V="PI/4" />
<P N="y" V="tan(x)" />
y parameter will return as shown below.
y = 1
exp(x) returns the value of E^x, where E is Euler's number (approximately 2.7183) and x is the given number.
Example:
<P N="x" V="2" />
<P N="y" V="exp(x)" />
y parameter will return as shown below.
y = 7.3891
log(num) returns the natural logarithm (base E) of a number.
Example:
<P N="x" V="2" />
<P N="y" V="log(x)" />
y parameter will return as shown below.
y = 0.6931
cubic(a,b,c,d) solves the x in a cubic equation (ax^3 + bx^2 + cx + d = 0) and returns as the value of x.
Example:
<P N="x" V="cubic(5,10,1,3)" />
x parameter will return as shown below.
x = -2.0456
quar(a,b,c,d,e) solves the quartic equation in the form of ax^4 + bx^3 + cx^2 + dx + e = 0 and returns as a list of numbers.
Example:
<P N="x" V="quar(5,10,1,3,8)" />
x parameter will return as shown below.
x = [0.446, 0.446, -1.0924, -1.7996]
refs(['object']) returns to a list of objects (in a project) referenced/defined by another library object added in a project. This function can only be used in library objects
Example:
In a project that has beam (T="beam") objects named B1, B2, and B3 and another object is added with a definition
<P N="Beams" V="refs(['beam'])" />
Beams parameter will return as a list of names of beam (T="beam") objects as shown.
Beams = [B1, B2, B3]
min(num1,num2,...) returns the minimum of the given numbers.
Example:
<P N="x" V="min(94,1,14)" />
x parameter will return as shown below.
x = 1
max(num1,num2,...) returns the maximum of the given numbers.
Example:
<P N="x" V="max(94,1,14)" />
x parameter will return as shown below.
x = 94
pow(x,y) returns the value of x to the power of y (x^y).
Example:
<P N="x" V="pow(6,2)" />
x parameter will return as shown below.
x = 36
random( ) returns a random value between 0 and 1.
Example:
<P N="x" V="random()" />
x parameter will be different every time the project is evaluated.
round(num) roundsa number to the nearest integer.
Example:
<P N="x" V="37.4" />
<P N="y" V="round(x)" />
y parameter will return as shown below.
y = 37