Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am wanting to delete all the Elevation Views from a model. I am running into this exception:
Autodesk.Revit.Proxy.Exception.InvalidObjectExceptionProxy
I assume I need to load a Reference for 'Proxy' but I am not sure, nor can I find where to load from, it i not with the other .dll files.
I am trying to figure out which view or what is throw the exception or why it is happening
Thanks for any assistance... 🙂
t.Start();
List<View> views = myFunctions.CollectedViews(doc);
List<ViewType> viewTypes = myFunctions.ReturnListOfViewTypes(doc);
foreach (View v in views.Distinct())
{
if (!v.IsTemplate)
{
foreach (ViewType vt in viewTypes)
{
if(vt == v.ViewType)
{
try
{
doc.Delete(v.Id);
}
catch (Autodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy)//<-- No Good
{
TD(v.Name);// TaskDialog.Show shortcut
}
}
}
}
}
t.Commit();
Solved! Go to Solution.