I am working on a task where I need to accept a template file (.rte) as input and save the resultant revit file in 3d view.
I understand that to activate 3d view, we need UIDocument
which is not available when we work in DesignAutomation API.
In an addin project in the past I had implemented it in the following way:
FilteredElementCollector collector = new FilteredElementCollector(doc).OfClass(typeof(View3D));
foreach (View3D v in collector)
{
if (!v.IsTemplate)
{
uiApp.ActiveUIDocument.ActiveView = v;
}
}
So is there any other way to do this in DesignAutomation API.