Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I have cross searched the internet, this forum, Revit 2023 SDK and the thebuildingcoder blog for a rather simple problem- how to display length symbol for documents units. How to get ForgeTypeID for active documents unit symbol?
Units docUnits = doc.GetUnits();
ForgeTypeId spec = SpecTypeId.Length;
FormatOptions myFormat = docUnits.GetFormatOptions(spec);
ForgeTypeId mySymbol = myFormat.GetSymbolTypeId();
string unitSymbol = LabelUtils.GetLabelForSymbol(mySymbol);
//Autodesk.Revit.Exceptions.ArgumentException: 'Symbol must have a definition.
Parameter name: symbolTypeId'
Solved! Go to Solution.