SView Help Center
English (US)

Assembly

Author: sviewngts Last Updated: 2026-10-28 19:12

Interface List

Interface Name Description
Assembly Structure Obtains the assembly structure relationships
Get Model by Assembly Path Obtains a model by its assembly path
Load Loads model rendering data
Unload Unloads model rendering data
Get Visibility Obtains model visibility
Set Visibility Sets model visibility
Select Sets a model to the selected state
Deselect Sets a model to the unselected state

Get Assembly Structure

// Get the top-level model
let topModel = scene.getTopModel();
// Get child models
let childrenList = topModel.getChildren();
// Get the assembly structure
let jsonAssembly = new SView.JsonAssembly(topModel, true, true);
// Convert to JSON
let jsonStr = JSON.stringify(jsonAssembly);

Get Model by Assembly Path

let path = 'M3D|MAIN|PATH|0|5';
let model = shapes.getModelBySVLPath('M3D|MAIN|PATH|0|5');

Load Model

model.load();

Unload Model

// Deselect first
selector.remove(model);
model.unLoad();

Get Visibility

// Get the model's current visibility
model.isVisible();
// Get the model's default visibility; pass true to get the default visibility
model.isVisible(true);

Set Visibility

// You can use the following interface to set visibility, or refer to the visibility control interfaces in Scene Operations
model.setVisible(true);

Select Model

// Refer to the selection operations in Scene Operations
selector.add(model);
selector.add(model.getId());

Deselect Model

// Refer to the selection operations in Scene Operations
selector.remove(model);
selector.remove(model.getId());