Hi,
I would like to add a Viewport element for details to the list of types to renumber using the ADN RoomRenumbering1.4.zip example that already supports Room, Door, Window, and Space elements
Can anyone help me update this example?
I added ViewType.DrawingSheet to IsCommandAvailable switch so it will run the sheet.
And added a new ElementType to the helper class:
// Add view support
new ElementType(
"Viewports",
BuiltInParameter.VIEWPORT_DETAIL_NUMBER,
delegate (Element elem)
{
return ( elem.Category.Id == new ElementId(BuiltInCategory.OST_Viewports) );
},
delegate (FilteredElementCollector collector)
{
collector.OfClass(typeof(Autodesk.Revit.DB.View));
collector.OfCategory(BuiltInCategory.OST_Views);
//collector.OfCategory(BuiltInCategory.OST_Viewports);
}
It seems to allow the selection of the detail viewport, but the FilteredElementCollector does not get populated with all of the other detail Viewports from the sheet for the auto-renumbering to find a existing detail using the same number.
Any help would be greatly appreciated,
Jim
Update: It's working now
Unlike the parameters for Doors or Windows, the Viewports require a seperate transaction commit/start for each when dealing with duplicates.
Jim
Does anyone have a copy of the last .NET project code for this utility? Maybe it's RoomRenumbering1.4.zip or later?
Thanks,
Mike
Unfortunately we are no longer an ADN member, so I don’t have access to those examples, however we still do have access to ADN Open and have an Autodesk Subscription, but I could not find any information on how to access any of these previous examples. May be someone can let us know if there is a way to download these.
Thanks for checking!
Yes, if anyone has an old copy floating around, please share 🙂