For the complete documentation index, see llms.txt. This page is also available as Markdown.

ParamML Functions Reference

Overview

ParamML provides a comprehensive set of built-in functions that can be used within expressions to perform calculations, manipulate geometry, convert units, and query parametric models. This guide documents all available functions for AI agents creating ParamML expressions.

Key Concepts:

  • Functions are called within ParamML expressions using standard syntax: functionName(arg1, arg2, ... )

  • Functions are implemented in the ExprProvFunctionCall method (Param.ts:655)

  • Some functions are context-dependent (require specific modules like FEA, SEC, or OpenBrIM to be loaded)

  • All functions are case-sensitive

ParamML Operators: ParamML uses standard JavaScript-like operators for expressions:

  • Comparison Operators: <, >, <=, >=, ==, !=

  • Logical Operators: && (AND), || (OR), ! (NOT)

  • Arithmetic Operators: +, -, *, /, %, ^ (power)

  • Ternary Operator: condition ? value1 : value2

  • Unary Operators: - (negation), ! (logical NOT), + (positive)

Example:

<P N="IsValid" V="Width > 0 && Height > 0 ? 1 : 0"/>
<P N="NeedsReinforcement" V="Stress >= AllowableStress || Depth < MinDepth"/>
<P N="Power" V="Base ^ Exponent"/>

Function Categories:

  1. Array/List Operations

  2. Geometric Transformations

  3. Line/Curve Operations

  4. Surface/Volume Operations

  5. Unit Conversion

  6. Advanced Geometry

  7. Mesh Generation

  8. Object/Point Functions

  9. String Manipulation

  10. External Module Functions


Array/List Operations

length(list)

Returns the number of elements in an array or list.

Parameters:

  • list (Array): The array to measure

Returns: Number - The count of elements

Example:

Related: first(), last()


parent(obj)

Returns the parent object of the given object in the hierarchical tree.

Parameters:

  • obj (Object): The object whose parent to retrieve

Returns: Object - The parent object

Example:


project()

Returns the root project object (top of the object hierarchy).

Parameters: None

Returns: Object - The root project object

Example:


getlistitem(list, index) / listitem(list, index)

Accesses an element at a specific index in a list. Supports multi-dimensional indexing.

Parameters:

  • list (Array): The array to access

  • index (Number or multiple Numbers): The index/indices to retrieve

Returns: Any - The element at the specified index

Example:

Related: first(), last()


last(list)

Returns the last element of an array.

Parameters:

  • list (Array): The array to query

Returns: Any - The last element

Example:

Related: first(), length()


first(list)

Returns the first element of an array.

Parameters:

  • list (Array): The array to query

Returns: Any - The first element

Example:

Related: last(), length()


list(args...)

Creates a new list from the provided arguments.

Parameters:

  • args... (Any): Variable number of arguments to combine into a list

Returns: Array - A new list containing all arguments

Example:


sum(list, startIndex?, endIndex?)

Calculates the sum of numeric elements in an array.

Parameters:

  • list (Array): The array of numbers to sum

  • startIndex (Number, optional): Starting index (default: 0)

  • endIndex (Number, optional): Ending index (default: array length)

Returns: Number - The sum of elements

Example:

Related: length()


mergel(listOfLists)

Merges nested lists into a single flat list.

Parameters:

  • listOfLists (Array of Arrays): Nested array structure

Returns: Array - Flattened array

Example:

Related: concat()


concat(list1, list2, ...)

Concatenates multiple arrays into a single array. Can accept any number of arrays (not limited to two).

Parameters:

  • list1, list2, ... (Arrays): Arrays to concatenate

Returns: Array - Combined array containing all elements in order

Example:

Notes:

  • Accepts unlimited number of array arguments

  • Elements appear in order of arrays provided

  • Duplicate values are preserved (not removed)

Related: mergel()


refine(list, refinement)

Refines a list by interpolating additional points between existing elements. Works only on simple number lists, not on point/coordinate lists.

Parameters:

  • list (Array of Numbers): The list to refine (must be simple number array, not point array)

  • refinement (Number): Maximum spacing between refined values

Returns: Array - Refined list with interpolated values

Example:

Notes:

  • Important: refine() only works on simple number arrays, not point/coordinate arrays

  • For point lists, extract coordinates, refine them, then reconstruct points using onlinex() or similar

  • Refinement value represents maximum spacing between output values

Related: onlinex(), map()


slice(list, start, end)

Extracts a portion of an array from start to end index.

