I used the Revit Lookup tool and browsed through the database to find a class called StartingViewSettings
with the property ViewId
that will get me the ElementId
of the starting view. My actual code for getting the view is below
FilteredElementCollector startingViewSettingsCollector =
new FilteredElementCollector(document);
startingViewSettingsCollector.OfClass(typeof(StartingViewSettings));
View startingView = null;
foreach(StartingViewSettings settings in startingViewSettingsCollector)
{
startingView = (View)document.GetElement(settings.ViewId);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.