createTilesetFromIModelId
suspend fun createTilesetFromIModelId(options: ITwinData.CreateTilesetFromIModelIdOptions): Cesium3DTileset?(source)
Create a Cesium3DTileset for the given iModel id using iTwin's Mesh Export API.
If there is not a completed export available for the given iModel id, the returned promise will resolve to undefined
. We recommend waiting 10-20 seconds and trying to load the tileset again. If all exports are Invalid this will throw an error.
See the iTwin Platform Mesh Export API documentation for more information on request parameters
const tileset = await ITwinData.createTilesetFromIModelId({ iModelId });
if (defined(tileset)) {
viewer.scene.primitives.add(tileset);
}
Content copied to clipboard
Return
A promise that will resolve to the created 3D tileset or undefined
if there is no completed export for the given iModel id