Parameters:

  • list (Array): The source array

  • start (Number): Starting index (inclusive)

  • end (Number): Ending index (exclusive)

Returns: Array - Sliced portion of the array

Example:


Geometric Transformations

translate(point, tx, ty, tz)

Translates a point by the specified offset values.

Parameters:

  • point (Point or Array): The point to translate

  • tx (Number): Translation in X direction

  • ty (Number): Translation in Y direction

  • tz (Number): Translation in Z direction

Returns: Point - The translated point

Example:

Related: rotate()


rotate(point, rx, ry, rz, origin?)

Rotates a point (or array of points [x,y,z]) around specified axes.

Parameters:

  • point (Point or Array): The point(s) to rotate

  • rx (Number): Rotation around X axis (degrees)

  • ry (Number): Rotation around Y axis (degrees)

  • rz (Number): Rotation around Z axis (degrees)

  • origin (Point, optional): Origin point for rotation (default: [0,0,0])

Returns: Point or Array - The rotated point(s)

Example:

Related: translate()


Line/Curve Operations

online(line, x, y)

Returns a point on a line at specified local coordinates.

Parameters:

  • line (Line3D): The line object

  • x (Number): Local X coordinate along the line

  • y (Number): Local Y coordinate (offset perpendicular to line)

Returns: Point - Point on the line

Example:

Related: onlineg(), onliner(), onlinea()


onlineg(line, x, y)

Returns a point on a line in global coordinates.

Parameters:

  • line (Line3D): The line object

  • x (Number): Global X coordinate

  • y (Number): Global Y coordinate

Returns: Point - Point on the line

Example:

Related: online(), toglobal()


onliner(line, n)

Returns a point on a line at a relative position (0 to 1).

Parameters:

  • line (Line3D): The line object

  • n (Number): Relative position (0 = start, 1 = end, 0.5 = midpoint)

Returns: Point - Point on the line

Example:

Related: onlinea(), online()


onlinea(line, n)

Returns a point on a line at an absolute distance from the start.

Parameters:

  • line (Line3D): The line object

  • n (Number): Absolute distance from start

Returns: Point - Point on the line

Example:

Related: onliner(), linel()


onlinerel(line, n)

Returns a point on a line at a relative distance in the line's local direction.

Parameters:

  • line (Line3D): The line object

  • n (Number): Relative distance

Returns: Point - Point on the line

Example:

Related: onliner(), onlinea()


onlinex(line, n)

Returns a point on a line at a specific X coordinate.

Parameters:

  • line (Line3D): The line object

  • n (Number): X coordinate value

Returns: Point - Point on the line at the specified X

Example:

Related: onliney(), onlinez()


onliney(line, n)

Returns a point on a line at a specific Y coordinate.

Parameters:

  • line (Line3D): The line object

  • n (Number): Y coordinate value

Returns: Point - Point on the line at the specified Y

Example:

Related: onlinex(), onlinez()


onlinez(line, n)

Returns a point on a line at a specific Z coordinate (elevation).

Parameters:

  • line (Line3D): The line object

  • n (Number): Z coordinate value

Returns: Point - Point on the line at the specified Z

Example:

Related: onlinex(), onliney()


oncircle(radius, x, y?, direction?)

Returns a point on a circle at specified parameters.

Parameters:

  • radius (Number): Circle radius

  • x (Number): Angle in degrees or arc length

  • y (Number, optional): Offset from circle (default: 0)

  • direction (Number, optional): Direction modifier (default: 1)

Returns: Point - Point on the circle

Example:


linel(line)

Returns the length of a line.

Parameters:

  • line (Line3D): The line object

Returns: Number - Length of the line

Example:

Related: perimeter(), surfarea()


closestPointOnLine(line, point)

Finds the closest point on a line to a given point (projection).

Parameters:

  • line (Line3D): The line object

  • point (Point): The reference point

Returns: Point - Closest point on the line

Example:

Related: intersect()


closestLineIndex(lines, line)

Finds the index of the closest line in a collection to a given line.

Parameters:

  • lines (Array of Line3D): Collection of lines

  • line (Line3D): Reference line

Returns: Number - Index of the closest line

Example:


toglobal(line)

Converts a line from local to global coordinates.

Parameters:

  • line (Line3D): The line in local coordinates

Returns: Line3D - Line in global coordinates

Example:

Related: onlineg()


nonlinearpoints(points)

Removes collinear points from a point list, keeping only points that create non-linear segments.

