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.
Parameters:
Name Type Accepted Values Default Value
length String ‘mm’, ‘cm’, ‘m’, ‘in’ ‘mm’
angle String ‘deg’, ‘rad’ ‘deg’
addDesignStudy
Creates a new design study by importing geometry from a CAD file. Returns the Design Study object.
Parameters:
Name Type Accepted Values Default Value
file String Path to a CAD file
reader String ‘parasolid’, ‘ct’ ‘parasolid’
resolution String ‘standard’, ‘enhanced’, ‘fine’, ‘custom’ ‘standard’
angularDev Number 15.0, deg
chordalDev Number 0.635, mm
units Object Same as for setDefaultUnits Taken from the Project level
save
Saves the project into .ssp. Returns false if it fails.
Parameters:
Name Type Accepted Values Default Value
file String Path to a .ssp file.  

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.
Parameters:
Name Type Accepted Values Default Value
material String
partNameMask String ‘*’
addConnections
Creates regular connections automatically between all parts.
Parameters:
Name Type Accepted Values Default Value
gap Number Calculated based on geometry
penetration Number Calculated based on geometry
resolution String ‘normal, ‘increased’, ‘high’ ‘normal’
units Object Same as for setDefaultUnits Taken from the Project level
hasDisconnectedGroupsOfParts
Checks if there are more than one disconnected group of parts.
addModalAnalysis
Creates a new Modal analysis. Returns the Analysis object.
Parameters:
Name Type Accepted Values Default Value
numOfModes Number    
addDatumPointSet
Imports datum points from a .csv file. Returns the Datum Point Set object.
Parameters:
Name Type Accepted Values Default Value
file String Path to a CSV file
units Object Same as for setDefaultUnits Taken from the Project level

Analysis Object

Functions:
setSolutionSettings
Sets the default solution settings for the analysis.
Parameters:
Name Type Accepted Values Default Value
objective String ‘stiffness’, ‘stress’, ‘custom’ ‘stiffness’
refinement String ‘standard’, ‘increased’, ‘high’ ‘standard’
numOfPasses Number Any number between 2 and 8 inclusively 3
adaptToFeatures Boolean true, false false
adaptToThinSolids Boolean true, false false
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.
Parameters:
Name Type Accepted Values Default Value
partNameMask String ‘*’
refinement String ‘standard’, ‘increased’, ‘high’ ‘standard’
adaptToFeatures Boolean true, false false
adaptToThinSolids Boolean true, false false
solve
Solves the analysis.
exportToUNV
Exports the analysis results to a UNV file.
Parameters:
Name Type Accepted Values Default Value
file String Path to a UNV file
datumPointSet Object Datum Point Set object