ExportLineweightTableIterator
是 Revit API 中的一个类,用于迭代和访问指定视图的线宽表格信息。
ExportLineweightTableIterator(View view)
view
:要访问线宽表格的视图。bool HasNext
ExportLineweightTableRow Current
bool MoveNext()
// 获取当前视图的线宽表格信息
View view = doc.ActiveView;
ExportLineweightTableIterator iterator = new ExportLineweightTableIterator(view);
while(iterator.MoveNext())
{
ExportLineweightTableRow row = iterator.Current;
Console.WriteLine("Lineweight: {0} - Thickness: {1}", row.Lineweight, row.Thickness);
}
HasNext
属性和 MoveNext()
方法需要结合使用来迭代元素。ExportLineweightTableRow
类包含 Lineweight
和 Thickness
两个属性,分别表示线宽和线条厚度。