Parameters:

  • points (Array of Point): List of points

Returns: Array of Point - Filtered list with collinear points removed

Example:


linesplit(line, breakIndex)

Splits a line at a specified index into two lines.

Parameters:

  • line (Line3D): The line to split

  • breakIndex (Number): Index at which to split

Returns: Array - Two lines [line1, line2]

Example:


intersect(line1, line2, plane?, rayMode?)

Finds the intersection point between two lines.

Parameters:

  • line1 (Line3D): First line

  • line2 (Line3D): Second line

  • plane (String, optional): Plane for 2D intersection ("XY", "XZ", "YZ")

  • rayMode (Boolean, optional): If true, extends lines as rays

Returns: Point - Intersection point, or null if no intersection

Example:

Related: intersectalong(), polygonLineIntersect()


intersectalong(line1, line2, extLen?, plane?)

Finds intersection between two lines with optional extension length.

Parameters:

  • line1 (Line3D): First line

  • line2 (Line3D): Second line

  • extLen (Number, optional): Extension length for lines

  • plane (String, optional): Intersection plane

Returns: Point - Intersection point

Example:

Related: intersect()


polygonLineIntersect(polygon, line, mode?)

Finds intersection points between a polygon and a line.

Parameters:

  • polygon (Surface3D): The polygon

  • line (Line3D): The line

  • mode (Number, optional): Intersection mode

Returns: Array of Point - Intersection points

Example:

Related: intersect()


Surface/Volume Operations

surfarea(surface)

Calculates the area of a surface.

Parameters:

  • surface (Surface3D): The surface object

Returns: Number - Surface area

Example:

Related: volume(), perimeter()


volumesurfareas(volume)

Returns an array of areas for all surfaces of a volume.

Parameters:

  • volume (Volume): The volume object

Returns: Array of Numbers - Areas of each surface

Example:

Related: volumesurfperimeters(), volume()


volumesurfperimeters(volume)

Returns an array of perimeters for all surfaces of a volume.

Parameters:

  • volume (Volume): The volume object

Returns: Array of Numbers - Perimeters of each surface

Example:

Related: volumesurfareas(), perimeter()


volumesideareas(volume, side)

Returns the area of a specific side of a volume.

Parameters:

  • volume (Volume): The volume object

  • side (Number or String): Side identifier

Returns: Number - Area of the specified side

Example:

Related: volumesurfareas()


volumesurfdims(volume, algorithm?, side?)

Returns dimensions of volume surfaces (width, height, etc.).

Parameters:

  • volume (Volume): The volume object

  • algorithm (Number, optional): Algorithm type for dimension calculation

  • side (Number, optional): Specific side index

Returns: Object or Array - Surface dimensions

Example:

Related: volumesurfareas()


volume(volume)

Calculates the volume of a 3D solid.

Parameters:

  • volume (Volume): The volume object

Returns: Number - Volume value

Example:

Related: surfarea()


volumeextvectorlength(volume, mode?)

Returns the length of the extrusion vector for an extruded volume.

Parameters:

  • volume (Volume): The extruded volume object

  • mode (Number, optional): Calculation mode

Returns: Number - Extrusion vector length

Example:


perimeter(surface, isOpen?)

Calculates the perimeter of a surface or boundary.

Parameters:

  • surface (Surface3D): The surface object

  • isOpen (Boolean, optional): Whether the surface is open

Returns: Number - Perimeter length

Example:

Related: surfarea(), linel()


punchingperimeter(surface, distance, boundary)

Calculates the punching shear perimeter at a distance from a boundary.

Parameters:

  • surface (Surface3D): The surface (usually a slab)

  • distance (Number): Distance from the boundary

  • boundary (Boundary): The loaded area boundary

Returns: Number - Punching perimeter length

Example:

Related: punchingperimeterlines()


punchingperimeterlines(surface, distance, boundary)

Returns the line segments forming the punching shear perimeter.

Parameters:

  • surface (Surface3D): The surface

  • distance (Number): Distance from the boundary

  • boundary (Boundary): The loaded area boundary

Returns: Array of Line3D - Perimeter lines

Example:

Related: punchingperimeter()


Unit Conversion

withunits(num, primaryUnit, secondaryUnit?, unitType?, decimals?)

Formats a number with unit labels.

Parameters:

  • num (Number): The numeric value

  • primaryUnit (String): Primary unit system ("ft", "m", etc.)

  • secondaryUnit (String, optional): Secondary unit for dual display

  • unitType (String, optional): Unit category ("Length", "Force", etc.)

  • decimals (Number, optional): Decimal places

