API Reference
Complete reference documentation for all SimLab Python API classes and methods.
class simlabpy.Arguments
The Arguments class provides functionality for arguments objects.
Methods
isFound(key: str) → bool
getAsNumber(key: str) → float
getAsString(key: str) → str
getAsColor(key: str) → Color
getAsVector3(key: str) → Vector3
getAsNumberArray(key: str) → float
getAsStringArray(key: str) → str
getAsColorArray(key: str) → Color
getAsVector3Array(key: str) → Vector3
class simlabpy.BoundingBox
The BoundingBox class provides axis-aligned bounding box information.
Methods
getCenter() → Vector3
getMax() → Vector3
getMin() → Vector3
class simlabpy.Camera
The Camera class provides control over camera properties.
Properties
fov
float
up
Vector3
targetPosition
Vector3
Methods
getFov() → float
getRoll() → float
getPosition() → Vector3
getTargetPosition() → Vector3
getUp() → Vector3
setFov(fieldOfView: float)
setRoll(roll: float)
setPosition(newPosition: Vector3)
setTargetPosition(newTargetPosition: Vector3)
setUp(newUpVector: Vector3)
class simlabpy.Color
The Color class represents RGB color values.
Methods
red() → float
green() → float
blue() → float
setRed(newR: float)
setGreen(newG: float)
setBlue(newB: float)
class simlabpy.Dictionary
The Dictionary class provides functionality for dictionary objects.
Methods
isFound(key: str) → bool
getAsNumber(key: str) → float
getAsString(key: str) → str
getAsColor(key: str) → Color
getAsVector3(key: str) → Vector3
getAsNumberArray(key: str) → List
getAsStringArray(key: str) → List
getAsColorArray(key: str) → List
getAsVector3Array(key: str) → List
set(key: str, floatValue: float)
set(key: str, stringValue: str)
set(key: str, colorValue: Color)
set(key: str, vectorValue: Vector3)
set(key: str, floatValues: List)
set(key: str, stringValues: List)
set(key: str, colorValues: List)
set(key: str, vectorValues: List)
class simlabpy.DynamicDiagram
The DynamicDiagram class provides functionality for dynamicdiagram objects.
Methods
getName() → str
getGUID() → str
getContent() → str
setContent(content: str)
class simlabpy.Image
The Image class provides functionality for image objects.
Properties
path
str
Methods
getPath() → str
setPath(imageFilePath: str)
class simlabpy.Light
The Light class represents light sources in the scene.
Properties
brightness
Union[int, float]
outerConeAngle
Union[int, float]
blend
float
Color
Color Read-only
Methods
getBrightness() → float
getInnerConeAngle() → float
getOuterConeAngle() → float
getColor() → Color
getType() → str
getIESFileName() → str
getCastShadow() → bool
getBlend() → float
setBrightness(newBrightness: float)
setInnerConeAngle(newInnerConeAngle: float)
setOuterConeAngle(newOuterConeAngle: float)
setColor(newColor: Color)
setType(lightType: str)
setIESFileName(iesFilePath: str)
setCastShadow(bNewCastShadowStatus: bool)
setBlend(newLightBlend: float)
class simlabpy.Material
The Material class manages surface properties of 3D objects.
Methods
getName() → str
getDiffuseColor() → Color
getAmbientColor() → Color
getEmissiveColor() → Color
getSpecularColor() → Color
getEta() → float
getDiffuseTexture() → Texture
getBumpTexture() → Texture
getOpacityTexture() → Texture
getReflectionTexture() → Texture
getNormalTexture() → Texture
getRoughnessTexture() → Texture
getMaterialType() → str
setName(newMaterialName: str)
setDiffuseColor(newdiffuseColor: Color)
setAmbientColor(newAmbientColor: Color)
setEmissiveColor(newEmissiveColor: Color)
setSpecularColor(newSpecularColor: Color)
setEta(newEtaValue: float)
setDiffuseTexture(newDiffuseTexture: Texutre)
setBumpTexture(newBumpTexture: Texutre)
setOpacityTexture(newOpacityTexture: Texutre)
setReflectionTexture(newOpacityTexture: Texutre)
setNormalTexture(newOpacityTexture: Texutre)
setRoughnessTexture(newRoughnessTexture: Texutre)
setMaterialType(newMaterial: str)
set(newMaterial: Material)
class simlabpy.Matrix4x4
The Matrix4x4 class represents 4x4 transformation matrices.
Properties
inverse
Matrix4x4
Methods
set() → Matrix4x4
getInverse() → Matrix4x4
scale(scaleX: float, scaleY: float, scaleZ: float) → Matrix4x4
scaleInPlace(scaleX: float, scaleY: float, scaleZ: float)
multiply(multiplyMatrix: Matrix4x4) → Matrix4x4
multiplyInPlace(multiplyMatrix: Matrix4x4)
transformPosition(inputVector: Vector3) → Vector3
translate(inputVector: Vector3) → Matrix4x4
translateInPlace(inputVector: Vector3)
rotate(inputFromVector: Vector3, inputToVector: Vector3) → Matrix4x4
rotateInPlace(inputVector1: Vector3, inputVector2: Vector3)
rotateAboutVectorInPlace(angle: float, aroundVector: Vector3)
class simlabpy.Node
The Node class represents 3D objects in the scene.
Properties
visible
bool
name
str
Methods
Node() → Node
getGUID() → str
getName() → str
setName(newName: str)
getVisibility() → bool
setVisibility(newVisibility: bool)
getTransform() → Matrix4x4
getWorldTransform(bIncludeLocalTransform: bool) → Matrix4x4
setTransform(transform: Matrix4x4)
getParent() → node
setParent(newParent: node)
computeBoundingBox() → BoundingBox
addAttribute(attributeName: str, attributeValue: str, attributeCategory: str, attributeSortingKey: str) → bool
addAttribute(attributeName: str, attributeValue: Node, attributeCategory: str, attributeSortingKey: str) → bool
addAttribute(attributeName: str, attributeValue: SceneState, attributeCategory: str, attributeSortingKey: str) → bool
addAttribute(attributeName: str, attributeValue: Sequence, attributeCategory: str, attributeSortingKey: str) → bool
addAttribute(attributeName: str, attributeValue: str, attributeCategory: str, invisible: bool, resolvable: bool) → bool
readAttribute(attributeName: str, attributeCategory: str) → str
removeAttribute(attributeName: str)
updateAttributeValue(attributeName: str, attributeValue: str)
hasAttribute(attributeName: str) → bool
getAllCategoryNames() → List
findAttriubtesByCategoryName(categoryName: str) → List
getChildren() → List
rotateByDegree(angleX: float, angleY: float, angleZ: float)
setGlobalLocation(newLocation: Vector3)
getMaterial() → Material
setMaterial(newMaterial: Material)
addAdjacentObject(adjacentObject: Node)
isDeleted() → bool
class simlabpy.Path
The Path class provides functionality for path objects.
Methods
getPointOnPath(ratio: float) → Vector3
isPathClosed() → bool
isPathCircular() → bool
class simlabpy.Preferences
The Preferences class provides functionality for preferences objects.
Methods
getBool(preferenceName: str) → bool
getString(preferenceName: str) → str
getFloat(preferenceName: str) → float
set(preferenceName: str, newBooleanValue: bool)
set(preferenceName: str, newStringValue: str)
set(preferenceName: str, newFloatValue: float)
class simlabpy.RenderSettings
The RenderSettings class controls rendering parameters.
Properties
turbidity
int
enableAmbientLight
bool
enableGroundShadow
bool
groundReflectsEnvironment
bool
renderMode
int
backgroundColor
int
previewRatio
int
sphericalBackplateRadius
int
specularDepth
int
groundReflectionStrength
int
backplateType
int
solarElevation
float
sunStrength
float
envPath
str
backPlateImage
str
Methods
updateGUI()
stopUpdate()
resumeUpdate()
set(strSecondArgument: str)
class simlabpy.RunTime
The RunTime class provides access to runtime functionality.
Properties
STANDARD_VIEW_TOP
str
STANDARD_VIEW_BOTTOM
str
STANDARD_VIEW_FRONT
str
STANDARD_VIEW_BACK
str
STANDARD_VIEW_RIGHT
str
STANDARD_VIEW_LEFT
str
STANDARD_VIEW_DEFAULT
str
args
Arguments
dictionaty
Dictionary
ui
UI
preferences
Preferences
Methods
setView(newCamera: Camera)
setView(topView: str)
fitAll(drawingAreaWidth: int, drawingAreaHeight: int, zoomOutFactor: float)
getPreferences(topView: str)
addReferenceFile(fileName: str, packWithVRPackage: bool)
removeReferenceFile(fileName: str, basedShortName: bool)
referenceFullPathFromRelative(fileName: str) → str
class simlabpy.Scene
The Scene class is the central hub for all scene operations in SimLab Composer.
Methods
reset()
remove(sceneNode: Node)
importFile(filePath: str, bFitToView: bool, bPlaceInView: bool) → Node
importFileWithEnvironment(filePath: str)
setSavingModeToSaveAs(saveAsBool: bool)
openFile(filePath: str)
exportFile(filePath: str)
exportFile(filePath: str, sceneStates: List)
saveFile(filePath: str)
render(imagePath: str, width: int, height: int, skipOpenFolder: bool)
renderAnimation(outputDir: str, beginFrame: int, endFrame: int)
getRenderSettings() → RenderSettings
getVrSettings() → VRSettings
packTheScene(outputFilePath: str, baseFileFormat: str)
movieMaker(outputFolderPath: str, inputImagesFolderPath: str, videoQuality: str, frameRate: float, outputFormat: str, audioFilePath: str)
getNodeByGUID(guid: str) → Node
getSceneStateByGUID(guid: str) → SceneState
getSequenceByGUID(guid: str) → Sequence
bakeTexture(nodes: List, smart: bool)
bakeTextureForAnimation(nodes: List, smart: bool)
setTextureBakingSettings(minSize: int, maxSize: int, spp: int, qualityLevelTop: bool, optimizeBakingTime: bool, maxPolygonsPerObject: int)
bakeLight(smart: bool)
bakeLight(nodes: List, smart: bool)
createDoorAndCabinetsAnimation(inputFilePath: str)
getNodeByName(nodeName: str) → Node
getNodeBySubString(subString: str) → Node
getNodesBySubString(subString: str) → List
getSceneStateByName(sceneStateName: str) → SceneState
getSequenceByName(sequenceName: str) → Sequence
getMaterialByName(materialName: str) → Material
getMaterialsFromScene() → List
getMaterialFromLibrary(libraryName: str, materialName: str) → Material
captureSceneState() → SceneState
captureSceneStateFromSelection() → SceneState
setPDFTemplateFileName(pdfTemplateFilePath: str)
captureSceneImage(outputImagePath: str, outputImageWidth: int, outputImageHeight: int)
createMaterial() → Material
createCamera() → Camera
createLight() → Light
createGroundPlane(pCenter: Vector3, width: float, depth: float) → Node
createInstanceOf(sceneNode: Node) → Node
createCopyOf(sceneNode: Node) → Node
createRoundTableCameraAnimation(rotateClockWise: bool)
exportSceneData(txtfilePath: str)
isolate(sceneNode: Node)
unisolate()
snapToGround(nodeName: str)
retainMaterialPalette(materialPaletteFilePath: str, retainType: str)
exportVrPackage(outputFile: str, packageTitle: str, packagePublisher: str, packageDescription: str, packageType: str, packageImage: str, optimize: bool) → bool
addAttribute(sceneNodeName: str, attributeName: str, attributeValue: str, attributeCategory: str) → bool
replaceObject(includes: str, doesNotInclude: str, inputFilePath: str)
replaceObject(objectNameToReplace: str, objectNameToReplaceObjectsWith: str, deleteReplaceWithObjects: bool, useOldName: bool)
replaceObject(nodeToReplace: Node, nodeToBeReplacedWith: Node, deleteReplaceWithObjects: bool, useOldName: bool)
isGUIMode() → bool
getSelectedNode() → Node
getSelectedNodes() → List
findNodesByAttribute() → List
applyReplaceRules()
mergeIdenticalMaterials()
mergeNodesOnMaterial(sceneNodes: List)
decimateMeshes(sceneNodes: List, decimationPercentage: float, uvPrecisionLevel: int)
smoothNormals(sceneNodes: List)
breakGeometry(sceneNodes: List)
breakFaces(sceneNodes: List)
breakBySectionPlane(sceneNodes: List, sectionPlaneNode: Node)
breakInstances(sceneNodes: List)
optimizeTextures(compressMaps: bool, removeDuplicatedMaps: bool, maxMapWidth: int, maxMapHeight: int, maxEnvironmentWidth: int, maxEnvironmentHeight: int, outputDirectory: str) → bool
optimizeForVR()
replaceMaterial(sceneNode: Node, newMaterial: Material)
findGeometricalInfo(sceneNode: Node) → List
selectNodes(sceneNodes: List)
selectAllNodes()
selectViewerStart() → Node
zoomToFit(sceneNodes: List)
removeAllNodes()
createBoundingBox(sceneNode: Node) → Node
ControlInteractiveChannelFunction(identifier: str, newValue: float) → bool
ControlInteractiveChannelState(identifier: str, bNewState: bool) → bool
makeGrabbableSequence(grabbableObject: Node, sequence: Sequence, scale: float) → bool
addXRAnchor(anchorNode: Node)
addMRElement(mrNode: Node)
createWheelAnimation(wheelNode: Node, counterClockwise: bool, fullTurnsCount: float, rotationAxisInWorldCoordinates: Vector3, rotationCenterInWorldCoordinates: Vector3, beginFrame: int, frameCount: int, constantSpeedStartFrame: int, constantSpeedEndFrame: int, easeTypeStartFrame: int, easeTypeEndFrame: int) → str
createSequence(nodes: List, firstFrame: int, lastFrame: int) → Sequence
createViewerStart(modelPath: str)
getSelectedElements(elementType: str) → List
createDataNode(nodeName: str) → Node
listAllDataNodes() → List
class simlabpy.SceneState
The SceneState class captures and restores scene configurations.
Methods
apply()
isMaterialIncluded() → bool
isCameraIncluded() → bool
isVisibilityIncluded() → bool
isLightIncluded() → bool
isEnvironmentIncluded() → bool
isTransformIncluded() → bool
setMaterialIncluded(includeMaterialState: bool)
setCameraIncluded(includeCameraState: bool)
setVisibilityIncluded(includeVisibilityState: bool)
setLightIncluded(includeLightState: bool)
setEnvironmentIncluded(includeEnvironmentState: bool)
setTransformIncluded(includeTransformState: bool)
getName() → str
getImagePath() → str
setName(newSceneStateName: str)
setImagePath(newImagePath: str)
class simlabpy.Sequence
The Sequence class provides functionality for sequence objects.
Methods
getImagePath() → str
getName() → str
setImagePath(newImagePath: str)
setName(newName: str)
class simlabpy.Texture
The Texture class provides functionality for texture objects.
Methods
getScaleU() → float
getScaleV() → float
getOffsetU() → float
getOffsetV() → float
getPath() → str
setScaleU(newScaleU: float)
setScaleV(newScaleV: float)
setOffsetU(newOffsetU: float)
setOffsetV(newOffsetV: float)
setPath(textureMapPath: str)
class simlabpy.TrainingBuilder
The TrainingBuilder class provides functionality for trainingbuilder objects.
Methods
addDynamicDiagram(name: str, jsonInitialContent: str) → DynamicDiagram
getDynamicDiagramByName(name: str) → DynamicDiagram
getDynamicDiagramByGUID(guid: str) → DynamicDiagram
hasDiagramName(name: str) → bool
hasDiagramGUID(guid: str) → bool
listDynamicDiagrams() → List
getDynamicDiagramSelection() → str
showDynamicDiagramByName(name: str)
showDynamicDiagramByGUID(guid: str)
createVRVariable(variableName: str, variableType: str, initialValue: str) → VRVariable
getVRVariableByName(variableName: str) → VRVariable
getVRVariableByGUID(variableGUID: str) → VRVariable
deleteVRVariable(variableName: str) → bool
listVRVariables() → List
vrVariableExists(variableName: str) → bool
class simlabpy.UI
The UI class provides functionality for ui objects.
Methods
getBool(message: str, label: str, init: bool) → bool
getString(message: str, label: str, init: str) → str
getValue(fromInt: bool, message: str, label: str, init: float) → Union[int, float]
getColor(title: str, init: Color) → str
getNode(message: str, label: str) → Node
getNodeArray(message: str, label: str) → List
getOpenFileName(title: str, init: str, filter: str) → str
getSaveFileName(title: str, init: str, filter: str) → str
class simlabpy.VRSettings
The VRSettings class provides functionality for vrsettings objects.
Properties
enableNightMode
bool
enableFog
bool
fogDensity
float
autoAdjustHDRBrightness
bool
playerCameraFOV
float
disableFlyCollision
bool
shadowQuality
int
measurementUnits
int
catalogs
List
multipleLightsOnStandaloneDevices
bool
brightnessFactorOnStandaloneDevices
float
voiceCommunication
int
enableVRWalking
bool
enableVRSideWalking
bool
enableVRTurning
bool
vrHandOpacity
float
vrTeleportation
bool
Methods
getLOD1ScreenSize() → float
getLOD1Distance() → float
getLOD2ScreenSize() → float
getLOD2Distance() → float
getLOD3ScreenSize() → float
getLOD3Distance() → float
isLOD3Enabled() → bool
setLOD1ScreenSize(newLod1ScreenSize: float)
setLOD1Distance(newLod1Distance: float)
setLOD2ScreenSize(newLod2ScreenSize: float)
setLOD2Distance(newLod2Distance: float)
setLOD3ScreenSize(newLod3ScreenSize: float)
setLOD3Distance(newLod3Distance: float)
enableLOD3(lod3Enabled: bool)
getEnableVRWalking() → bool
setEnableVRWalking(newWalkingState: bool)
getEnableVRSideWalking() → bool
setEnableVRSideWalking(newSideWalkingState: bool)
getEnableVRTurning() → bool
setEnableVRTurning(newTurningState: bool)
getVRHandOpacity() → float
setVRHandOpacity(newHandOpacity: float)
getVRTeleportation() → bool
setVRTeleportation(newHandOpacity: bool)
class simlabpy.VRVariable
The VRVariable class provides functionality for vrvariable objects.
Methods
getName() → str
getValue() → str
getType() → str
getGUID() → str
setName(name: str)
setValue(value: str)
setType(type: str)
class simlabpy.Vector3
The Vector3 class represents 3D vectors and points.