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

Which function should I use when I need to get the area of an element?

3 REPLIES 3
Reply
Message 1 of 4
stcw
396 Views, 3 Replies

Which function should I use when I need to get the area of an element?

Which function should I use when I need to get the area of an element?

 

For example, I know how to get the category or element id of an element,

just simply type elem.Category.Name, then I can get it.

 

But now i need to get the area of a floor,

which function should I use?

 

Thanks a lot!

3 REPLIES 3
Message 2 of 4
saikat
in reply to: stcw

Hi:

 

The area of a floor is stored in the parameters. Using the API, you can access the area information from a floor by extracting the specific Area parameter. YOu can do this either by using the string "Area" as the parameter name or use BuiltIn parameters and in this case you will have to use the built-in parameter called Host_Area_Computed. For more on how to work with parameters, please take a look at the SDK samples contained in the Revit installation folder.

 

Usually for any query like this, please make use of the Revit Snoop tool called Revit LookUp. This is also part of the Revit SDK. Using this, you can access all the information on any Revit element without even writing a single line of code. I am attaching a screenshot of how the LookUp tool looks like and how I got the information I have just provided using this tool.

 

Anotther great resource for API related queries in The Building Coder blog by Jeremy Tammik.

 

cheers

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting
Message 3 of 4
stcw
in reply to: stcw

 

Ok, thanks a lot. I've found the related SDK example!

Message 4 of 4
saikat
in reply to: stcw

Great. All the best for your programming endeavors with Revit API.

 

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community