Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

SceneInterface

Class
Read time 72 minutesLast updated 21 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Scene
public class SceneInterface : Interface

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

AddComponent

Add a component to an occurrence.
[HandleProcessCorruptedStateExceptions]public uint AddComponent(uint occurrence, ComponentType componentType)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to add the new component.
ComponentTypecomponentTypeType of the component.
Returns

Type

Description

uint

AddComponents

Add a components to each occurrence in the array.
[HandleProcessCorruptedStateExceptions]public ComponentList AddComponents(OccurrenceList occurrences, ComponentType componentType)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences that need the component to be added.
ComponentTypecomponentTypeType of the component.
Returns

Type

Description

ComponentList

AddInParentInstances

Add an instance of prototype's child as child in current occurrence recursively.
[HandleProcessCorruptedStateExceptions]public void AddInParentInstances(uint root)
Parameters

Type

Name

Description

uintrootThe occurrence to test.

CleanUnusedImages

Remove unused images from texture library.
[HandleProcessCorruptedStateExceptions]public int CleanUnusedImages()
Returns

Type

Description

int

CleanUnusedMaterials

Remove unused materials from material library.
[HandleProcessCorruptedStateExceptions]public int CleanUnusedMaterials(bool cleanImages = false)
Parameters

Type

Name

Description

boolcleanImagesCall cleanUnusedImages if true.
Returns

Type

Description

int

ComputeSubTreeChecksum

Compute the checksum of a sub-tree.
[HandleProcessCorruptedStateExceptions]public string ComputeSubTreeChecksum(uint root = 0)
Parameters

Type

Name

Description

uintrootOccurrence to compute.
Returns

Type

Description

string

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

ConvertMaterialsToColor

Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible.
[HandleProcessCorruptedStateExceptions]public void ConvertMaterialsToColor(MaterialList materials = null)
Parameters

Type

Name

Description

MaterialListmaterialsMaterials to merge (merge all materials if empty).

ConvertMaterialsToPBR

Convert all materials to materials with a PBR pattern, trying to keep the visual aspect as similar as possible.
[HandleProcessCorruptedStateExceptions]public void ConvertMaterialsToPBR(MaterialList materials = null)
Parameters

Type

Name

Description

MaterialListmaterialsMaterials to merge (merge all materials if empty).

CreateOBBMesh

[HandleProcessCorruptedStateExceptions]public uint CreateOBBMesh(uint occurrence)
Parameters

Type

Name

Description

uintoccurrence
Returns

Type

Description

uint

CreateOccurrence

Create a new occurrence.
[HandleProcessCorruptedStateExceptions]public uint CreateOccurrence(string name, uint parent = 0)
Parameters

Type

Name

Description

stringnameName of the new occurrence.
uintparentCreate the occurrence as a child of parent, if not set the parent will be root.
Returns

Type

Description

uint

CreateOccurrenceFromSelection

Create a new occurrence and add the given occurrences as children.
[HandleProcessCorruptedStateExceptions]public uint CreateOccurrenceFromSelection(string name, OccurrenceList children, uint parent, bool keepMaterialAssignment = true)
Parameters

Type

Name

Description

stringnameName of the new occurrence.
OccurrenceListchildrenAdd given occurrence as children (if any).
uintparentIf defined, the new occurrence will be created as a child of this parent. Else if children are defined, the first common parent of children will be used as a parent for this new occurrence. Last resort will be to use the root as parent.
boolkeepMaterialAssignmentIf defined, material assignation will be updated to keep the visual same aspect.
Returns

Type

Description

uint

CreateOccurrenceFromText

Creates an occurrence from string.
[HandleProcessCorruptedStateExceptions]public uint CreateOccurrenceFromText(string text, string font = "ChicFont", int fontSize = 64, ColorAlpha? color = null, double heigth3D = 40)
Parameters

Type

Name

Description

stringtextThe occurrence's name.
stringfontThe font to use.
intfontSizeThe font size.
ColorAlphacolorThe occurrence color.
doubleheigth3D3D height of text.
Returns

Type

Description

uint

CreateOccurrences

Create one new occurrence under each given parent.
[HandleProcessCorruptedStateExceptions]public OccurrenceList CreateOccurrences(string name, OccurrenceList parents = null)
Parameters

Type

Name

Description

stringnameName of the new occurrence.
OccurrenceListparentsCreate the occurrences as a child of each parent. If empty, one occurrence will be created with root as parent.
Returns

Type

Description

OccurrenceList

CreatePartsFromMeshes

Create a set of Parts given meshes and occurrences.
[HandleProcessCorruptedStateExceptions]public PartList CreatePartsFromMeshes(OccurrenceList occurrences, MeshList meshes)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrence which will contains the part component of the mesh at the same index.
MeshListmeshesList of mesh to create part, if the mesh is invalid (e.g 0) no part will be created and 0 will be returned in the parts list at this index.
Returns

Type

Description

PartList

CreateSceneFromMeshes

Create a scene tree with a list of meshes, all meshes becomes part occurrences with the same root. The same mesh Id can be used several times to handle create instances (prototypes).
[HandleProcessCorruptedStateExceptions]public uint CreateSceneFromMeshes(MeshList meshes, Matrix4List matrices, bool centerPartPivots = true)
Parameters

Type

Name

Description

MeshListmeshesList of input meshes.
Matrix4ListmatricesList of matrices of input meshes (if empty Identity will be used).
boolcenterPartPivotsIf True, the input meshes will be centered in their local coordinate system and the translation will be set as part matrix. If you want to rollback the meshes to their initial pivots use 'resetPartTransform' function.
Returns

Type

Description

uint

DeleteComponentByType

Delete component from type.
[HandleProcessCorruptedStateExceptions]public void DeleteComponentByType(ComponentType componentType, uint occurrence, bool followPrototypes = true)
Parameters

Type

Name

Description

ComponentTypecomponentTypeType of the component.
uintoccurrenceThe occurrence to remove components from.
boolfollowPrototypesIf true and if the component is not set on the occurrence, try to find it on its prototyping chain.

DeleteComponentsByType

Delete all components on subtree from type.
[HandleProcessCorruptedStateExceptions]public void DeleteComponentsByType(ComponentType componentType, uint rootOccurrence = 0)
Parameters

Type

Name

Description

ComponentTypecomponentTypeType of the component.
uintrootOccurrenceThe root occurrence to remove components from.

DeleteEmptyOccurrences

Delete all empty assemblies.
[HandleProcessCorruptedStateExceptions]public void DeleteEmptyOccurrences(uint root = 0)
Parameters

Type

Name

Description

uintrootRoot occurrence for the process.

DeleteOccurrences

