Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way to set the "Site" view active via the API (see attachment)
Using some other view-related posts, this is what I've come up with so far; I can iterate and find the View but how do I set it "active"?
If doc.ActiveView.Name <> "Site" Then Using tr As New Transaction(doc, "SetSiteView") tr.Start() For Each v As View In New FilteredElementCollector(doc).OfClass(GetType(View)) If v.Name = "Site" Then v.Active = True 'SOMETHING LIKE THIS? Exit For End If Next End Using End If
Solved! Go to Solution.