Fabien
Fabien

Reputation: 41

How to select by dbid in viewer when several models are loaded?

I load several models in my scene. I would like to:

  1. Fit to view from dbId -> this can be done with viewer.fitToView(objectIds,model)
  2. Select an element from dbid on a particular model. But viewer.select(dbids,selectionType) does not offer possibility to select the model.

How can we make a selection on a dbid, on specific model, when several models are loaded?

Thanks

Upvotes: 0

Views: 557

Answers (1)

Petr Broz
Petr Broz

Reputation: 9942

Looking at the code of Forge Viewer v6, the select method is defined as

Viewer3D.prototype.select = function (dbids, model) { ... }

So the second parameter should actually be the model, not a selection type.

Upvotes: 1

Related Questions