Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Re: Get Length units of a Revit file

$
0
0

Hi @george1985 

 

    You need to use the format option to get the particular Unit like Length. Kindly check the below code snippet for additional reference.

 

Reference Code Snippet

///The Sample will get Length Unit from the projec and get the unit name and display to the user. Units units = doc.GetUnits(); FormatOptions option = units.GetFormatOptions(SpecTypeId.Length); ForgeTypeId unitTypeIs = option.GetUnitTypeId(); //Length Unit string unitName = LabelUtils.GetLabelForUnit(unitTypeIs); TaskDialog.Show("Information", unitName);

 

Hope this will helps 🙂

 


Viewing all articles
Browse latest Browse all 67020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>