Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update renumbering ADN example

4 REPLIES 4
Reply
Message 1 of 5
Todd_Jacobs
632 Views, 4 Replies

Update renumbering ADN example

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

4 REPLIES 4
Message 2 of 5
Todd_Jacobs
in reply to: Todd_Jacobs

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

Message 3 of 5
odoshi
in reply to: Todd_Jacobs

Does anyone have a copy of the last .NET project code for this utility? Maybe it's RoomRenumbering1.4.zip or later?

 

Thanks,

Mike

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
Message 4 of 5
Todd_Jacobs
in reply to: odoshi

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.

Message 5 of 5
odoshi
in reply to: Todd_Jacobs

Thanks for checking!

 

Yes, if anyone has an old copy floating around, please share 🙂

 

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community