Optionalclient: BimWorksClient<Client | null | undefined>The @bimworks/jssdk!BimWorksClient to use for communication with the BIM.works Repository
Optionalsettings: ModelManagerSettingsRegisters a listener for loaded, unloaded and swapped models
OptionaltriggerForAllLoadedModels: booleantrue: call listener.addModels with the models loaded already (the listener must have addModels then); what addModels returns is returned, a resolved Promise otherwise
Add one or more models. The returned Promise will resolve after all connected components have performed the addModels call.
When a version lacks im_metadata (summary object, or geometry still processing). Use the complete Version as returned by @bimworks/jssdk!BimWorksClient.getNodeVersion.
While a connected Viewer3d is in offline mode, the object data of an IFC model is read from the viewer's offline store instead of the server, and a model that was not prepared for offline use rejects with ModelNotAvailableOfflineError before any server call.
Registers a listener for models shown or hidden as a whole (showModels, hideModels)
All the known @bimworks/jssdk!Qid
The building storeys of the loaded models. The returned object should not be changed.
OptionalversionUuids: string[]The objects of the versions (default: all loaded) a viewer shows when they load: no spaces, zones, openings or building and storey boxes. A new set.
The number of objects that are currently loaded
What the ModelManager knows about a loaded object, undefined for an unknown one. The returned object should not be changed.
Get all the @bimworks/jssdk!Qid s of the objects of the given (IFC) type
The IFC types of the loaded objects
The loaded @bimworks/jssdk!Version with this uuid, undefined when it is not loaded (or still loading)
A Set<@bimworks/jssdk!Version with all the currently loaded models
An Array<@bimworks/jssdk!Version with all the currently loaded models
An Array<@bimworks/jssdk!Vid with the @bimworks/jssdk!Vid of the currently loaded IFC models (no point clouds, drawings or glTF: what a query or a storey listing can be asked for)
hasObject for a version and oid, without making a Qid (members of a large group)
Hide the given models (must already be loaded)
Return the inverse of a set of @bimworks/jssdk!Qid, so all the other loaded objects
Anything with a has(qid), typically a @bimworks/jssdk!QidSet
A new QidSet with the Qid of every loaded object that qids does not contain
Whether the object is a slab with predefined type ROOF, among the loaded models
Whether the given Version (by UUID) has been loaded
Puts one viewer ahead of another. The ModelManager hands new models to its viewers one at a time, in the
order they were created; after this call high gets them before low, so the view in front loads first.
Does nothing when either viewer is not attached to this ModelManager, or high is already first.
The viewer (Viewer3d or Viewer2d) that should load first
The viewer that should wait for it
Remove one or more models. The returned Promise will resolve after all connected components have performed the removeModels call.
Lets go of an ObjectStateManager made on this ModelManager (its constructor registers it). Until then every model loaded later fills its sets: call it when the viewer the ObjectStateManager was made for goes
The client to load model data with, for a manager constructed before the client existed
Replace the existing set of loaded models, by the given set of models. This method will potentially unload models. The returned Promise will resolve after all connected components have performed the setModels call.
Show the given models (must already be loaded)
The number of loaded models
Replaces a loaded version by its successor (after a commit), keeping the object state of the objects that still exist. Falls back to unloading both and loading the new one when the swap cannot be done in place.
A ModelManager keeps track of the models that have been loaded. A ModelManager is required when using the Viewer2d or Viewer3d. Most application will only need one ModelManager, but if you have an application where you want to show different models in different viewers, you might need more. The ModelManager keeps track of: