Methods
Space
getSpaces
returns the list of spaces by default returns spaces for the active building if applicable otherwise returns all spaces example usage const options = { all true, }; const spaces = viewer2d getspaces(options); parameters options options for getting spaces type required object no properties name type required description all boolean no get spaces from all models buildingid string no get spaces for a specific building storeyid string no get spaces for a specific storey visible boolean no don't include spaces that are not visible return value list of spaces type array\[space] space name type description boundingbox object bounding box of the space buildingid string id of the building space belongs to guid string guid of the space id string id of the space longname string long name of the space name string short name of the space modelid string id of the model space belongs to storey string name of the storey space belongs to storeyid string id of the storey space belongs to boundingbox name type description height number height of the bounding box width number width of the bounding box x number x coordinate of the bounding box y number y coordinate of the bounding box example \[ { boundingbox { height 10, width 5, x 0, y 0, }, buildingid "0 rp9o7e4sjl", guid "3gw3qktyubthlitx3qsry2", id "2772343120", longname "central waiting", modelid "0 vo5kl3grto", name "1e16", storey "first floor", storeyid "2776467125", }, ];