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: 

Find all sheets with a particular keynote

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
2169 Views, 5 Replies

Find all sheets with a particular keynote

I have a large project (hundreds of sheets) and I've changed the text of a keynote for an addendum.  Now I must go through and bubble that keynote text in the legends on the sheets where it occurs.  Is there a way to find all of these sheets (either with macro or through the UI itself) so that I can be sure that I have found them all?

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Oh . . . And I am on Revit 2014
Message 3 of 6
Anonymous
in reply to: Anonymous

This is definitely possible.

 

The way I would approach this is to:

1. Find all keynotes in the project

FilteredElementCollector tagColl =
                    new FilteredElementCollector(doc).OfClass(typeof(IndependentTag))
                        .OfCategory(BuiltInCategory.OST_KeynoteTags);

 

2. Search through those keynotes to find the ones matching the text you want

 

List<IndependentTag> keynotesMatchingText = (from IndependentTag i in tagColl
                    where (i.get_Parameter(BuiltInParameter.KEYNOTE_TEXT).AsString()
                           == "MyText")
                    select i).ToList();

 

3. Get the views that own these keynotes

List<ElementId> viewIdsContainingKeynotes = (from keynote in keynotesMatchingText select keynote.OwnerViewId).ToList();

 

Note that this will only get you the views containing the keynotes, and not the sheets that contain the view.  

 

With the keynotes matching your text and the views that contain them known, you should be able to come up with some way to verify that you haven't missed any.

Message 4 of 6
Anonymous
in reply to: Anonymous

Thank you for the very clear examples . . . very usefull.

Message 5 of 6
priscillia_champagne
in reply to: Anonymous

I found another way with the add-in Revit LookUp.. since I don't know how to write a macro. 

Snoop current selection 🙂 

Tags (1)
Message 6 of 6
CADiva
in reply to: Anonymous

Revolution Design's Keynote Manager allows you to find all references of a particular keynote.

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