Returns: String - Formatted string with units

Example:

Related: convert(), unitlabel()


unitlabel(unitCategory, unitType)

Returns the unit label for a given category and type.

Parameters:

  • unitCategory (String): Unit category ("Default", "Metric", "Imperial")

  • unitType (String): Unit type ("Length", "Force", "Stress", etc.)

Returns: String - Unit label (e.g., "ft", "kN", "MPa")

Example:

Related: withunits(), convert()


convert(num, unitType, fromUnit, toUnit)

Converts a value from one unit to another.

Parameters:

  • num (Number): The value to convert

  • unitType (String): Type of unit ("Length", "Force", "Stress", etc.)

  • fromUnit (String): Source unit ("ft", "m", "kip", "kN", etc.)

  • toUnit (String): Target unit

Returns: Number - Converted value

Example:

Related: withunits(), unitlabel()


stationlabel(station, format?, decimals?)

Formats a station value according to standard station notation.

Parameters:

  • station (Number): Station value

  • format (String, optional): Format string

  • decimals (Number, optional): Decimal places

Returns: String - Formatted station label

Example:

Related: withunits()


Advanced Geometry

crange(value, min, max)

Maps a value to a color range (for visualization).

Parameters:

  • value (Number): The value to map

  • min (Number): Minimum value of range

  • max (Number): Maximum value of range

Returns: Color - Color value based on range

Example:


voronoi(surface, sitePoints, cutoutPoints?)

Generates a Voronoi diagram on a surface.

Parameters:

  • surface (Surface3D): The base surface

  • sitePoints (Array of Point): Site points for Voronoi cells

  • cutoutPoints (Array of Point, optional): Points to exclude

Returns: Array of Surface3D - Voronoi cells

Example:

Related: voronoipts()


voronoipts(surface, sitePoints, cutoutPoints?)

Returns the vertices of Voronoi cells.

Parameters:

  • surface (Surface3D): The base surface

  • sitePoints (Array of Point): Site points

  • cutoutPoints (Array of Point, optional): Points to exclude

Returns: Array of Point - Voronoi vertices

Example:

Related: voronoi()


hittest(surface, point, local?)

Tests if a point hits (is inside) a surface.

Parameters:

  • surface (Surface3D): The surface to test

  • point (Point): The point to test

  • local (Boolean, optional): Use local coordinates

Returns: Boolean - True if point is inside surface

Example:


Mesh Generation

stripmesh(line1, x1, line2, x2)

Generates a strip mesh between two lines.

Parameters:

  • line1 (Line3D): First boundary line

  • x1 (Number): Parameter on first line

  • line2 (Line3D): Second boundary line

  • x2 (Number): Parameter on second line

Returns: Mesh - Strip mesh object

Example:

Related: gridmesh()


gridmesh(arg0, arg1, arg2?, arg3?)

Generates a grid mesh from parameters.

Parameters:

  • arg0, arg1, arg2, arg3: Grid definition parameters (varies by use case)

Returns: Mesh - Grid mesh object

Example:

Related: stripmesh()


Object/Point Functions

point(obj, index?)

Retrieves a point from an object.

Parameters:

  • obj (Object): The object containing points

  • index (Number, optional): Point index

Returns: Point - The requested point

Example:


cog(obj)

Calculates the center of gravity (centroid) of an object.

Parameters:

  • obj (Object): The object (surface, volume, or line)

Returns: Point - Center of gravity

Example:

Related: surfarea(), volume()


Value/Expression Functions

value(targetParam, sourceParam?, sourceValue?)

Evaluates the value of a parameter in a different context.

Parameters:

  • targetParam (String): Name of parameter to evaluate

  • sourceParam (String, optional): Source parameter for context

  • sourceValue (Any, optional): Value for source parameter

Returns: Any - Evaluated parameter value

Example:

Note: This is useful for evaluating station-dependent parameters at specific locations.


String Manipulation

startswith(str, prefix)

Tests if a string starts with a specified prefix.

Parameters:

  • str (String): The string to test

  • prefix (String): The prefix to check

Returns: Boolean - True if string starts with prefix

Example:

Related: endswith()


endswith(str, suffix)

Tests if a string ends with a specified suffix.

Parameters:

  • str (String): The string to test

  • suffix (String): The suffix to check

Returns: Boolean - True if string ends with suffix

Example:

Related: startswith()


substringcount(str, substring)

