How to name a bulding and get its 'Building Basic' information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, Forma community,
I am new to Forma and want to know if is there a way to name a building in a project?
I have seen an API where it can render new colors to a building. Similarly is there any way to name a building? like create a parameter and store a name or anyway is it possible? (later could able to retrieve that name via building path, API)
const geometryData = {position, color};
Forma.render.updateMesh({id: path, geometryData})
Besides, with the areaMetrics() API I am able to calculate and retrieve the areas of the building, similarly, how can I retrieve the basic building details such as 'stories', 'length', 'width', 'story height' which shown in the below picture? I know they are user inputs, but would like to retrieve them from the model for further calculations.
(Finally, my extension aims to retrieve this information into an Excel)
await Forma.areaMetrics.calculate()
response:
Area of root/bfce1a0f-0a17-4392-8660-4f7be4a87893 is {"customMetrics":[],"builtInMetrics":{"grossFloorArea":{"id":"gfa","name":"BGF","unitOfMeasurement":"SQUARE_METER","functionBreakdown":[{"functionId":"unspecified","functionName":"Unspecified","functionColor":"#FFFFFF","value":0},{"functionId":"residential","functionName":"Residential","functionColor":"#FFEAA5","value":797.9692800000001},{"functionId":"commercial","functionName":"Commercial","functionColor":"#D8DCFF","value":0},{"functionId":"688d7781-2410-4979-b617-1df8f4e2f782","functionName":"Parking","functionColor":"#FE9F90","value":0},{"functionId":"dade66f5-1376-4c56-a301-174a265c8584","functionName":"Retail","functionColor":"#FEC090","value":0}]},"siteArea":{"id":"site_area","name":"Site Area","unitOfMeasurement":"SQUARE_METER","value":0},"buildingCoverage":{"id":"bc","name":"Building Coverage","unitOfMeasurement":"SQUARE_METER","value":199.49232}},"unitStatistics":{"count":{"id":"unit_count","name":"Number of units","unitOfMeasurement":"COUNT","value":0}},"parkingStatistics":{"spots":0,"area":0}}
Any help would be appreciated!!