ParamML README
Overview
You are working with OpenBrIM's Parametric Engine (ParamML), a powerful XML-based parametric modeling system for bridge engineering and infrastructure projects. This system enables the creation of intelligent, data-driven bridge components through parametric expressions, inheritance, and lazy evaluation.
What is ParamML?
ParamML (Parametric Markup Language) is an XML-based language that defines:
Parametric Objects: Hierarchical objects with parameters and expressions
Library Components: Reusable templates for bridge elements (girders, columns, decks, etc.)
3D Geometry: Points, Lines, Surfaces, and Volumes
FEA Models: Finite Element Analysis meshes and boundary conditions
Code Checks: Design verification and compliance calculations
Reports: Automated documentation and analysis results
File Structure
When you download a branch, you'll receive:
1. Branch XML Files (Main Objects)
ObjectName.xml- The library objects you're working onThese are the objects that were modified or developed in this branch
2. Dependency XML Files (Referenced Objects)
__dep__ObjectName.xml- Library objects that are referenced by your main objectsPrefixed with
__dep__to distinguish them from your working filesThese are automatically downloaded based on the
subobjtypes(object type references) in your main objectsExample: If your girder object uses a
StandardSectionobject,__dep__StandardSection.xmlwill be downloaded
3. AI Documentation Files (.md)
These are guides to help you understand and work with the ParamML system:
Core Guides (Read These First):
AI-Parametric-Engine-Guide.md- ESSENTIAL - Read FIRSTExplains Objects, Parameters, Expressions, Lazy Evaluation
Covers Repeat loops, Guards, Library Objects, Export objects
Distance-based parameter resolution
Performance optimization patterns
AI-ParamML-Functions-Reference.md- Function library referenceMathematical, geometric, and alignment functions
Array operations (map, filter, reduce)
String manipulation and utility functions
Task-Specific Guides (Read When Needed):
AI-FEA-Guide.md- Finite Element AnalysisFENode, FELine, FESurf element types
Boundary conditions, loads, analysis cases
Mesh generation and node merging
AI-3D-Visualization-Guide.md- 3D GeometryPoint, Line, Surface, Volume primitives
Texture mapping and materials
Parametric shapes and extrusions
AI-Bridge-Alignment-Guide.md- Bridge AlignmentsHorizontal and vertical alignment functions
Superelevation and cross-slope
Station-based positioning
Key Concepts (Quick Reference)
1. XML Object Structure
2. Parameter Roles
Role="Input"- User-editable, automatically exported (accessible to other objects)Role="Private"- Internal calculations, not exportedNo role - Private by default
3. Export Objects
To export computed parameters, place them inside <O T="Export"> containers. Parameters inside Export objects are automatically accessible to other objects.
Important Dependency Rule: If an exported parameter depends on other parameters, those dependencies must also be exported OR have Role="Input".
Naming Export Objects: Export objects can have names (e.g., <O N="MyExport" T="Export">). This is useful when extending objects, as named Export groups can be overridden with Override="1".
For more details: See AI-Export.md
4. Library Objects (Templates)
5. Extending Objects
Use Extends attribute to inherit from other objects. For multiple inheritance, use array syntax.
6. Object References
@ObjectName|ObjectType- Reference by name and typeObjectName.ParameterName- Access object parametersRepeatName[i].ParameterName- Array access in Repeat loopsRepeatName[i-1].ParameterName- Access previous iteration
7. Coordinate Format
ALWAYS use inline X-Y-Z attributes (no spaces in expressions):
8. Repeat Loops
9. Performance Rules
Use Repeat ONLY for creating objects (Points, Lines, FENodes, etc.)
Use map() for data transformations - 100x faster than Repeat
Use filter() for selecting subsets
Use reduce() for aggregations
Working with This Code
Step 1: Read Documentation Guides
Before starting any task, read the relevant AI guides:
Always read first:
AI-Parametric-Engine-Guide.md(core foundation)If working with FEA:
AI-FEA-Guide.mdIf using functions:
AI-ParamML-Functions-Reference.mdIf working with 3D geometry:
AI-3D-Visualization-Guide.mdIf working with alignments:
AI-Bridge-Alignment-Guide.md
Step 2: Understand the Object Type
Library Objects:
T="Project"with Tags - reusable templatesGeometry: Point, Line, Surface, Volume
FEA: FENode, FELine, FESurf, FEGroup
Structural: Girder, Column, Deck, Bearing
Analysis: AnalysisCase, LoadCase, LoadCombination
Step 3: Follow XML Formatting Standards
Use inline X-Y-Z attributes for coordinates
No spaces around operators in expressions (e.g.,
i*12noti * 12)Self-closing tags when no children:
<O T="Point" .../>Comments for clarity:
<!-- Description -->
Step 4: Parameter Best Practices
Use
Role="Input"for user-editable values (automatically exported)Place computed results inside
<O T="Export">containersInclude
UT(UnitType) for engineering valuesAdd
D(Description) for documentationEnsure exported parameters only depend on other exported params or
Role="Input"params
Step 5: Test Expressions
All expressions use JavaScript syntax
Lazy evaluation - computed only when needed
Ternary operators:
condition ? trueValue : falseValueMath functions:
sin(),cos(),sqrt(),abs(), etc.Array functions:
map(),filter(),reduce(),sum(),max(),min()
Common Patterns
Creating Library Components
FEA Mesh Generation
Alignment-Based Positioning
Referencing Objects Pattern (Bidirectional References)
Use this pattern to create automatic two-way references between parent and child objects.
Use Cases:
Girder → Cross Frames (bracings)
Pier Column → Foundation
Deck → Barrier
Key Points:
Parent has
ReadOnly="1"list in "Referencing Objects" groupChild uses
RefParam="@bracings"to register itself with parentSystem automatically adds/removes child from parent's list
Other objects can navigate through references (e.g., Deck takes girder list, then accesses
girder.bracingsto reach cross frame data)
File Types
.md- Markdown documentation (AI guides).xml- XML data files (library objects, type definitions).ts- TypeScript source code (ParamML engine implementation)
Common Tasks
Adding New Library Objects
Read:
AI-Parametric-Engine-Guide.md(Library Objects section)Define
T="Project"with proper Tags and CategoryAdd
Role="Input"parameters for user configuration (automatically exported)Add internal calculations (no role - private by default)
Create
<O T="Export">for computed results that need to be accessible externallyEnsure exported params only depend on other exported params or
Role="Input"params
Creating FEA Models
Read:
AI-FEA-Guide.mdCreate nodes with
T="FENode"(use X, Y, Z attributes)Create elements (FELine, FESurf, FEVolume)
Define boundary conditions (Tx, Ty, Tz, Rx, Ry, Rz)
Create analysis cases and load combinations
Reference nodes using
@NodeName|FENode
Working with 3D Geometry
Read:
AI-3D-Visualization-Guide.mdUse Point, Line, Surface, Volume types
Define coordinates with inline X, Y, Z attributes
Use Repeat for parametric arrays
Apply materials and textures as needed
Code Review Checklist
When reviewing ParamML code, systematically check for these common issues:
1. Parameter Name Validation
Check: All parameter overrides use correct names from parent object
How to Check:
Open
__dep__ParentObjectName.xmlfileList all
Role="Input"parametersVerify each override matches an actual parameter name
Flag typos or non-existent parameter names
2. Complete Parameter Overrides (Extends)
Check: All parameters affecting referenced child objects are overridden
How to Check:
Find all references to child objects:
ObjectName.ChildGroup.PropertyOpen
__dep__file, trace which input parameters affect those child objectsVerify ALL those parameters are either:
Overridden with appropriate values
Left as default AND defaults make sense for this use case
3. Coordinate Format Standards
Check: All coordinates use inline X-Y-Z attributes, no spaces in math
4. Performance: Repeat vs map() and StaticParams
Check: Using Repeat only for objects, map() for data transformations
Check: Using StaticParams for constant parameters in Repeat loops
IMPORTANT: StaticParams value must be enclosed in square brackets [].
How to Check:
Find all Repeat loops
Identify parameters that don't depend on loop variable (i, j, etc.)
Add those parameter names to StaticParams attribute
Format:
StaticParams="[Param1,Param2,Param3]"(with square brackets!)
5. FEA Content Separation
Check: FEA-specific code should reference AI-FEA-Guide.md
FENode, FELine, FESurf, FEGroup → FEA-specific
Point, Line, Surface, Volume → General geometry
6. Input Parameter Renaming - Breaking Changes
Check: Renaming Role="Input" parameters in workflow objects requires backwards compatibility
Critical Rule: If a library object appears in a Workflow (check *Workflow*.xml files), renaming its Role="Input" parameters is a breaking change for end users.
Why This Matters:
End users have saved projects with parameter values using old names
Renaming parameters loses user's saved values (silent failure)
Users must manually re-enter all values - unacceptable UX
Problem Example:
Solution:
If renaming Role="Input" parameters in workflow objects, implement backwards compatibility to preserve old parameter values. This ensures users don't lose their saved data when updating software versions.
Best Practice:
Check workflow files before renaming to see if object is user-facing
If object is in workflow → Backwards compatibility may be needed to preserve user data
If object is NOT in workflow → Update dependent objects in same branch
Document parameter renames in release notes
7. DesignRun Object Completeness Check (DR Objects)
Check: For DesignRun (DR) objects, verify all Base object's Role="Input" parameters are mapped in T="DesignRun" group
What are DR Objects?
DR (DesignRun) objects are wrapper objects that execute Base library objects with user-provided inputs
They map user inputs from the DR object's interface to the Base object's parameters
Pattern:
*OBPDR_*.xmlfiles contain DR objects, they reference*OBPBase_*.xmlfilesFile naming: Base object
OBPBase_MyObject.xml→ DR objectOBPDR_MyObject.xml
Structure:
Why This Matters:
Missing Input parameters → Base uses default values instead of user inputs → Silent failures
Users lose control over critical design parameters
Results may be incorrect without any warning
Incomplete mapping is the #1 cause of DR object bugs
⚠️ WARNING: DesignRun Non-Input Parameter Override
DesignRun has a dangerous capability that must be carefully controlled:
The Problem:
DesignRun can override ANY parameter in the Base object, not just
Role="Input"parametersWhen you override a non-Input parameter, ALL occurrences of that parameter in the Base object scope are overridden
This is NOT recommended and should be avoided in most cases
Example - Unintended Override:
When This Happens:
❌ Breaks Base object's internal logic - calculated parameters no longer use intended values
❌ Creates maintenance nightmare - changes to Base don't behave as expected
❌ Violates separation of concerns - DR should only provide input data, not override calculations
❌ Hard to debug - override affects multiple locations silently
What To Do Instead:
If user needs to control a parameter that's not Role="Input":
Add
Role="Input"to that parameter in the Base objectMakes it officially part of the Base object's API
Clear to all developers that this parameter is meant to be configurable
Proper design pattern
If parameter should remain internal:
Do NOT override it from DR
Modify Base object logic if behavior needs to change
Keep data override (DR) separate from logic (Base)
How to Check:
Step 1: Identify the Base object reference
Step 2: Extract all Role="Input" parameters from Base object
Open the corresponding Base file (e.g.,
OBPBase_MyObject.xml)Find ALL parameters with
Role="Input"attributeCreate a list of these parameter names (these MUST be mapped)
Step 3: Verify each Base input exists in DesignRun group
Check the
<O N="..." T="DesignRun">group in the DR fileVerify EVERY Base
Role="Input"parameter has a corresponding<P N="paramName" .../>entryParameter names must match EXACTLY (no spaces, correct spelling)
Step 4: Check for non-Input parameter overrides
Identify any parameters in DesignRun that are NOT
Role="Input"in BaseThese are problematic overrides that should be flagged
Review why these exist and if Base object should be modified instead
Step 5: Check for naming errors
Watch for trailing/leading spaces:
N="param "vsN="param"Watch for typos or case sensitivity issues
Parameter names must match Base object exactly (character-by-character)
Automated Check (PowerShell):
Common Issues:
Forgotten Input Parameters: New
Role="Input"added to Base but not mapped in DRSpacing Errors:
N="param "(with space) vsN="param"(correct)Typos: Parameter name misspellings
Version Mismatch: DR references old Base version, missing new parameters
Unintended Non-Input Overrides: DR overrides calculated parameters (MUST FIX)
Best Practice:
Always map ALL
Role="Input"parameters from Base to DR (mandatory)NEVER override non-Input parameters in DesignRun
When adding new
Role="Input"to Base → immediately add to corresponding DRUse automated scripts during code review to verify completeness
If non-Input override is found → add
Role="Input"to Base or remove override from DR
Review Process:
When user says "review the code":
✅ Validate parameter names against
__dep__files✅ Check complete overrides for all referenced child objects
✅ Verify coordinate format (inline X-Y-Z, no spaces)
✅ Check Repeat optimization (use map() for data, StaticParams for constants)
✅ Check formatting (no spaces in math:
i*12noti * 12)✅ Check input parameter renames (if workflow files exist and parameters renamed, warn user about backwards compatibility)
✅ Check DesignRun completeness (for DR objects with
T="DesignRun": find the Base object viaLibObjTypeNameparameter, verify all BaseRole="Input"parameters are mapped in DesignRun group, flag any non-Input parameter overrides)
Important Notes
⚠️ Always read the AI documentation guides before starting work (start with AI-Parametric-Engine-Guide.md)
⚠️ Understand file types:
Main objects (
ObjectName.xml) - Your working filesDependencies (
__dep__ObjectName.xml) - Referenced library objectsGuides (
.mdfiles) - Documentation to help you understand the system
⚠️ FEA-specific content belongs in AI-FEA-Guide.md, not AI-Parametric-Engine-Guide.md
⚠️ Use inline X-Y-Z attributes for all coordinate definitions
⚠️ No spaces in mathematical expressions (e.g., i*12 not i * 12)
⚠️ Use map() for data transformations, Repeat only for objects
⚠️ Type name is Surface not Surface3D in XML (Surface3D is TypeScript class name)
⚠️ Parameter Scope and Shared Parameters:
Parameters in sibling Groups under the same parent CAN access each other
When parameters are used by multiple sibling Groups, consider organizing them:
Option 1: Keep shared parameters in one Group if primary usage is there (sibling access works)
Option 2: Move to parent level for clearer organization and better documentation
Both approaches work technically, but Option 2 is preferred for maintainability
Example: Shared parameters between CADD drawings and Section geometry:
Getting Help
When you need clarification:
Check the relevant AI guide first (AI-Parametric-Engine-Guide.md, AI-FEA-Guide.md, etc.)
Search for similar examples in the guides
Check
__dep__files to understand referenced object structures
Summary
This is a sophisticated parametric modeling system for bridge engineering. The XML files define intelligent, data-driven components that:
Automatically calculate results from input parameters
Generate 3D geometry and FEA meshes
Perform design checks and code compliance
Update dynamically when parameters change
Export computed results for use by other objects
Reference other library objects (downloaded as
__dep__files)
Quick Start:
Read
AI-Parametric-Engine-Guide.mdfirstExamine your main XML files (
ObjectName.xml)Check
__dep__files to understand dependenciesFollow formatting standards and best practices
Create robust, reusable parametric components
Generated for AI Agents working with OpenBrIM ParamML Code
Last updated