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’
force String 'N', 'lbf', 'kip' 'N'
moment String 'N*m', 'N*mm', 'lbf*in' 'N*m'
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.  
open
Open the existing .ssp. Returns false if it fails.
Parameters:
Name Type Accepted Values Default Value
file String Path to a .ssp file.  
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.
Parameters:
Name Type Accepted Values Default Value
numberOfCoresToUse Number '4', '8' All available cores

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: ‘Steel,Aluminum’.
Parameters:
Name Type Accepted Values Default Value
material String
partNameMask String ‘*’
partNameMaskDelimiter 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
addStructuralAnalysis
Creates a new structural analysis. Returns the Analysis object.
Parameters:
Name Type Accepted Values Default Value
type String 'multiload'
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.
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.5', 'mm'
units Object Same as for setDefaultUnits Taken from the Project level
addConnections Boolean 'true', 'false' 'false'
connGap Number   Calculated based on geometry
connPenetration Number   Calculated based on geometry
connResolution String 'normal', 'increased', 'high' 'normal'
deleteParts
Delete specific parts from the design study. To set multiple masks the delimiter specified by partNameMaskDelimiter is used, for example, partNameMask: ‘Steel,Aluminum’.
Parameters:
Name Type Accepted Values Default Value
partNameMask String  
partNameMaskDelimiter String    

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
addInertialRelief
Adds the Inertial relief boundary condition.
importForces
Imports forces from a .csv file and creates new load cases.
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
importRemoteLoads
Imports remote loads from a .csv file and creates new load cases.
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
importSpotDisplacements
Imports spot displacements from a CSV file and creates a new constraint.
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
getName
Returns the name of the analysis.
exportToCSV
Exports the analysis results to a CSV file.
Parameters:
Name Type Accepted Values Default Value
file String Path to a .csv file
datumPointSet Object Datum Point Set object  

Datum Point Set Object

Functions:
getName
Returns the name of the datum point set.