The Autodesk.Revit.DB.ExportFontTableIterator
class is part of the Revit API and provides functionality for iterating through a font table. This class is typically used when exporting Revit documents to other file formats such as AutoCAD or PDF, where font information needs to be preserved.
Property | Type | Description |
---|---|---|
Current |
Autodesk.Revit.DB.Element |
Gets the current font table element. |
IsDone |
bool |
Gets a value indicating whether the iterator has finished iterating through the font table. |
Method | Return Type | Description |
---|---|---|
Dispose() |
Frees the resources used by the iterator. | |
MoveNext() |
bool |
Advances the iterator to the next element in the font table. |
ExportFontTableIterator fontIterator = new ExportFontTableIterator(doc);
while (!fontIterator.IsDone)
{
Element currentElement = fontIterator.Current;
// Do something with the font element
fontIterator.MoveNext();
}
In this example, we create a new instance of the ExportFontTableIterator
class and iterate through the font table using a while
loop. We access the current element using the Current
property and advance to the next element using the MoveNext()
method.
The Autodesk.Revit.DB.ExportFontTableIterator
class is a useful tool for accessing font table information in Revit documents. It provides a straightforward way to iterate through all fonts used in the document and preserve this information when exporting to other file formats.