Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I try to change view to 3D.
RevitDB.View3D view3D = new RevitDB.FilteredElementCollector(m_uiApp.ActiveUIDocument.Document).OfClass(typeof(RevitDB.View3D)).Cast<RevitDB.View3D>()
.Where(x => !x.IsTemplate).FirstOrDefault();
m_uiApp.ActiveUIDocument.ActiveView = view3D;
//m_uiApp.ActiveUIDocument.RequestViewChange(view3D);
m_uiApp.ActiveUIDocument.RefreshActiveView();
View is changed after ExternalEvent is end.
I want to show progress using RefreshActiveView in 3D.
(Change view to 3D -> Do something(Transaction))
But, the code change view after all code is end.
(Run change view code -> Do something(Transaction) -> Change view to 3D)
How can I change the view directly?
Solved! Go to Solution.