Counts occurrences of a substring within a string.

Parameters:

  • str (String): The string to search

  • substring (String): The substring to count

Returns: Number - Count of occurrences

Example:


replaceall(str, find, replace)

Replaces all occurrences of a substring with another string.

Parameters:

  • str (String): The source string

  • find (String): The substring to find

  • replace (String): The replacement string

Returns: String - Modified string

Example:

Related: removewhitespaces()


removewhitespaces(str)

Removes all whitespace characters from a string.

Parameters:

  • str (String): The string to process

Returns: String - String without whitespace

Example:

Related: replaceall()


mergeLinePoints(targetLines, constraints?, tolerance?)

Merges nearby points in a collection of lines based on tolerance.

Parameters:

  • targetLines (Array of Line3D): Lines to process

  • constraints (Object, optional): Merge constraints

  • tolerance (Number, optional): Distance tolerance for merging

Returns: Array of Line3D - Lines with merged points

Example:


Functional Programming & Advanced Operations

These advanced functions provide functional programming capabilities, station-dependent expressions, and conditional logic.

map(list, lambda)

Applies a lambda function to each element of a list and returns a new list with the results.

Parameters:

  • list (Array): The array to map over

  • lambda (Lambda Expression): Function to apply to each element (uses x for element, i for index)

Returns: Array - New array with transformed elements

Example:

⚠️ CRITICAL PERFORMANCE NOTE:

ALWAYS use map() for parameter loops—NEVER use Repeat for data transformations!

Using Repeat to calculate parameter values creates unnecessary objects in the project tree, causing severe performance degradation (10-100x slower). Use map() for all data transformations.

❌ WRONG - Using Repeat for calculations:

✅ CORRECT - Using map():

Common Use Cases for map():

When to Use Repeat vs map():

  • Use Repeat: Creating objects (Points, FENodes, Volumes, Beams, etc.)

  • Use map(): Transforming data, extracting properties, calculating values

See the Parametric Engine Guide section 4.1 for detailed explanation.

Related: filter(), reduce()


filter(list, lambda)

Filters a list based on a condition, returning only elements that match.

Parameters:

  • list (Array): The array to filter

  • lambda (Lambda Expression): Condition to test each element (uses x for element, i for index)

Returns: Array - Filtered array containing only matching elements

Example:

Related: map(), index()


reduce(list, lambda)

Reduces a list to a single value by applying a function cumulatively.

Parameters:

  • list (Array): The array to reduce

  • lambda (Lambda Expression): Reduction function (uses x for accumulator, y for current element)

Returns: Any - Single accumulated value

Example:

Related: suml(), avg()


maxl(list, lambda?)

Finds the maximum value in a list based on an optional lambda function.

Parameters:

  • list (Array): The array to search

  • lambda (Lambda Expression, optional): Function to extract comparison value from each element. If omitted, compares the values directly.

Returns: Any - Maximum value

Example:

Related: minl(), max()


minl(list, lambda?)

Finds the minimum value in a list based on an optional lambda function.

Parameters:

  • list (Array): The array to search

  • lambda (Lambda Expression, optional): Function to extract comparison value from each element. If omitted, compares the values directly.

Returns: Any - Minimum value

Example:

Related: maxl(), min()


suml(list, lambda?)

Calculates the sum of values extracted from a list using an optional lambda function.

Parameters:

  • list (Array): The array to sum

  • lambda (Lambda Expression, optional): Function to extract value from each element. If omitted, sums the values directly.

Returns: Number - Sum of extracted values

Example:

Related: avg(), reduce(), sum()


avg(list, lambda?)

Calculates the average of values extracted from a list using an optional lambda function.

Parameters:

  • list (Array): The array to average

  • lambda (Lambda Expression, optional): Function to extract value from each element. If omitted, averages the values directly.

Returns: Number - Average of extracted values

Example:

Related: suml()


sort(list, lambda?, ascending?)

Sorts a list based on a comparison function.

Parameters:

  • list (Array): The array to sort

  • lambda (Lambda Expression, optional): Function to extract sort key from each element

  • ascending (Number, optional): 1 for ascending (default), 0 for descending

Returns: Array - Sorted array

Example:

Related: reverse()


reverse(list)

Reverses the order of elements in a list.

Parameters:

  • list (Array): The array to reverse

Returns: Array - Reversed array

Example:

Related: sort()


unique(list, lambda) / removedup(list, lambda)

Removes duplicate elements from a list based on a lambda function.

