// 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());