Get Material Quantities

Get Material Quantities

mohd.fadel
Enthusiast Enthusiast
1,104 Views
2 Replies
Message 1 of 3

Get Material Quantities

mohd.fadel
Enthusiast
Enthusiast

Hello,

 

I don't know what i'm doing wrong, but i'm trying to create a material take off using the api. I'm filtering elements by Category.HasMaterialQuantities then using

 

el.GetMaterialVolume(material.Id) and el.GetMaterialArea(material.Id, false)

 

to get the volume and area respectively. However, the figures i'm getting are much greater than the ones in Revit. Can anyone please help. I tried looking everywhere for a similar case but couldn't find anything on the forums.

 

Regards,

 

Mohamad.

0 Likes
Accepted solutions (1)
1,105 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

The figures are probably not greater than those in Revit.

 

They are probably the values stored in the Revit database.

 

Please be aware that the values you see in the Revit user interface are not the internal database values, since you have defined the display units that you wish to see in the user interface, which normally differ from the internal database units. 

 

You need to figure out the appropriate conversion factor, which is easy to do:

 

https://thebuildingcoder.typepad.com/blog/units/

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

mohd.fadel
Enthusiast
Enthusiast

Hello Jeremy,

 

Thank you for your help. I'll have a look at it.

 

Regards,

 

Mohamad.

0 Likes