Forma Developer Forum
Welcome to Autodesk Forma Developer Forum. Share your knowledge, ask questions, and explore popular Forma API topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to name a bulding and get its 'Building Basic' information

Message 1 of 2
97 Views, 1 Reply

How to name a bulding and get its 'Building Basic' information

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()

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}}


2024-02-01 10_39_35-Design - Demo project_ enrich project.png


Any help would be appreciated!!

Tags (2)
Labels (1)
Message 2 of 2

Hi Kuladeep. 

Exciting to see you play with our APIs. 

The functionality that you are looking for is not there yet. But I am working on it as we speak. The effort is to stabilize and expose these through our open APIs. For now you can only read what is stable, and you have identified the area metrics apis which are the only ones that give you any insights for the time being. 


I can't promise any timeline on when this will reach you, but I will update this post when we've managed to release the first version of these APIs. And I would very much appreciate your feedback once they do land 🙂 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report