Skip to content

Add getBuildingId() method to Widget API #23

@jonatanjacobsson

Description

@jonatanjacobsson

Currently, there's no direct way to retrieve the building ID from the Widget API. Widgets need to query objects or parse URLs to determine which building they're operating in.

Proposed Solution:

Add a getBuildingId() method that returns the current building ID:

const buildingId = await window.StreamBIM.getBuildingId();
// Returns: "1000" (or current building ID)

Current Workaround:

Widgets must:

  1. Parse URL parameters (buildingId=1000)
  2. Query an object via getObjectInfo() and extract building property

Use Case:

Widget needs to make IFC search queries that require buildingId parameter. Having direct access would simplify widget development and make code more maintainable 👌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions