SimSolid JavaScript Reference
Global Object
Attributes:
- errorCode
- Integer, returned by SimSolid.exe, by default is 0.
Tip: Run the following command to check the error
code returned by SimSolid.exe:
echo Exit Code is %errorlevel%
Project Object
Functions:
- setDefaultUnits
- Sets default units for the project.
- addDesignStudy
- Creates a new design study by importing geometry from a CAD file. Returns the Design Study object.
- save
- Saves the project into .ssp. Returns false if it fails.
- open
- Open the existing .ssp. Returns false if it fails.
- initializeSolutions
- Deletes all solutions and response meshes.
- solveAllAnalyses
- Solves all analyses.
- getDesignStudies
- Returns the collection of all Design Studies objects.
- setOptions
- Sets options to pick the number of cores to use for the solution.
Design Study Object
Functions:
- applyMaterial
- Applies a material to all or specific parts. Returns false if could not find any part satisfying the mask specified by partNameMask. To set multiple masks the delimiter specified by partNameMaskDelimiter is used; for example, partNameMask: ‘Part 1, Part 2’.
- addConnections
- Creates regular connections automatically between all parts.
- hasDisconnectedGroupsOfParts
- Checks if there are more than one disconnected group of parts.
- addModalAnalysis
- Creates a new Modal analysis. Returns the Analysis object.
- addDatumPointSet
- Imports datum points from a .csv file. Returns the Datum Point Set object.
- addStructuralAnalysis
- Creates a new structural analysis. Returns the Analysis object.
- getName
- Returns the name of the design study.
- getAnalyses
- Returns the collection of all Analysis objects.
- getDatumPointSets
- Returns the collection of all Datum Point Set objects.
- addParts
- Import new parts into the design study. Could add new connections automatically.
- deleteParts
- Delete specific parts from the design study. To set multiple masks the delimiter specified by partNameMaskDelimiter is used, for example, partNameMask: ‘Part 1, Part 2’.
Analysis Object
Functions:
- setSolutionSettings
- Sets the default solution settings for the analysis.
- addSolutionSettingsGroup
- Adds a custom group of solution settings for specific parts. Returns false if it could not find any part satisfying the mask specified by partNameMask.
- solve
- Solves the analysis.
- exportToUNV
- Exports the analysis results to a UNV file.
- addInertialRelief
- Adds the Inertial relief boundary condition.
- importForces
- Imports forces from a .csv file and creates new load cases.
- importRemoteLoads
- Imports remote loads from a .csv file and creates new load cases.
- importSpotDisplacements
- Imports spot displacements from a CSV file and creates a new constraint.
- getName
- Returns the name of the analysis.
- exportToCSV
- Exports the analysis results to a CSV file.
Datum Point Set Object
Functions:
- getName
- Returns the name of the datum point set.