Delete a liste of occurrences.
[HandleProcessCorruptedStateExceptions]public void DeleteOccurrences(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to delete.

GenerateOctaViews

[HandleProcessCorruptedStateExceptions]public uint GenerateOctaViews(double radius, int XFrames, int YFrames, bool hemi = false)
Parameters

Type

Name

Description

doubleradius
intXFrames
intYFrames
boolhemi
Returns

Type

Description

uint

GetAABB

Returns the axis aligned bounding box of a list of occurrences.
[HandleProcessCorruptedStateExceptions]public AABB GetAABB(OccurrenceList occurrences, bool precise = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to retrieve the AABB.
boolpreciseIf true, will take more time but returns the minimal AABB and use the current animation pose. If false, fast but the AABB is approximated and multiple rotation matrices in the tree structure may extend it a lot, also the static pose of the meshes will be used.
Returns

Type

Description

AABB

GetActiveMaterial

Get the active material on occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetActiveMaterial(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetActiveMaterials

Get the active materials on multiple occurrences.
[HandleProcessCorruptedStateExceptions]public MaterialList GetActiveMaterials(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences to retrieve active material on.
Returns

Type

Description

MaterialList

GetActivePropertyValue

Get the value of a property on the first parent that own it.
[HandleProcessCorruptedStateExceptions]public string GetActivePropertyValue(uint occurrence, string propertyName, bool cacheProperty = false)
Parameters

Type

Name

Description

uintoccurrenceAn occurrence.
stringpropertyNameProperty name.
boolcachePropertyIf true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls.
Returns

Type

Description

string

GetActivePropertyValues

Get the value of a property on the first parent that own it for each given occurrence.
[HandleProcessCorruptedStateExceptions]public StringList GetActivePropertyValues(OccurrenceList occurrences, string propertyName, bool cacheProperty = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences.
stringpropertyNameProperty name.
boolcachePropertyIf true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls.
Returns

Type

Description

StringList

GetAncestors

Returns the list of ancestors for one occurrence.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetAncestors(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to test.
Returns

Type

Description

OccurrenceList

GetBrepShape

Returns the Brep shape of a part.
[HandleProcessCorruptedStateExceptions]public uint GetBrepShape(uint part)
Parameters

Type

Name

Description

uintpartThe Part.
Returns

Type

Description

uint

GetComponent

Returns a component on an occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
ComponentTypecomponentTypeType of the component.
boolfollowPrototypesIf true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns

Type

Description

uint

GetComponentByOccurrence

Returns one component of the specified type by occurrence if it exists.
[Obsolete][HandleProcessCorruptedStateExceptions]public ComponentList GetComponentByOccurrence(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences list.
ComponentTypecomponentTypeType of the component.
boolfollowPrototypesIf true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns

Type

Description

ComponentList

GetComponentOccurrence

Get the occurrence that own a component.
[HandleProcessCorruptedStateExceptions]public uint GetComponentOccurrence(uint component)
Parameters

Type

Name

Description

uintcomponentThe component.
Returns

Type

Description

uint

GetComponentType

Get the type of a component.
[HandleProcessCorruptedStateExceptions]public ComponentType GetComponentType(uint component)
Parameters

Type

Name

Description

uintcomponentThe component.
Returns

Type

Description

ComponentType

GetComponents

Returns one component of the specified type by occurrence if it exists.
[HandleProcessCorruptedStateExceptions]public ComponentList GetComponents(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences list.
ComponentTypecomponentTypeType of the component.
boolfollowPrototypesIf true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns

Type

Description

ComponentList

GetGlobalMatrices

Returns the global matrix for each given occurrence.
[HandleProcessCorruptedStateExceptions]public Matrix4List GetGlobalMatrices(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesNodes to get the local matrix.
Returns

Type

Description

Matrix4List

GetGlobalMatrix

Returns the global matrix on an occurrence.
[HandleProcessCorruptedStateExceptions]public Matrix4 GetGlobalMatrix(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to get the global matrix.
Returns

Type

Description

Matrix4

GetGlobalVisibility

Returns the global visibility of a given occurrence.
[HandleProcessCorruptedStateExceptions]public bool GetGlobalVisibility(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to get the global visibility.
Returns

Type

Description

bool

GetLocalMatrices

Returns the local matrix for each given occurrence.
[HandleProcessCorruptedStateExceptions]public Matrix4List GetLocalMatrices(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesNodes to get the local matrix.
Returns

Type

Description

Matrix4List

GetLocalMatrix

Returns the local matrix on an occurrence.
[HandleProcessCorruptedStateExceptions]public Matrix4 GetLocalMatrix(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceNode to get the local matrix.
Returns

Type

Description

Matrix4

GetMBB

Returns the Minimum Bounding Box of a list of occurrences.
[HandleProcessCorruptedStateExceptions]public OBB GetMBB(OccurrenceList occurrences, Point3? forcedAxis = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to retrieve the MBB.
Point3forcedAxisForced axis of the mbb.
Returns

Type

Description

OBB

GetMaterialsFromSubtree

[HandleProcessCorruptedStateExceptions]public MaterialList GetMaterialsFromSubtree(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceRoot occurrence of the subtree on which to get the materials and images.
Returns

Type

Description

MaterialList

GetOBB

Returns the Oriented Bounding Box of a list of occurrences (works only on meshes, fast method, not the Minimum Volume Box).
[HandleProcessCorruptedStateExceptions]public OBB GetOBB(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to retrieve the OBB.
Returns

Type

Description

OBB

GetOccurrenceActiveMaterial

Returns the active material on a given occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetOccurrenceActiveMaterial(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to get the active material.
Returns

Type

Description

uint

GetOccurrenceName

Returns the name of an occurrence.
[HandleProcessCorruptedStateExceptions]public string GetOccurrenceName(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to get the name.
Returns

Type

Description

string

GetOccurrencesWithComponent

Recursively get all the occurrences containing a component of the specified type.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetOccurrencesWithComponent(ComponentType componentType, uint fromOcc = 0)
Parameters

Type

Name

Description

ComponentTypecomponentTypeThe component type.
uintfromOccSource occurrence of the recursion.
Returns

Type

Description

OccurrenceList

GetPartActiveShape

Returns the active shape of a part.
[HandleProcessCorruptedStateExceptions]public uint GetPartActiveShape(uint part)
Parameters

Type

Name

Description

uintpartThe part.
Returns

Type

Description

uint

GetPartOccurrences

Recursively get all the occurrences containing a part component.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetPartOccurrences(uint fromOcc = 0)
Parameters

Type

Name

Description

uintfromOccSource occurrence of the recursion.
Returns

Type

Description

OccurrenceList

GetPartShapeType

Get the part's shape type.
[HandleProcessCorruptedStateExceptions]public ShapeType GetPartShapeType(uint part)
Parameters

Type

Name

Description

uintpartThe part to test.
Returns

Type

Description

ShapeType

GetPolygonCount

Returns the number of polygon in the parts meshes.
[HandleProcessCorruptedStateExceptions]public ulong GetPolygonCount(OccurrenceList occurrences, bool asTriangleCount = false, bool countOnceEachInstance = false, bool countHidden = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe part occurrences.
boolasTriangleCountIf true count the equivalent of triangles for each polygon.
boolcountOnceEachInstanceIf true ignore multiple instance of each tessellation.
boolcountHiddenIf true, also count hidden components.
Returns

Type

Description

ulong

GetSubTreeStats

Returns some stats of a sub tree.
[HandleProcessCorruptedStateExceptions]public GetSubTreeStatsReturn GetSubTreeStats(OccurrenceList roots)
Parameters

Type

Name

Description

OccurrenceListrootsThe root occurrences to get stats on.
Returns

Type

Description

GetSubTreeStatsReturn

GetVertexCount

Returns the number of vertices in the parts meshes.
[HandleProcessCorruptedStateExceptions]public ulong GetVertexCount(OccurrenceList occurrences, bool countOnceEachInstance = false, bool countHidden = false, bool countPoints = false, bool countMergedVertices = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe part occurrences.
boolcountOnceEachInstanceIf true ignore multiple instance of each tessellation.
boolcountHiddenIf true, also count hidden components.
boolcountPointsIf true, also count points (for points cloud).
boolcountMergedVerticesIf true count all merged vertices in each tessellation.
Returns

Type

Description

ulong

GetViewpointsFromCavities

Returns viewpoints from model cavities.
[HandleProcessCorruptedStateExceptions]public GetViewpointsFromCavitiesReturn GetViewpointsFromCavities(double voxelSize, double minCavityVolume)
Parameters

Type

Name

Description

doublevoxelSizePrecision for cavities detection.
doubleminCavityVolumeMinimum volume for a cavity to be returned.
Returns

GetVolume

Return the volume of the occurrence.
[HandleProcessCorruptedStateExceptions]public double GetVolume(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceEntry occurrence.
Returns

Type

Description

double

GetVolumes

Return the volume of a set of root occurrences.
[HandleProcessCorruptedStateExceptions]public DoubleList GetVolumes(OccurrenceList iRoots)
Parameters

Type

Name

Description

OccurrenceListiRootsList of roots.
Returns

Type

Description

DoubleList

HasComponent

Returns True if the given occurrence has the given component type.
[HandleProcessCorruptedStateExceptions]public bool HasComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
ComponentTypecomponentTypeType of the component.
boolfollowPrototypesIf true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns

Type

Description

bool

Hide

Hide the given occurrences.
[HandleProcessCorruptedStateExceptions]public void Hide(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list of occurrences to hide.

InverseVisibility

Inverse the visibility of the given occurrences.
[HandleProcessCorruptedStateExceptions]public void InverseVisibility(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list of occurrences.

IsAncestorOf

Test if an occurrence is an ancestor of another one.
[HandleProcessCorruptedStateExceptions]public bool IsAncestorOf(uint maybeAncestor, uint occurrence)
Parameters

Type

Name

Description

uintmaybeAncestorThe potential ancestor of the occurrence.
uintoccurrenceThe occurrence to test.
Returns

Type

Description

bool

KeepAncestors

Filter a list of occurrences by removing all occurrences which have an ancestor inside the list.
[HandleProcessCorruptedStateExceptions]public OccurrenceList KeepAncestors(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list that shall be filtered.
Returns

Type

Description

OccurrenceList

ListComponent

List all components on a type on the whole tree.
[HandleProcessCorruptedStateExceptions]public ComponentList ListComponent(ComponentType componentType)
Parameters

Type

Name

Description

ComponentTypecomponentTypeThe component type.
Returns

Type

Description

ComponentList

ListComponents

List all components on an occurrence.
[HandleProcessCorruptedStateExceptions]public ComponentList ListComponents(uint occurrence, bool followPrototypes = true)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to list the components.
boolfollowPrototypesIf true list also components owned by the prototype.
Returns

Type

Description

ComponentList

MergeImages

Merge all equivalent images (i.e. with same pixels).
[HandleProcessCorruptedStateExceptions]public int MergeImages(ImageList images = null)
Parameters

Type

Name

Description

ImageListimagesImages to merge (merge all images if empty).
Returns

Type

Description

int

MergeMaterials

Merge all equivalent materials (i.e. with same appearance).
[HandleProcessCorruptedStateExceptions]public int MergeMaterials(MaterialList materials = null, bool evaluateNames = false)
Parameters

Type

Name

Description

MaterialListmaterialsMaterials to merge (merge all materials if empty).
boolevaluateNamesIf true, materials names will be taken into consideration (on top of other properties). It means that materials having same properties but different names won't be merged together.
Returns

Type

Description

int

RemoveMaterials

Recursively remove all materials.
[HandleProcessCorruptedStateExceptions]public void RemoveMaterials(OccurrenceList roots = null)
Parameters

Type

Name

Description

OccurrenceListrootsIf specified, remove materials only from the given occurrences and their descendants.

RenameLongOccurrenceName

Truncate names of occurrence with too long names.
[HandleProcessCorruptedStateExceptions]public void RenameLongOccurrenceName(int maxLength)
Parameters

Type

Name

Description

intmaxLengthMaximum name length.

ReplaceMaterial

Replace a material by another everywhere it is used.
[HandleProcessCorruptedStateExceptions]public void ReplaceMaterial(uint originalMaterial, uint newMaterial, OccurrenceList occurrences = null)
Parameters

Type

Name

Description

uintoriginalMaterialThe material to replace everywhere.
uintnewMaterialThe new material to set in place of originalMaterial.
OccurrenceListoccurrencesThe occurrences on which replacing the materials.

ResizeTextures

Resizes the textures from a selection of occurrences (resizes all textures used by these occurrences), or from a selection of textures.
[HandleProcessCorruptedStateExceptions]public void ResizeTextures(ResizeTexturesInputMode inputMode, ResizeTexturesResizeMode resizeMode, bool replaceTextures)
Parameters

Type

Name

Description

ResizeTexturesInputModeinputModeDefines if the textures to resize are textures used by a selection of Occurrences, or a selection among the textures available in the scene.
ResizeTexturesResizeModeresizeModeDefines if the textures are resized following a ratio or following a maximum size/resolution (only textures above the defined maximum are downsized).
boolreplaceTexturesIf True, overwrites textures from the selection.

SetComponentOccurrence

Move a component to an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetComponentOccurrence(uint component, uint occurrence)
Parameters

Type

Name

Description

uintcomponentThe component.
uintoccurrenceThe occurrence.

SetDefaultVariant

Set the default variant.
[HandleProcessCorruptedStateExceptions]public void SetDefaultVariant()

SetOccurrenceMaterial

Set the material on a occurrence.
[HandleProcessCorruptedStateExceptions]public void SetOccurrenceMaterial(uint occurrence, uint material)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to set the material.
uintmaterialThe new occurrence material.

SetOccurrenceName

Returns the name of an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetOccurrenceName(uint occurrence, string name)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to get the name.
stringnameThe occurrence name.

Show

Show the given occurrences.
[HandleProcessCorruptedStateExceptions]public void Show(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list occurrences to show.

ShowOnly

Show only the given occurrences.
[HandleProcessCorruptedStateExceptions]public void ShowOnly(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list occurrences to show.

TransferCADMaterialsOnPartOccurrences

Set all materials on part occurrences.
[HandleProcessCorruptedStateExceptions]public void TransferCADMaterialsOnPartOccurrences(uint rootOccurrence = 0)
Parameters

Type

Name

Description

uintrootOccurrenceRoot occurrence.

TransferMaterialsOnPatches

Take the first instance material and set it one the mesh patches.
[HandleProcessCorruptedStateExceptions]public void TransferMaterialsOnPatches(uint rootOccurrence = 0)
Parameters

Type

Name

Description

uintrootOccurrenceRoot occurrence.

AddComponentChangedCallback

public uint AddComponentChangedCallback(SceneInterface.ComponentChangedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.ComponentChangedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveComponentChangedCallback

public void RemoveComponentChangedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddSceneChangedCallback

public uint AddSceneChangedCallback(SceneInterface.SceneChangedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.SceneChangedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveSceneChangedCallback

public void RemoveSceneChangedCallback(uint id)
Parameters

Type

Name

Description

uintid

CreateHierarchicalClusters

Reorganize a sub tree with hierarchical clustering.
[HandleProcessCorruptedStateExceptions]public uint CreateHierarchicalClusters(uint root, int childrenCountByNode = 2, double minFitting = -1)
Parameters

Type

Name

Description

uintrootRoot of the sub-tree to reorganize.
intchildrenCountByNodeOrder of the hierarchical tree.
doubleminFittingMinimal fitting coefficient to allow 2 nodes to be merged/clustered.
Returns

Type

Description

uint

GenerateOctree

Generate a loose octree from the given sub-tree.
[HandleProcessCorruptedStateExceptions]public uint GenerateOctree(uint occurrence, int maxDepth = 5, double looseFactor = 2)
Parameters

Type

Name

Description

uintoccurrenceRoot occurrence of the sub-tree.
intmaxDepthDefines the depth maximum of the octree.
doublelooseFactorDefines the loose factor of the octree.
Returns

Type

Description

uint

GetClusters

Get groups of occurrences based on spatial proximity.
[HandleProcessCorruptedStateExceptions]public OccurrenceListList GetClusters(OccurrenceList occurrences, MergeByRegionsStrategy strategy)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.
MergeByRegionsStrategystrategyNumber: number of groups
Returns

Type

Description

OccurrenceListList

GetPartOccurrencesGroupedBySimilarity

Get groups of occurrences based on various criteria (see parameters). Returns a list of groups ; each group is either a list of parts considered similar (depending on criteria) or is a singleton that has no similar parts.
[HandleProcessCorruptedStateExceptions]public OccurrenceListList GetPartOccurrencesGroupedBySimilarity(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
Parameters

Type

Name

Description

uintrootRoot occurrence for the process.
doubleacceptVolumeRatioIf the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.
doubleacceptPolycountRatioIf the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.
doubleacceptAABBAxisRatioIf the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.
doubleacceptAABBCenterDistanceIf the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated.
Returns

Type

Description

OccurrenceListList

CreateCapsule

Create a new capsule.
[HandleProcessCorruptedStateExceptions]public uint CreateCapsule(double radius, double height, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters

Type

Name

Description

doubleradiusRadius of the Capsule.
doubleheightHeight of the Capsule (excluding the two size of half spheres).
intsubdivisionLatitudeSubdivision of the Capsule on the Latitude.
intsubdivisionLongitudeSubdivision of the Capsule (two half spheres) on the Longitude.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateCone

Create a new cone.
[HandleProcessCorruptedStateExceptions]public uint CreateCone(double bottomRadius, double height, int sides = 16, bool generateUV = true)
Parameters

Type

Name

Description

doublebottomRadiusRadius of the bottom of the cone.
doubleheightHeight of the cone.
intsidesNumber of sides of the cone.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateCube

Create a new cube.
[HandleProcessCorruptedStateExceptions]public uint CreateCube(double sizeX, double sizeY, double sizeZ, int subdivision = 1, bool generateUV = true)
Parameters

Type

Name

Description

doublesizeXSize of the Cube on the x axis.
doublesizeYSize of the Cube on the y axis.
doublesizeZSize of the Cube on the z axis.
intsubdivisionSubdivision of the Cube on all the axis.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateCylinder

Create a new cylinder.
[HandleProcessCorruptedStateExceptions]public uint CreateCylinder(double radius, double height, int sides = 16, bool generateUV = true)
Parameters

Type

Name

Description

doubleradiusRadius of the Cylinder.
doubleheightHeight of the Cylinder.
intsidesNumber of Sides of the Cylinder.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateImmersion

Create a new bagel klein.
[HandleProcessCorruptedStateExceptions]public uint CreateImmersion(double radius, int subdivisionX, int subdivisionY)
Parameters

Type

Name

Description

doubleradiusRadius of the Immersion.
intsubdivisionXSubdivision of the Immersion on the Latitude.
intsubdivisionYSubdivision of the Immersion on the Longitude.
Returns

Type

Description

uint

CreatePlane

Create a new plane.
[HandleProcessCorruptedStateExceptions]public uint CreatePlane(double sizeX, double sizeY, int subdivisionX = 1, int subdivisionY = 1, bool generateUV = true)
Parameters

Type

Name

Description

doublesizeXSize of the Plane on the x axis.
doublesizeYSize of the Plane on the y axis.
intsubdivisionXSubdivision of the Plane on the x axis.
intsubdivisionYSubdivision of the Plane on the y axis.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateSphere

Create a new sphere.
[HandleProcessCorruptedStateExceptions]public uint CreateSphere(double radius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters

Type

Name

Description

doubleradiusRadius of the Sphere.
intsubdivisionLatitudeSubdivision of the Sphere on the Latitude.
intsubdivisionLongitudeSubdivision of the Sphere on the Longitude.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

CreateTorus

Create a new torus.
[HandleProcessCorruptedStateExceptions]public uint CreateTorus(double majorRadius, double minorRadius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters

Type

Name

Description

doublemajorRadiusMajor Radius.
doubleminorRadiusMinor Radius.
intsubdivisionLatitudeSubdivision of the Torus on the Latitude.
intsubdivisionLongitudeSubdivision of the Torus on the Longitude.
boolgenerateUVGeneration of the UV.
Returns

Type

Description

uint

FindDuplicatedPartOccurrences

Get parts that are duplicated. This does not include each first occurrence of a set of duplicates.
[Obsolete][HandleProcessCorruptedStateExceptions]public OccurrenceList FindDuplicatedPartOccurrences(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
Parameters

Type

Name

Description

uintrootRoot occurrence.
doubleacceptVolumeRatioIf the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.
doubleacceptPolycountRatioIf the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.
doubleacceptAABBAxisRatioIf the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.
doubleacceptAABBCenterDistanceIf the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated.
Returns

Type

Description

OccurrenceList

FindOccurrencesByMaterial

Get occurrences for which the property "Material" is the given material.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccurrencesByMaterial(uint material)
Parameters

Type

Name

Description

uintmaterialA material.
Returns

Type

Description

OccurrenceList

FindOccurrencesByMetadata

Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccurrencesByMetadata(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters

Type

Name

Description

stringpropertyProperty name.
stringregexRegular expression (ECMAScript).
OccurrenceListrootsIf specified, restrict the search from the given roots.
boolcaseInsensitiveIf True, the regex will be insensitive to upper and lower cases.
Returns

Type

Description

OccurrenceList

FindOccurrencesByMetadataValue

Returns all occurrences with a metadata value matching the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccurrencesByMetadataValue(string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters

Type

Name

Description

stringregexRegular expression (ECMAScript).
OccurrenceListrootsIf specified, restrict the search from the given roots.
boolcaseInsensitiveIf True, the regex will be insensitive to upper and lower cases.
Returns

Type

Description

OccurrenceList

FindOccurrencesByProperty

Returns all occurrences which a property value matches the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccurrencesByProperty(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters

Type

Name

Description

stringpropertyProperty name.
stringregexRegular expression (ECMAScript).
OccurrenceListrootsIf specified, restrict the search from the given roots.
boolcaseInsensitiveIf True, the regex will be insensitive to upper and lower cases.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesByActiveMaterial

Find all part occurrence with a given material as active material (i.e. as seen in the rendering).
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesByActiveMaterial(uint material, OccurrenceList roots = null)
Parameters

Type

Name

Description

uintmaterialA material.
OccurrenceListrootsIf specified, restrict the search from the given roots.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesByMaximumSize

Get part occurrences by size.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesByMaximumSize(OccurrenceList roots, double maxDiagLength, double maxSize = -1, bool getHidden = false)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process.
doublemaxDiagLengthIf the diagonal axis of the bounding box is less than maxDiagLength, part will be filtered. -1 to ignore.
doublemaxSizeIf the longer axis of the box is less than maxLength, part will be filtered. -1 to ignore.
boolgetHiddenIf true, hidden part occurrences meeting the criteria will be filtered as well.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesByMinimumNumberOfInstances

Get part occurrences with more than "minInstanciationCount" occurrence on the scene.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesByMinimumNumberOfInstances(int minInstanciationCount)
Parameters

Type

Name

Description

intminInstanciationCountMin occurrence count.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesByVisibleMaterial

Get part occurrences for which the given material is visible in the viewer.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesByVisibleMaterial(uint material)
Parameters

Type

Name

Description

uintmaterialA material.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesInAABB

Find part occurrences in the scene in a given axis aligned bounding box.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesInAABB(AABB aabb)
Parameters

Type

Name

Description

AABBaabbThe axis aligned bounding box.
Returns

Type

Description

OccurrenceList

FindPartOccurrencesInBox

Get part occurrences contained in a given box.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesInBox(ExtendedBox box, bool strictlyIncludes)
Parameters

Type

Name

Description

ExtendedBoxboxThe extension box.
boolstrictlyIncludesIf false, parts only need to intersect the box to be selected.
Returns

Type

Description

OccurrenceList

CreateSubTree

Create a complete scene tree.
[HandleProcessCorruptedStateExceptions]public OccurrenceList CreateSubTree(PackedTree tree, uint root = 0, bool replaceRoot = true)
Parameters

Type

Name

Description

PackedTreetree
uintrootSpecify the root occurrence of the scene.
boolreplaceRootIf true, the root occurrence will be replaced by the root of the given tree, else it will be added as a child.
Returns

Type

Description

OccurrenceList

GetChildren

Get the children of an occurrence.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetChildren(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

OccurrenceList

GetChildrenCount

Get the children count of an occurrence.
[HandleProcessCorruptedStateExceptions]public int GetChildrenCount(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

int

GetCurrentVariantRoot

Get the current active root. Returns active variant's root if one or global root.
[HandleProcessCorruptedStateExceptions]public uint GetCurrentVariantRoot()
Returns

Type

Description

uint

GetFirstChild

Get the children of an occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetFirstChild(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetNextSibling

Get the next occurrence in parent children.
[HandleProcessCorruptedStateExceptions]public uint GetNextSibling(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetOccurrenceAncestors

Get all ancestors from occurrence until root (occurrence is not included).
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetOccurrenceAncestors(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to find ancestors.
Returns

Type

Description

OccurrenceList

GetOccurrencesAncestors

Batch version of getOccurrenceAncestors.
[HandleProcessCorruptedStateExceptions]public OccurrenceListList GetOccurrencesAncestors(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe list of occurrences to find ancestors.
Returns

Type

Description

OccurrenceListList

GetParent

Get the parent of an occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetParent(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetPreviousSibling

Get the previous occurrence in parent children.
[HandleProcessCorruptedStateExceptions]public uint GetPreviousSibling(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetRoot

Get the root occurrence of the product structure.
[HandleProcessCorruptedStateExceptions]public uint GetRoot()
Returns

Type

Description

uint

GetSubTree

Returns a packed version of the whole scene tree.
[HandleProcessCorruptedStateExceptions]public PackedTree GetSubTree(uint root = 0, VisibilityMode visibilityMode = VisibilityMode.Hide, int depth = -1)
Parameters

Type

Name

Description

uintrootSpecify the root of the returned scene.
VisibilityModevisibilityModeThe visibility mode.
intdepthMaximum depth.
Returns

Type

Description

PackedTree

MoveOccurrences

Move an occurrence, adjusting the transformation to keep objects at the same place in the world space.
[HandleProcessCorruptedStateExceptions]public void MoveOccurrences(OccurrenceList occurrences, uint destination, uint insertBefore = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences to move.
uintdestinationDestination occurrence (the new parent).
uintinsertBeforeOccurrence before witch to move, if null append to destination children.

SetParent

Set the parent of an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetParent(uint occurrence, uint parent, bool addInParentInstances = false, uint insertBefore = 0, bool worldPositionStays = false)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
uintparentThe parent occurrence.
booladdInParentInstancesIf True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself.
uintinsertBeforeAdd before this child occurrence in the children list of the parent occurrence.
boolworldPositionStaysIf true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before.

AddLightComponent

Add a light component to an occurrence.
[HandleProcessCorruptedStateExceptions]public uint AddLightComponent(uint occurrence, LightType lightType, Color color, double power = 1, double cutOff = 20)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to add the new component.
LightTypelightTypeThe type of the light.
ColorcolorColor of the light.
doublepowerThe power of the light.
doublecutOffThe cutoff angle of the light.
Returns

Type

Description

uint

CreateLight

Create an occurrence with a light component.
[HandleProcessCorruptedStateExceptions]public uint CreateLight(string name, LightType lightType, Color color, double power = 1, double cutOff = 20, uint parent = 0)
Parameters

Type

Name

Description

stringnameName of the light.
LightTypelightTypeThe type of the light.
ColorcolorColor of the light.
doublepowerThe power of the light.
doublecutOffThe cutoff angle of the light.
uintparentThe parent of the light occurrence.
Returns

Type

Description

uint

AddMetadata

Add a new metadata property to a metadata component.
[HandleProcessCorruptedStateExceptions]public void AddMetadata(uint metadata, string name, string value)
Parameters

Type

Name

Description

uintmetadataThe metadata component.
stringnameThe new property name.
stringvalueThe new property value.

AddMetadataBlock

Add a new metadata property to a metadata component.
[HandleProcessCorruptedStateExceptions]public void AddMetadataBlock(uint metadata, StringList names, StringList values)
Parameters

Type

Name

Description

uintmetadataThe metadata component.
StringListnamesThe new properties names.
StringListvaluesThe new properties values.

CreateMetadatasFromDefinitions

Create Metadata components from definitions.
[HandleProcessCorruptedStateExceptions]public MetadataList CreateMetadatasFromDefinitions(OccurrenceList occurrences, MetadataDefinitionList definitions)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to add the metadata components.
MetadataDefinitionListdefinitionsList of metadata definition.
Returns

Type

Description

MetadataList

GetMetadata

Get a metadata property value from a metadata component.
[HandleProcessCorruptedStateExceptions]public string GetMetadata(uint metadata, string name)
Parameters

Type

Name

Description

uintmetadataThe metadata component.
stringnameThe metadata property name.
Returns

Type

Description

string

GetMetadatasDefinitions

Returns definition of Metadata components.
[HandleProcessCorruptedStateExceptions]public MetadataDefinitionList GetMetadatasDefinitions(MetadataList metadatas)
Parameters

Type

Name

Description

MetadataListmetadatasList of metadata component to retrieve definition.
Returns

Type

Description

MetadataDefinitionList

RemoveMetadata

Remove a property from a metadata.
[HandleProcessCorruptedStateExceptions]public void RemoveMetadata(uint metadata, string name)
Parameters

Type

Name

Description

uintmetadataThe occurrence.
stringnameThe name of the property.

GetSubpartMaterial

Get a subpart material assignment according to overrides on the scene tree with SubpartMaterial components.
[HandleProcessCorruptedStateExceptions]public uint GetSubpartMaterial(uint occurrence, uint subpartIndex)
Parameters

Type

Name

Description

uintoccurrenceThe Occurrence.
uintsubpartIndexThe subpart index.
Returns

Type

Description

uint

ListActiveShapeMaterials

List all the materials used in the part shape.
[HandleProcessCorruptedStateExceptions]public MaterialList ListActiveShapeMaterials(uint part)
Parameters

Type

Name

Description

uintpartThe part which contains sub materials.
Returns

Type

Description

MaterialList

ListSubpartMaterials

List all the materials used in the part shape or overrided with a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions]public MaterialList ListSubpartMaterials(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence which contains sub materials.
Returns

Type

Description

MaterialList

ListSubpartVariantMaterials

List all the materials variants in subpart.
[HandleProcessCorruptedStateExceptions]public VariantMaterialList ListSubpartVariantMaterials(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence which contains variants.
Returns

Type

Description

VariantMaterialList

SetSubpartMaterial

Set a subpart material assignment using a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions]public void SetSubpartMaterial(uint occurrence, uint subpartIndex, uint material)
Parameters

Type

Name

Description

uintoccurrenceThe Occurrence.
uintsubpartIndexThe subpart index.
uintmaterialThe material.

SetSubpartMaterials

Set multiple subpart materials at once using a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions]public void SetSubpartMaterials(uint occurrence, MaterialList materials, uint startIndex = 0)
Parameters

Type

Name

Description

uintoccurrenceThe Occurrence on which to apply the materials.
MaterialListmaterialsMaterials to set.
uintstartIndexThe subpart start index.

SetSubpartVariantMaterials

Set materials in variant.
[HandleProcessCorruptedStateExceptions]public void SetSubpartVariantMaterials(uint occurrence, VariantMaterialList variantMaterials)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence which contains variants.
VariantMaterialListvariantMaterialsList of variant and materials.

SetSubpartVariantMaterialsList

Set all the materials list in variants.
[HandleProcessCorruptedStateExceptions]public VariantMaterialList SetSubpartVariantMaterialsList(VariantList variants, MaterialListList materialListList)
Parameters

Type

Name

Description

VariantListvariantsThe part which contains variants.
MaterialListListmaterialListListThe part which contains the list of material variant list.
Returns

Type

Description

VariantMaterialList

TransferSubpartMaterialsOnPatches

Assign SubpartMaterialComponent materials on the occurrence's part shapes. This might affect other Part in the scene if not singularized before.
[HandleProcessCorruptedStateExceptions]public void TransferSubpartMaterialsOnPatches(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence which has sub materials assigned.

CreateAlternativeTree

Create a new alternative tree.
[HandleProcessCorruptedStateExceptions]public uint CreateAlternativeTree(string name, uint root = 0)
Parameters

Type

Name

Description

stringnameThe name of the new alternative tree.
uintrootThe root occurrence.
Returns

Type

Description

uint

GetAlternativeTreeRoot

Returns the root occurrence associated with the given AlternativeTree.
[HandleProcessCorruptedStateExceptions]public uint GetAlternativeTreeRoot(uint tree)
Parameters

Type

Name

Description

uinttreeTargeted alternative tree.
Returns

Type

Description

uint

ListAlternativeTrees

Returns all the available alternative trees.
[HandleProcessCorruptedStateExceptions]public AlternativeTreeList ListAlternativeTrees()
Returns

Type

Description

AlternativeTreeList

AddAnimation

Add an animation in Animation library.
[HandleProcessCorruptedStateExceptions]public void AddAnimation(uint animation)
Parameters

Type

Name

Description

uintanimationAnimation to add.

AddKeyframe

Adds a keyframe in the curve.
[HandleProcessCorruptedStateExceptions]public uint AddKeyframe(uint channel, ulong time, double value)
Parameters

Type

Name

Description

uintchannelThe channel one wants to add a keyframe in.
ulongtimeThe time.
doublevalueThe value.
Returns

Type

Description

uint

AddKeyframeFromCurrentPosition

Adds keyframes in a given AnimChannel based on current position.
[HandleProcessCorruptedStateExceptions]public void AddKeyframeFromCurrentPosition(uint channel, ulong time)
Parameters

Type

Name

Description

uintchannelThe channel one wants to add a keyframe in.
ulongtimeThe time.

AnimatesThisOccurrence

Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?.
[HandleProcessCorruptedStateExceptions]public bool AnimatesThisOccurrence(uint animation, uint occurrence)
Parameters

Type

Name

Description

uintanimationThe Animation.
uintoccurrenceThe supposedly animated occurrence.
Returns

Type

Description

bool

BakeAnimation

WARNING: this function is tagged as 'EXPERIMENTAL'
Bake an animation. The values are now precalculated and no longer interpolated.
[HandleProcessCorruptedStateExceptions]public void BakeAnimation(uint animation, uint occurrence, uint end, ulong interval)
Parameters

Type

Name

Description

uintanimationThe Animation.
uintoccurrenceThe occurrence.
uintendThe parent occurrence.
ulongintervalThe interval.

CreateAnimation

Creates an animation, need to use addAnimation when animation is filled.
[HandleProcessCorruptedStateExceptions]public uint CreateAnimation(string name)
Parameters

Type

Name

Description

stringnameName of the animation.
Returns

Type

Description

uint

CreateSkeletonMesh

Create a skeleton mesh from a joint component tree.
[HandleProcessCorruptedStateExceptions]public uint CreateSkeletonMesh(uint root)
Parameters

Type

Name

Description

uintrootRoot joint component node.
Returns

Type

Description

uint

DecimateAnimChannelBySegment

Decimates by segment a given AnimChannel.
[HandleProcessCorruptedStateExceptions]public void DecimateAnimChannelBySegment(uint channel, double precision)
Parameters

Type

Name

Description

uintchannelThe channel.
doubleprecisionThe precision.

DeleteAnimation

Deletes an animation.
[HandleProcessCorruptedStateExceptions]public void DeleteAnimation(uint animation)
Parameters

Type

Name

Description

uintanimationThe created animation.

DeleteEmptyAnimation

Delete all animation that contain 0 keyframes.
[HandleProcessCorruptedStateExceptions]public void DeleteEmptyAnimation()

DisplayAllKeyframesFromAnimChannel

Displays info on the selected AnimChannel.
[HandleProcessCorruptedStateExceptions]public void DisplayAllKeyframesFromAnimChannel(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel.

DisplayAllKeyframesFromAnimation

Displays info on the selected animation.
[HandleProcessCorruptedStateExceptions]public void DisplayAllKeyframesFromAnimation(uint animation)
Parameters

Type

Name

Description

uintanimationThe animation.

DisplayValueFromAnimChannelAtTime

Displays the value.
[HandleProcessCorruptedStateExceptions]public void DisplayValueFromAnimChannelAtTime(uint channel, ulong time, bool defaultValue = false)
Parameters

Type

Name

Description

uintchannelThe channel.
ulongtimeThe time.
booldefaultValueShow default instead ?.

GetAnimChannelIfExists

Returns the main AnimChannel of an Occurrence according to a given Animation.
[HandleProcessCorruptedStateExceptions]public uint GetAnimChannelIfExists(uint animation, uint occurrence)
Parameters

Type

Name

Description

uintanimationThe Animation.
uintoccurrenceThe Occurrence.
Returns

Type

Description

uint

GetAnimChannelInfo

WARNING: this function is tagged as 'EXPERIMENTAL'
get an animation channel informations.
[HandleProcessCorruptedStateExceptions]public AnimChannelInfo GetAnimChannelInfo(uint channel)
Parameters

Type

Name

Description

uintchannelAnimation to get info of.
Returns

Type

Description

AnimChannelInfo

GetAnimChannelOccurrence

Returns the Occurrence related to a given AnimChannel.
[HandleProcessCorruptedStateExceptions]public uint GetAnimChannelOccurrence(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel.
Returns

Type

Description

uint

GetAnimationComponentPropertyBinderLists

WARNING: this function is tagged as 'EXPERIMENTAL'
packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions]public AnimPropertyBinderList GetAnimationComponentPropertyBinderLists(uint animationComponent)
Parameters

Type

Name

Description

uintanimationComponentAnimation to get info of.
Returns

Type

Description

AnimPropertyBinderList

GetAnimationInfo

WARNING: this function is tagged as 'EXPERIMENTAL'
packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions]public AnimationInfo GetAnimationInfo(uint animation)
Parameters

Type

Name

Description

uintanimationAnimation to get info of.
Returns

Type

Description

AnimationInfo

GetAnimationPropertyBinderLists

WARNING: this function is tagged as 'EXPERIMENTAL'
packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions]public AnimPropertyBinderList GetAnimationPropertyBinderLists(uint animation)
Parameters

Type

Name

Description

uintanimationAnimation to get info of.
Returns

Type

Description

AnimPropertyBinderList

GetJointDefinition

Get joint definition from id.
[HandleProcessCorruptedStateExceptions]public JointDefinition GetJointDefinition(uint joint)
Parameters

Type

Name

Description

uintjointId of the joint.
Returns

Type

Description

JointDefinition

GetJointDefinitions

Get joint definition from id.
[HandleProcessCorruptedStateExceptions]public JointDefinitionList GetJointDefinitions(JointList joints)
Parameters

Type

Name

Description

JointListjointsIds of joints.
Returns

Type

Description

JointDefinitionList

GetKeyframeParentAnimChannel

Returns the parent AnimChannel of a given Keyframe.
[HandleProcessCorruptedStateExceptions]public uint GetKeyframeParentAnimChannel(uint keyframe)
Parameters

Type

Name

Description

uintkeyframeThe keyframe one wants the parent of.
Returns

Type

Description

uint

GetKeyframes

Returns a list of all keyframes of a simple animChannel.
[HandleProcessCorruptedStateExceptions]public KeyframeList GetKeyframes(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel one wants to extract the keyframs from.
Returns

Type

Description

KeyframeList

GetMainChannel

Returns the main AnimChannel of a given AnimChannel.
[HandleProcessCorruptedStateExceptions]public uint GetMainChannel(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel one wants the main of.
Returns

Type

Description

uint

GetOccurrenceJoint

Returns the Joint assigned to an occurrence if any.
[HandleProcessCorruptedStateExceptions]public uint GetOccurrenceJoint(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetParentChannel

Returns (if exists) the parent AnimChannel of a given AnimChannel.
[HandleProcessCorruptedStateExceptions]public uint GetParentChannel(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel one wants the parent of.
Returns

Type

Description

uint

GetSubChannel

Returns the subchannel of a given name from an AnimChannel.
[HandleProcessCorruptedStateExceptions]public uint GetSubChannel(uint channel, string name)
Parameters

Type

Name

Description

uintchannelThe channel one wants the subchannel of.
stringnameThe name of the subchannel.
Returns

Type

Description

uint

GetSubChannels

Returns all the sub channel of an AnimChannel.
[HandleProcessCorruptedStateExceptions]public AnimChannelList GetSubChannels(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel one wants the subchannel of.
Returns

Type

Description

AnimChannelList

LinkPropertyToAnimation

Creates a Binder in an Animation stack to animate an entity's property.
[HandleProcessCorruptedStateExceptions]public uint LinkPropertyToAnimation(uint animation, uint entity, string propertyName)
Parameters

Type

Name

Description

uintanimationThe Animation stack where to put a animated property.
uintentityThe entity object to animate.
stringpropertyNameThe name of the property to animate.
Returns

Type

Description

uint

ListAnimations

List all Animations from the scene.
[HandleProcessCorruptedStateExceptions]public AnimationList ListAnimations()
Returns

Type

Description

AnimationList

ListMainChannels

List all main AnimChannel from a given Animation.
[HandleProcessCorruptedStateExceptions]public AnimChannelList ListMainChannels(uint animation)
Parameters

Type

Name

Description

uintanimationThe Animation one wants to list the channels from.
Returns

Type

Description

AnimChannelList

MakeDefaultKeyframe

Creates keyframes with the default values of the channel at time 0.
[HandleProcessCorruptedStateExceptions]public void MakeDefaultKeyframe(uint channel)
Parameters

Type

Name

Description

uintchannelThe channel.

MoveAnimation

Moving animation.
[HandleProcessCorruptedStateExceptions]public void MoveAnimation(uint animation, uint target, uint newParent, ulong interval)
Parameters

Type

Name

Description

uintanimationThe Animation.
uinttargetThe target occurrence.
uintnewParentThe new parent occurrence.
ulongintervalThe interval.

RemoveKeyframe

Removes a keyframe in the curve.
[HandleProcessCorruptedStateExceptions]public void RemoveKeyframe(uint channel, ulong time)
Parameters

Type

Name

Description

uintchannelThe channel one wants to remove a keyframe from.
ulongtimeThe time.

UnlinkPropertyToAnimation

Unlinks a binder.
[HandleProcessCorruptedStateExceptions]public void UnlinkPropertyToAnimation(uint animation, uint entity, string propertyName)
Parameters

Type

Name

Description

uintanimationThe Animation stack where to put a animated property.
uintentityThe entity object to animate.
stringpropertyNameThe name of the property to animate.

AddAnimationAddedCallback

public uint AddAnimationAddedCallback(SceneInterface.AnimationAddedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.AnimationAddedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveAnimationAddedCallback

public void RemoveAnimationAddedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddAnimationChangedCallback

public uint AddAnimationChangedCallback(SceneInterface.AnimationChangedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.AnimationChangedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveAnimationChangedCallback

public void RemoveAnimationChangedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddAnimationClearedCallback

public uint AddAnimationClearedCallback(SceneInterface.AnimationClearedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.AnimationClearedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveAnimationClearedCallback

public void RemoveAnimationClearedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddAnimationRemovedCallback

public uint AddAnimationRemovedCallback(SceneInterface.AnimationRemovedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.AnimationRemovedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveAnimationRemovedCallback

public void RemoveAnimationRemovedCallback(uint id)
Parameters

Type

Name

Description

uintid

GetBRepInfos

Get BRep info.
[HandleProcessCorruptedStateExceptions]public GetBRepInfosReturn GetBRepInfos()
Returns

Type

Description

GetBRepInfosReturn

GetTessellationInfos

Get tessellation info.
[HandleProcessCorruptedStateExceptions]public GetTessellationInfosReturn GetTessellationInfos(uint root = 0)
Parameters

Type

Name

Description

uintrootOccurrence tree root.
Returns

GetTessellationParameters

Get tessellation parameters.
[HandleProcessCorruptedStateExceptions]public GetTessellationParametersReturn GetTessellationParameters(uint part)
Parameters

Type

Name

Description

uintpartThe tessellated part.
Returns

Print

Print an occurrence tree on log.
[HandleProcessCorruptedStateExceptions]public void Print(uint root = 0)
Parameters

Type

Name

Description

uintrootOccurrence tree root.

AddFilterToLibrary

Add a filter to the filters library.
[HandleProcessCorruptedStateExceptions]public uint AddFilterToLibrary(string name, string expr)
Parameters

Type

Name

Description

stringnameName of the filter.
stringexprThe filter expression.
Returns

Type

Description

uint

EvaluateExpression

Evaluate the given filter expression.
[HandleProcessCorruptedStateExceptions]public string EvaluateExpression(string filter)
Parameters

Type

Name

Description

stringfilterThe filter expression.
Returns

Type

Description

string

EvaluateExpressionOnOccurrences

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
[HandleProcessCorruptedStateExceptions]public StringList EvaluateExpressionOnOccurrences(OccurrenceList occurrences, string filter)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences on which to evaluate the expression.
stringfilterThe filter expression.
Returns

Type

Description

StringList

EvaluateExpressionOnSubTree

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
[HandleProcessCorruptedStateExceptions]public EvaluateExpressionOnSubTreeReturn EvaluateExpressionOnSubTree(string filter, uint fromOcc = 0)
Parameters

Type

Name

Description

stringfilterThe filter expression.
uintfromOccSource occurrence of the recursion.
Returns

ExportFilterLibrary

Export filters from a given file.
[HandleProcessCorruptedStateExceptions]public void ExportFilterLibrary(string file)
Parameters

Type

Name

Description

stringfileFile path to export.

FindFilterByName

Returns the first filter in the filter library with the given name.
[HandleProcessCorruptedStateExceptions]public Filter FindFilterByName(string name)
Parameters

Type

Name

Description

stringnameName of the filter to retrieve (case sensitive).
Returns

Type

Description

Filter

GetFilterExpression

Returns the filter expression (string) from a filter id stored in the library.
[HandleProcessCorruptedStateExceptions]public string GetFilterExpression(uint filterId)
Parameters

Type

Name

Description

uintfilterIdIdentifier of the filter to fetch.
Returns

Type

Description

string

GetFilterFromLibrary

Retrieve a filter from the library with its identifier.
[HandleProcessCorruptedStateExceptions]public Filter GetFilterFromLibrary(uint filterId)
Parameters

Type

Name

Description

uintfilterIdIdentifier of the filter to retrieve.
Returns

Type

Description

Filter

GetFilteredOccurrences

Recursively get all the occurrences validating the given filter expression.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetFilteredOccurrences(string filter, uint fromOcc = 0)
Parameters

Type

Name

Description

stringfilterThe filter expression.
uintfromOccSource occurrence of the recursion.
Returns

Type

Description

OccurrenceList

ImportFilterLibrary

Import filters from a given file.
[HandleProcessCorruptedStateExceptions]public void ImportFilterLibrary(string file)
Parameters

Type

Name

Description

stringfileFile containing the filter library.

ListFilterLibrary

Returns all the filter stored in the filter library.
[HandleProcessCorruptedStateExceptions]public FilterList ListFilterLibrary()
Returns

Type

Description

FilterList

RemoveFilterFromLibrary

Remove a filter from the filters library.
[HandleProcessCorruptedStateExceptions]public void RemoveFilterFromLibrary(uint filterId)
Parameters

Type

Name

Description

uintfilterIdIdentifier of the filter to remove.

GetIsolatedOccurrences

Get Occurrences currently being isolated.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetIsolatedOccurrences()
Returns

Type

Description

OccurrenceList

IsIsolated

Is in isolate mode.
[HandleProcessCorruptedStateExceptions]public bool IsIsolated()
Returns

Type

Description

bool

Isolate

Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...
[HandleProcessCorruptedStateExceptions]public void Isolate(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to isolate.

Unisolate

Exit the isolate mode.
[HandleProcessCorruptedStateExceptions]public void Unisolate()

AddIsolateBeganCallback

public uint AddIsolateBeganCallback(SceneInterface.IsolateBeganDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.IsolateBeganDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveIsolateBeganCallback

public void RemoveIsolateBeganCallback(uint id)
Parameters

Type

Name

Description

uintid

AddIsolateEndedCallback

public uint AddIsolateEndedCallback(SceneInterface.IsolateEndedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.IsolateEndedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveIsolateEndedCallback

public void RemoveIsolateEndedCallback(uint id)
Parameters

Type

Name

Description

uintid

SceneReadLock

Lock the scene to prevent modification while allowing reading from other threads.
[HandleProcessCorruptedStateExceptions]public void SceneReadLock()

SceneReadUnlock

Unlock the scene for modification.
[HandleProcessCorruptedStateExceptions]public void SceneReadUnlock()

SceneTryReadLock

Try lock the scene to prevent modification while allowing reading from other threads.
[HandleProcessCorruptedStateExceptions]public bool SceneTryReadLock()
Returns

Type

Description

bool

SceneWriteLock

Lock the scene from being read/write by other threads.
[HandleProcessCorruptedStateExceptions]public void SceneWriteLock()

SceneWriteUnlock

Unlock the scene for modification and reading.
[HandleProcessCorruptedStateExceptions]public void SceneWriteUnlock()

FindPartOccurrencesWithUnstitchedOpenShells

Find Part occurrences containing multiple unstitched openShell entities.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindPartOccurrencesWithUnstitchedOpenShells(uint root)
Parameters

Type

Name

Description

uintrootRoot occurrence.
Returns

Type

Description

OccurrenceList

MergeOccurrencesByTreeLevel

Merge all parts over maxLevel level.
[HandleProcessCorruptedStateExceptions]public void MergeOccurrencesByTreeLevel(OccurrenceList roots, int maxLevel, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process.
intmaxLevelMaximum tree level.
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.

MergePartOccurrences

Merge a set of parts.
[HandleProcessCorruptedStateExceptions]public OccurrenceList MergePartOccurrences(OccurrenceList partOccurrences, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters

Type

Name

Description

OccurrenceListpartOccurrencesOccurrence of the parts to merge.
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.
Returns

Type

Description

OccurrenceList

MergePartOccurrencesByAssemblies

Merge all parts under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).
[HandleProcessCorruptedStateExceptions]public void MergePartOccurrencesByAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process (will not be removed).
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.

MergePartOccurrencesByFinalAssemblies

Merge all final-level parts (ie occurrences having for children exclusively occurrences with part components) under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).
[HandleProcessCorruptedStateExceptions]public void MergePartOccurrencesByFinalAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.Destroy, bool CollapseToParent = true)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process (will not be removed).
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.
boolCollapseToParentIf true, final level unique merged part will replace it's parent.

MergePartOccurrencesByMaterials

Merge a set of parts by materials.
[HandleProcessCorruptedStateExceptions]public OccurrenceList MergePartOccurrencesByMaterials(OccurrenceList partOccurrences, bool mergeNoMaterials = true, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately, bool combineMeshes = true)
Parameters

Type

Name

Description

OccurrenceListpartOccurrencesOccurrence of the parts to merge.
boolmergeNoMaterialsIf true, merge all parts with no active material together, else do not merge them.
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.
boolcombineMeshesIf true, explode and remerge the input parts by visible materials.
Returns

Type

Description

OccurrenceList

MergePartOccurrencesByName

Merge all parts by occurrences names.
[HandleProcessCorruptedStateExceptions]public void MergePartOccurrencesByName(uint root = 0, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters

Type

Name

Description

uintrootRoot occurrence of the subtree to process.
MergeHiddenPartsModemergeHiddenPartsModeHidden parts handling mode, Destroy them, make visible or merge separately.

MergePartOccurrencesByRegions

Merge all parts within the same area.
[HandleProcessCorruptedStateExceptions]public OccurrenceList MergePartOccurrencesByRegions(OccurrenceList roots, MergeByRegionsStrategy mergeBy, MergeStrategy strategy)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process (will not be removed).
MergeByRegionsStrategymergeByNumber: number of output parts (or regions of parts)
MergeStrategystrategyChoose the regions merging strategy.
Returns

Type

Description

OccurrenceList

MergePartOccurrencesWithSingleOpenShellByAssemblies

Merge Part occurrences containing a single openShell entity, by assemblies.
[HandleProcessCorruptedStateExceptions]public OccurrenceList MergePartOccurrencesWithSingleOpenShellByAssemblies(uint root)
Parameters

Type

Name

Description

uintrootRoot of the main assembly to merge.
Returns

Type

Description

OccurrenceList

ApplyTransformation

Apply a transformation to the local matrix of an occurrence.
[HandleProcessCorruptedStateExceptions]public void ApplyTransformation(uint occurrence, Matrix4 matrix)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to apply the matrix on.
Matrix4matrixTransformation to matrix.

CreateSymmetry

Create symmetries from selection.
[HandleProcessCorruptedStateExceptions]public void CreateSymmetry(OccurrenceList occurrences, AxisPlane plane)
Parameters

Type

Name

Description

OccurrenceListoccurrencesSelection of occurrences.
AxisPlaneplaneSymmetry plane.

Rotate

Modify the local matrix of the scene node to apply a rotation.
[HandleProcessCorruptedStateExceptions]public void Rotate(uint occurrence, Point3 axis, double angle)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to rotate.
Point3axisAxis of rotation.
doubleangleAngle of rotation.

SetLocalMatrices

Change the local matrices on a list of occurrences.
[HandleProcessCorruptedStateExceptions]public void SetLocalMatrices(OccurrenceList occurrencesIds, Matrix4List matrices, uint batchSize)
Parameters

Type

Name

Description

OccurrenceListoccurrencesIdsList of occurrences on which to set the local matrices.
Matrix4ListmatricesThe occurrences' new local matrices.
uintbatchSizeNumber of matrices to be set per thread.

SetLocalMatrix

Change the local matrix on an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetLocalMatrix(uint occurrence, Matrix4 matrix)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to set the local matrix.
Matrix4matrixThe new occurrence local matrix.

GetPartMesh

Return the mesh of the TesselatedShape.
[HandleProcessCorruptedStateExceptions]public uint GetPartMesh(uint part)
Parameters

Type

Name

Description

uintpartThe part component.
Returns

Type

Description

uint

GetPartModel

Return the model of the BRepShape.
[HandleProcessCorruptedStateExceptions]public uint GetPartModel(uint part)
Parameters

Type

Name

Description

uintpartThe part component.
Returns

Type

Description

uint

GetPartsMeshes

Return the meshes of the TesselatedShape for each given parts if any.
[HandleProcessCorruptedStateExceptions]public MeshList GetPartsMeshes(PartList parts)
Parameters

Type

Name

Description

PartListpartsThe list of part component.
Returns

Type

Description

MeshList

GetPartsModels

Return the models of the BRepShape for each given parts if any.
[HandleProcessCorruptedStateExceptions]public ModelList GetPartsModels(PartList parts)
Parameters

Type

Name

Description

PartListpartsThe list of part component.
Returns

Type

Description

ModelList

GetPartsTransforms

Returns the transform matrix of each given parts.
[HandleProcessCorruptedStateExceptions]public Matrix4List GetPartsTransforms(PartList parts)
Parameters

Type

Name

Description

PartListpartsThe parts to retrieve transform.
Returns

Type

Description

Matrix4List

GetPartsTransformsIndexed

Returns the transform matrix of each given parts (indexed mode).
[HandleProcessCorruptedStateExceptions]public GetPartsTransformsIndexedReturn GetPartsTransformsIndexed(PartList parts)
Parameters

Type

Name

Description

PartListpartsThe parts to retrieve transform.
Returns

SetPartMesh

Add a mesh to a part (create a TessellatedShape on the part).
[HandleProcessCorruptedStateExceptions]public void SetPartMesh(uint part, uint mesh)
Parameters

Type

Name

Description

uintpartThe part component.
uintmeshThe mesh to add to the part.

SetPartModel

Add a model to a part (create a BRepShape on the part).
[HandleProcessCorruptedStateExceptions]public void SetPartModel(uint part, uint model)
Parameters

Type

Name

Description

uintpartThe part component.
uintmodelThe model to add to the part.

SetPartsTransforms

Set the transform matrix of each given parts.
[HandleProcessCorruptedStateExceptions]public void SetPartsTransforms(PartList parts, Matrix4List transforms)
Parameters

Type

Name

Description

PartListpartsThe parts to retrieve transform.
Matrix4ListtransformsThe transform matrix of each part.

SetPartsTransformsIndexed

Set the transform matrix of each given parts (indexed mode).
[HandleProcessCorruptedStateExceptions]public void SetPartsTransformsIndexed(PartList parts, IntList indices, Matrix4List transforms)
Parameters

Type

Name

Description

PartListpartsThe parts to retrieve transform.
IntListindicesThe transform matrix index for each parts.
Matrix4ListtransformsThe list of transform matrices.

GetPartialLoadingStatus

Get the current status of a partial loading component.
[HandleProcessCorruptedStateExceptions]public PartialLoad_Status GetPartialLoadingStatus(uint component)
Parameters

Type

Name

Description

uintcomponentReferenced Data component.
Returns

Type

Description

PartialLoad_Status

SetReferencedDataComponentParent

Defines which referenced data is parent to the given component.
[HandleProcessCorruptedStateExceptions]public void SetReferencedDataComponentParent(uint component, uint parent)
Parameters

Type

Name

Description

uintcomponentThe referenced data component to alter.
uintparentThe parent.

SetReferencedDataComponentPath

Defines which path the referenced data is at.
[HandleProcessCorruptedStateExceptions]public void SetReferencedDataComponentPath(uint component, string filePath)
Parameters

Type

Name

Description

uintcomponentThe referenced data component to alter.
stringfilePathThe filepath.

AlignPivotPointToWorld

Re-orient the Pivot Point straight to world origin (the grid).
[HandleProcessCorruptedStateExceptions]public void AlignPivotPointToWorld(OccurrenceList occurrences, bool applyToChildren)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences to modify.
boolapplyToChildrenIf True, all the pivot of the descending occurrences from occurrence will be affected.

MovePivotPointToOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of its bounding box (and of its children if the parameter is True).
[HandleProcessCorruptedStateExceptions]public void MovePivotPointToOccurrenceCenter(OccurrenceList occurrences, bool applyToChildren)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences (or the roots occurrences if recursively=True).
boolapplyToChildrenIf True, all the pivot of the descending occurrences from occurrence will be affected.

MovePivotPointToOrigin

Move the pivot point of an occurrence (and its descendants if recursively) to the origin (0,0,0).
[HandleProcessCorruptedStateExceptions]public void MovePivotPointToOrigin(uint occurrence, bool applyToChildren)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence (or the root occurrence if recursively=True).
boolapplyToChildrenIf True, all the pivot of the descending occurrences from occurrence will be affected.

MovePivotPointToSelectionCenter

Move the pivot point of all given occurrences to the center of all occurrences.
[HandleProcessCorruptedStateExceptions]public void MovePivotPointToSelectionCenter(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences to modify.

MovePivotPointToTargetedOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of the targeted occurrence Center (and of its children if the parameter is True).
[HandleProcessCorruptedStateExceptions]public void MovePivotPointToTargetedOccurrenceCenter(OccurrenceList occurrences, uint target, bool applyToChildren)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrence (or the root occurrence if recursively=True).
uinttargetThe target occurrence.
boolapplyToChildrenIf True, all the pivot of the descending occurrences from occurrence will be affected.

SetPivotOnly

Set the pivot of an occurrence to the given transformation matrix, the geometry will not be moved (warning: do not confuse with property Transform which actually move the occurrence).
[HandleProcessCorruptedStateExceptions]public void SetPivotOnly(uint occurrence, Matrix4 pivot)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence to move the pivot.
Matrix4pivotThe new transformation matrix for the occurrence (pivot).

AddAnnotationGroup

Add a Annotation Group to the pmi component.
[HandleProcessCorruptedStateExceptions]public uint AddAnnotationGroup(uint component, string name)
Parameters

Type

Name

Description

uintcomponentComponent to add the Annotation Group.
stringnameName of the annotation group.
Returns

Type

Description

uint

AddMeshToAnnotation

Add a mesh and its material to a annotation.
[HandleProcessCorruptedStateExceptions]public void AddMeshToAnnotation(uint annotation, uint material, uint staticmesh)
Parameters

Type

Name

Description

uintannotation
uintmaterial
uintstaticmesh

ConvertPMIToOccurrences

Convert each PMI component into a set of occurrences with mesh geometries.
[HandleProcessCorruptedStateExceptions]public void ConvertPMIToOccurrences(OccurrenceList occurrences, bool convertVisibility = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrence selection.
boolconvertVisibilityIf True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible.

CreateAnnotationFromDefinition

Create Annotation from definition.
[HandleProcessCorruptedStateExceptions]public uint CreateAnnotationFromDefinition(AnnotationDefinition definition)
Parameters

Type

Name

Description

AnnotationDefinitiondefinitionAnnotation definition.
Returns

Type

Description

uint

CreateOccurrenceFromAnnotation

Convert a single annotation on an occurrence into an occurrence with mesh geometry.
[HandleProcessCorruptedStateExceptions]public uint CreateOccurrenceFromAnnotation(uint annotation, bool convertVisibility = false)
Parameters

Type

Name

Description

uintannotationAnnotation that shall be converted to an occurrence with mesh geometry.
boolconvertVisibilityIf True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible.
Returns

Type

Description

uint

CreateProductView

Create a productview from definition.
[HandleProcessCorruptedStateExceptions]public uint CreateProductView(ProductViewDefinition definition)
Parameters

Type

Name

Description

ProductViewDefinitiondefinition
Returns

Type

Description

uint

GetAnnotationDefinition

Get definition of given annotation.
[HandleProcessCorruptedStateExceptions]public AnnotationDefinition GetAnnotationDefinition(uint annotation)
Parameters

Type

Name

Description

uintannotation
Returns

Type

Description

AnnotationDefinition

GetAnnotationGroups

Returns the list of the AnnotationGroup from a PMIComponent.
[HandleProcessCorruptedStateExceptions]public AnnotationGroupList GetAnnotationGroups(uint pmiComponent)
Parameters

Type

Name

Description

uintpmiComponentThe pmi component.
Returns

Type

Description

AnnotationGroupList

GetAnnotationListAABB

Get the AABB of the annotation list.
[HandleProcessCorruptedStateExceptions]public AABB GetAnnotationListAABB(AnnotationList annotationList)
Parameters

Type

Name

Description

AnnotationListannotationList
Returns

Type

Description

AABB

GetAnnotations

Returns the list of the Annotation from a AnnotationGroup.
[HandleProcessCorruptedStateExceptions]public AnnotationList GetAnnotations(uint group)
Parameters

Type

Name

Description

uintgroupThe AnnotationGroup.
Returns

Type

Description

AnnotationList

GetOccurrenceAnnotationDefinitions

Get all annotations definition of given occurrence.
[HandleProcessCorruptedStateExceptions]public AnnotationDefinitionList GetOccurrenceAnnotationDefinitions(uint occurrence)
Parameters

Type

Name

Description

uintoccurrence
Returns

GetProductViewDefinition

Get productview definition.
[HandleProcessCorruptedStateExceptions]public ProductViewDefinition GetProductViewDefinition(uint view)
Parameters

Type

Name

Description

uintviewThe product view.
Returns

Type

Description

ProductViewDefinition

GetProductViewDefinitions

Get all productviews definitions.
[HandleProcessCorruptedStateExceptions]public ProductViewDefinitionList GetProductViewDefinitions()
Returns

SetAnnotationToGroup

Set Annotation to a Annotation Group.
[HandleProcessCorruptedStateExceptions]public void SetAnnotationToGroup(uint annotation, uint group)
Parameters

Type

Name

Description

uintannotation
uintgroup

CleanInstances

Clean prototypes and instances (lonely instances, overriding their prototypes hierarchies...).
[HandleProcessCorruptedStateExceptions]public void CleanInstances(bool removeUselessInstances, bool removeHierarchyOverridingInstances, uint occurrence = 0)
Parameters

Type

Name

Description

boolremoveUselessInstancesRemove instances where they are not needed (prototype referenced once, ...).
boolremoveHierarchyOverridingInstancesRemove instances overriding their prototypes sub-hierarchies.
uintoccurrenceRoot occurrence for the process.

GetDirectInstances

Returns all the occurrences prototyping the given occurrence.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetDirectInstances(uint prototype)
Parameters

Type

Name

Description

uintprototypeThe prototype occurrence.
Returns

Type

Description

OccurrenceList

GetFinalPrototype

Returns the final prototype of an occurrence (ie. The very first one of prototype tree).
[HandleProcessCorruptedStateExceptions]public uint GetFinalPrototype(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetInstances

Get occurrences sharing the same prototype as the given one.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetInstances(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceReference part occurrence.
Returns

Type

Description

OccurrenceList

GetPrototype

Returns the prototype of an occurrence.
[HandleProcessCorruptedStateExceptions]public uint GetPrototype(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
Returns

Type

Description

uint

GetPrototypes

Returns the prototype for each given occurrence.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetPrototypes(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrence.
Returns

Type

Description

OccurrenceList

PrototypeSubTree

Create occurrences that prototype the given occurrence and all its subtree.
[HandleProcessCorruptedStateExceptions]public uint PrototypeSubTree(uint prototype)
Parameters

Type

Name

Description

uintprototypeThe root occurrence of the sub-tree to prototype.
Returns

Type

Description

uint

SetPrototype

Sets the prototype of an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetPrototype(uint occurrence, uint prototype)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.
uintprototypeThe prototype.

SetPrototypes

Sets the prototype for each given occurrence.
[HandleProcessCorruptedStateExceptions]public void SetPrototypes(OccurrenceList occurrences, OccurrenceList prototypes)
Parameters

Type

Name

Description

OccurrenceListoccurrencesThe occurrences.
OccurrenceListprototypesThe prototypes.

UpdateChildrenPrototypes

Update children prototypes of the given occurrence.
[HandleProcessCorruptedStateExceptions]public void UpdateChildrenPrototypes(uint occurrence)
Parameters

Type

Name

Description

uintoccurrenceThe occurrence.

ClearSelection

Clear the current selection.
[HandleProcessCorruptedStateExceptions]public void ClearSelection(uint selectionId = 1)
Parameters

Type

Name

Description

uintselectionIdID of the selection to clear, or current selection (id = 1) will be cleared.

CreateSelectionSnapshot

Get the ID of a copy of the current selection to use it later.
[HandleProcessCorruptedStateExceptions]public uint CreateSelectionSnapshot()
Returns

Type

Description

uint

DeleteSelection

Delete all selected occurrences, and/or sub-occurrence elements.
[HandleProcessCorruptedStateExceptions]public void DeleteSelection(uint selectionId = 1)
Parameters

Type

Name

Description

uintselectionIdID of the selection to delete, or current selection (id = 1) will be deleted.

DeleteSelectionSnapshot

Delete a selection snapshot using its id.
[HandleProcessCorruptedStateExceptions]public void DeleteSelectionSnapshot(uint selectionId)
Parameters

Type

Name

Description

uintselectionIdSelection ID of the snapshot to delete.

GetSelectedOccurrences

Returns all the selected occurrences.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetSelectedOccurrences(bool keepAncestors = false, uint selectionId = 1)
Parameters

Type

Name

Description

boolkeepAncestorsIf True, occurrences with ancestors selected will be remove from the list.
uintselectionIdID of the selection to use, or current selection (id = 1) will be used.
Returns

Type

Description

OccurrenceList

GetSelectedPolygonCount

Returns the number of selected polygons.
[HandleProcessCorruptedStateExceptions]public ulong GetSelectedPolygonCount(uint selectionId = 1)
Parameters

Type

Name

Description

uintselectionIdID of the selection to use, or current selection (id = 1) will be used.
Returns

Type

Description

ulong

InvertOrientationSelection

Invert the orientation of each selected item (occurrences and/or sub-occurrence elements.
[HandleProcessCorruptedStateExceptions]public void InvertOrientationSelection(uint selectionId = 1)
Parameters

Type

Name

Description

uintselectionIdID of the selection to invert, or current selection (id = 1) will be inverted.

InvertSelect

Invert occurrences to selection.
[HandleProcessCorruptedStateExceptions]public void InvertSelect(OccurrenceList occurrence, uint selectionId = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrenceOccurrences to invert from the selection.
uintselectionIdID of the selection to use, or current selection (id = 1) will be used.

InvertSelection

Replace the selection by all unselected part occurrences.
[HandleProcessCorruptedStateExceptions]public void InvertSelection(uint selectionId = 1)
Parameters

Type

Name

Description

uintselectionIdID of the selection to invert, or current selection (id = 1) will be inverted.

Select

Add occurrences to selection.
[HandleProcessCorruptedStateExceptions]public void Select(OccurrenceList occurrences, uint selectionId = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to add to the selection.
uintselectionIdID of the selection to use, or current selection (id = 1) will be used.

SeparateSelection

Separate all polygons from their original parts into a new one or new ones depending on the parameters.
[HandleProcessCorruptedStateExceptions]public OccurrenceList SeparateSelection(bool createSingleOccurrence = true, uint selectionId = 1)
Parameters

Type

Name

Description

boolcreateSingleOccurrenceOnly create a single occurrence, or create occurrences corresponding to every part containing selected elements, at the same place in the hierarchical tree.
uintselectionIdID of the selection to separate, or current selection (id = 1) will be separated.
Returns

Type

Description

OccurrenceList

Unselect

Remove occurrences to selection.
[HandleProcessCorruptedStateExceptions]public void Unselect(OccurrenceList occurrence, uint selectionId = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrenceOccurrences to remove from the selection.
uintselectionIdID of the selection to use, or current selection (id = 1) will be used.

AddSelectionChangedCallback

public uint AddSelectionChangedCallback(SceneInterface.SelectionChangedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.SelectionChangedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveSelectionChangedCallback

public void RemoveSelectionChangedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddVariantChangedCallback

public uint AddVariantChangedCallback(SceneInterface.VariantChangedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.VariantChangedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveVariantChangedCallback

public void RemoveVariantChangedCallback(uint id)
Parameters

Type

Name

Description

uintid

Compress

Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances).
[HandleProcessCorruptedStateExceptions]public uint Compress(uint occurrence = 0)
Parameters

Type

Name

Description

uintoccurrenceRoot occurrence for the process.
Returns

Type

Description

uint

ConvertToOldSchoolVisibility

Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited).
[HandleProcessCorruptedStateExceptions]public void ConvertToOldSchoolVisibility(uint root = 0)
Parameters

Type

Name

Description

uintrootRoot occurrence.

GetHiddenPartOccurrences

Get hidden part occurrences.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetHiddenPartOccurrences(OccurrenceList roots = null)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process.
Returns

Type

Description

OccurrenceList

GetVisiblePartOccurrences

Get visible part occurrences.
[HandleProcessCorruptedStateExceptions]public OccurrenceList GetVisiblePartOccurrences(OccurrenceList roots = null)
Parameters

Type

Name

Description

OccurrenceListrootsRoots occurrences for the process.
Returns

Type

Description

OccurrenceList

MakeInstanceUnique

Singularize all instances on the sub-tree of an occurrence.
[HandleProcessCorruptedStateExceptions]public void MakeInstanceUnique(OccurrenceList occurrences = null, bool keepOnlyPartInstances = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesRoot occurrence for the process.
boolkeepOnlyPartInstancesIf true, instances of part will not be singularized.

Rake

Set the same parent to all descending parts (all parts will be singularized).
[HandleProcessCorruptedStateExceptions]public void Rake(uint occurrence = 0, bool keepInstances = false)
Parameters

Type

Name

Description

uintoccurrenceRoot occurrence for the process.
boolkeepInstancesIf false, the part will be singularized.

RemoveSymmetryMatrices

Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix.
[HandleProcessCorruptedStateExceptions]public void RemoveSymmetryMatrices(uint occurrence = 0)
Parameters

Type

Name

Description

uintoccurrenceRoot occurrence for the process.

ResetPartTransform

Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes.
[HandleProcessCorruptedStateExceptions]public void ResetPartTransform(uint root = 0)
Parameters

Type

Name

Description

uintrootRoot occurrence for the process.

ResetTransform

Set all transformation matrices to identity in a sub-tree.
[HandleProcessCorruptedStateExceptions]public void ResetTransform(uint root, bool recursive = true, bool keepInstantiation = true, bool keepPartTransform = false)
Parameters

Type

Name

Description

uintrootRoot occurrence for the process.
boolrecursiveIf False, transformation will be applied only on the root and its components.
boolkeepInstantiationIf False, all occurrences will be singularized.
boolkeepPartTransformIf False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices).

CreateRayProber

Creates a ray prober.
[HandleProcessCorruptedStateExceptions]public uint CreateRayProber()
Returns

Type

Description

uint

CreateSphereProber

Creates a sphere prober.
[HandleProcessCorruptedStateExceptions]public uint CreateSphereProber()
Returns

Type

Description

uint

RayCast

[HandleProcessCorruptedStateExceptions]public RayHit RayCast(Ray ray, uint root)
Parameters

Type

Name

Description

RayrayThe ray to cast.
uintrootThe root occurrence to cast from.
Returns

Type

Description

RayHit

RayCastAll

[HandleProcessCorruptedStateExceptions]public RayHitList RayCastAll(Ray ray, uint root)
Parameters

Type

Name

Description

RayrayThe ray to cast.
uintrootThe root occurrence to cast from.
Returns

Type

Description

RayHitList

UpdateRayProber

Updates the designed ray prober.
[HandleProcessCorruptedStateExceptions]public void UpdateRayProber(uint proberID, Ray ray)
Parameters

Type

Name

Description

uintproberIDThe ray prober Id.
RayrayUpdate the prober's ray values.

UpdateSphereProber

Updates the designed sphere prober.
[HandleProcessCorruptedStateExceptions]public void UpdateSphereProber(uint proberID, Point3 sphereCenter, double sphereRadius)
Parameters

Type

Name

Description

uintproberIDThe sphere prober Id.
Point3sphereCenterThe new prober center.
doublesphereRadiusThe new prober radius.

AddonRayProbeCallback

public uint AddonRayProbeCallback(SceneInterface.onRayProbeDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.onRayProbeDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveonRayProbeCallback

public void RemoveonRayProbeCallback(uint id)
Parameters

Type

Name

Description

uintid

AddonSphereProbeCallback

public uint AddonSphereProbeCallback(SceneInterface.onSphereProbeDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

SceneInterface.onSphereProbeDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveonSphereProbeCallback

public void RemoveonSphereProbeCallback(uint id)
Parameters

Type

Name

Description

uintid

GetMultipleOccurrenceUserData

Batch version of getOccurrenceUserData.
[HandleProcessCorruptedStateExceptions]public PtrList GetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
OccurrenceListoccurrencesOccurrences that store the user data.
Returns

Type

Description

PtrList

GetOccurrenceUserData

Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions]public IntPtr GetOccurrenceUserData(uint userDataId, uint occurrence)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
uintoccurrenceOccurrence that store the user data.
Returns

Type

Description

IntPtr

HasMultipleOccurrenceUserData

Batch version of hasOccurrenceUserData.
[HandleProcessCorruptedStateExceptions]public BoolList HasMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
OccurrenceListoccurrencesOccurrences that potentially store the user data.
Returns

Type

Description

BoolList

HasOccurrenceUserData

Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions]public bool HasOccurrenceUserData(uint userDataId, uint occurrence)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
uintoccurrenceOccurrence that potentially store the user data.
Returns

Type

Description

bool

SetMultipleOccurrenceUserData

Batch version of setOccurrenceUserData.
[HandleProcessCorruptedStateExceptions]public void SetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences, PtrList userDataList)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
OccurrenceListoccurrencesOccurrences that will store the user data.
PtrListuserDataListUser data to store on each occurrence.

SetOccurrenceUserData

Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions]public void SetOccurrenceUserData(uint userDataId, uint occurrence, IntPtr userData)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
uintoccurrenceOccurrence that will store the user data.
IntPtruserDataUser data to store in the given occurrence.

SubscribeToOccurrenceUserData

Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times.
[HandleProcessCorruptedStateExceptions]public uint SubscribeToOccurrenceUserData()
Returns

Type

Description

uint

UnsetMultipleOccurrenceUserData

Batch version of unsetOccurrenceUserData.
[HandleProcessCorruptedStateExceptions]public void UnsetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
OccurrenceListoccurrencesOccurrences that will store the user data.

UnsetOccurrenceUserData

Unset the userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions]public void UnsetOccurrenceUserData(uint userDataId, uint occurrence)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier provided by subscribeToOccurrenceUserData.
uintoccurrenceOccurrence that will store the user data.

UnsubscribeFromOccurrenceUserData

[HandleProcessCorruptedStateExceptions]public void UnsubscribeFromOccurrenceUserData(uint userDataId)
Parameters

Type

Name

Description

uintuserDataIdUserData identifier to unsubscribe.

AddVariant

Create a new variant.
[HandleProcessCorruptedStateExceptions]public uint AddVariant(string name)
Parameters

Type

Name

Description

stringnameThe name of the new variant.
Returns

Type

Description

uint

DuplicateVariant

Create a new variant which is a copy of an existing variant.
[HandleProcessCorruptedStateExceptions]public uint DuplicateVariant(uint variant, string name)
Parameters

Type

Name

Description

uintvariantThe variant to duplicated.
stringnameName of the new variant.
Returns

Type

Description

uint

EndModifyAllVariants

Call this function to disable the modifications of all variants at the same time.
[HandleProcessCorruptedStateExceptions]public void EndModifyAllVariants()

GetVariantComponentsDefinitions

Returns the definitions of multiple variant components.
[HandleProcessCorruptedStateExceptions]public VariantDefinitionListList GetVariantComponentsDefinitions(VariantComponentList variantComponents)
Parameters

Type

Name

Description

VariantComponentListvariantComponentsThe list of variant components to retrieve definitions.
Returns

GetVariantTree

Get the alternative tree used by this variant.
[HandleProcessCorruptedStateExceptions]public uint GetVariantTree(uint variant)
Parameters

Type

Name

Description

uintvariantThe variant.
Returns

Type

Description

uint

ListVariants

Returns all the available variants.
[HandleProcessCorruptedStateExceptions]public VariantList ListVariants()
Returns

Type

Description

VariantList

RemoveVariant

Remove a variant.
[HandleProcessCorruptedStateExceptions]public void RemoveVariant(uint variant)
Parameters

Type

Name

Description

uintvariantThe variant to remove.

SetCurrentVariant

Change the current variant used.
[HandleProcessCorruptedStateExceptions]public void SetCurrentVariant(uint variant = 0)
Parameters

Type

Name

Description

uintvariantThe variant to enable (can be null).

SetVariantTree

Set the alternative tree to use for this variant.
[HandleProcessCorruptedStateExceptions]public void SetVariantTree(uint variant, uint tree)
Parameters

Type

Name

Description

uintvariantThe variant to modify.
uinttreeThe alternative tree to use for this variant.

StartModifyAllVariants

Call this function to to enable the modifications of all variants at the same time.
[HandleProcessCorruptedStateExceptions]public void StartModifyAllVariants()