答案 0 :(得分:2)
我使用了Revit Lookup tool并浏览了数据库,找到了一个名为StartingViewSettings
的类,其属性为ViewId
,它将获得起始视图的ElementId
。我获取视图的实际代码位于
FilteredElementCollector startingViewSettingsCollector =
new FilteredElementCollector(document);
startingViewSettingsCollector.OfClass(typeof(StartingViewSettings));
View startingView = null;
foreach(StartingViewSettings settings in startingViewSettingsCollector)
{
startingView = (View)document.GetElement(settings.ViewId);
}