Parameters:

  • list (Array): The array to filter

  • lambda (Lambda Expression): Function to extract comparison value from each element

Returns: Array - Array with duplicates removed

Example:

Related: filter()


index(list, lambda)

Finds the index of the first element that matches a condition.

Parameters:

  • list (Array): The array to search

  • lambda (Lambda Expression): Condition to test each element

Returns: Number - Index of first matching element, or -1 if not found

Example:

Related: filter()


iif(condition1, value1, condition2, value2, ..., elseValue?)

Inline if-elseif-else function for conditional expressions.

Parameters:

  • condition1, condition2, ... (Boolean): Conditions to test

  • value1, value2, ... (Any): Values to return when conditions are true

  • elseValue (Any, optional): Default value if no conditions match

Returns: Any - First matching value, or elseValue, or 0

Example:

Note: More flexible than ternary operator for multiple conditions


atstation(station, expression)

Evaluates an expression at a specific station value, temporarily overriding the current station context.

Parameters:

  • station (Number): Station value to evaluate at

  • expression (Expression): Expression to evaluate

Returns: Any - Result of expression evaluated at the given station

Example:

Note: Useful for evaluating station-dependent parameters at specific locations


makestadep(stations, values, variations?)

Creates a station-dependent expression from discrete station/value pairs. The function returns a station-dependent parameter that can be evaluated at any station using atstation().

Parameters:

  • stations (Array of Numbers): Station values

  • values (Array of Numbers or Arrays): Values at each station. Note: The values array should have one less element than stations (i.e., values.length = stations.length - 1), as shown in examples. Each element can be a single number or an array of numbers (for multiple values per station).

  • variations (Array of Strings, optional): Variation types between stations ('linear', 'parabola', 'circle', 'polynomial'). Should match the number of gaps (stations.length - 1).

Returns: Number - Interpolated value at current station

Example:

Additional Example for Array Values (Multiple Values per Station):

Another Example (3 Stations, 2 Gaps):

Related: variation(), makestadepexpr() Example:

Related: atstation(), variation(), makestadepexpr()


makestadepexpr(stations, values, variations?)

Creates a station-dependent expression string (not evaluated).

Parameters:

  • stations (Array of Numbers): Station values

  • values (Array of Numbers): Values at each station

  • variations (Array of Strings, optional): Variation types

Returns: String - Station-dependent expression as text

Example:

Related: makestadep()


variation(type, fromValue, toValue, ...)

Creates a variation between two values based on relative position (0 to 1).

Parameters:

  • type (String): Variation type - 'linear', 'parabola', 'circle', 'polynomial', 'custom'

  • fromValue (Number): Starting value

  • toValue (Number): Ending value

  • Additional parameters depend on type:

    • parabola: parabolaType ('concavedown' or 'concaveup')

    • circle: radius, circleType

    • polynomial: startGrade, endGrade

    • custom: lambda function

Returns: Number - Interpolated value

Example:

Note: Requires context with station or relative position (x) set


variations(params...)

Returns the list of variation types used in the given parameters.

Parameters:

  • params... (Parameters): Parameters to check for variations

Returns: Array of Strings - List of variation types found

Example:


makelist(params...) / rangelist(params...)

Creates a list from station-dependent range values.

Parameters:

  • params... (Parameters): Parameters with range values

Returns: Array - Unique values from all ranges

Example:

Note: Automatically extracts values from station-dependent ranges


exportval(paramName, object?, defaultReturn?)

Exports a parameter value from an object, with optional default.

Parameters:

  • paramName (String): Name of parameter to export

  • object (Object, optional): Object to export from

  • defaultReturn (Any, optional): Default value if parameter not found (default: 0)

Returns: Any - Parameter value or default

Example:


paramlabel(param)

Returns the display label of a parameter or object name.

Parameters:

  • param (Parameter or Object): Parameter or object to get label from

Returns: String - Parameter label or object name

Example:

Note: Returns the user-facing label, not the internal parameter name


External Module Functions

These functions are available when specific modules are loaded in the context.

Section Analysis Functions (SEC.Functions)

Available when section analysis module is loaded. Defined in Functions.ts.

momentCapacity(section, orientation, strain, axial, ...)

Calculates moment capacity of a cross-section.

Parameters:

  • section (Section): The section object

  • orientation (Number): Load orientation angle

  • strain (Number): Maximum strain

  • axial (Number): Axial force

  • Additional parameters for analysis settings

Returns: Number - Moment capacity value

Example: