Answers for "UnitTypeId revit api"

0

UnitTypeId revit api

public Result TObj64a(Autodesk.Revit.UI.ExternalCommandData commandData, 
            ref string message, Autodesk.Revit.DB.ElementSet elements)
        {

            Document Doc = commandData.Application.ActiveUIDocument.Document;
            ForgeTypeId UTid = Doc.GetUnits().GetFormatOptions(SpecTypeId.Length).GetUnitTypeId();

            ForgeTypeId[] Choices = new ForgeTypeId[] {   UnitTypeId.Meters, UnitTypeId.Centimeters, UnitTypeId.Millimeters, UnitTypeId.Feet};

            int x = Array.IndexOf(Choices, UTid);
            TaskDialog.Show("Units", x.ToString());

            return Result.Succeeded;
        }
Posted by: Guest on July-29-2021

Browse Popular Code Answers by Language