Use ID to select objects in Revit

I am trying to find a way to select objects in Revit from ID’s that have been exported from error reports and interfence checks. I have sucessfully imported the ID’s from excel and have a list that is useable but I am missing the means to use the ID to select the related object in Revit so the objects can be highlighed in views. Is there a node that I am missing that can do this?

If you get and install Clockworks and Steamnodes packages you should be able to get the two nodes from the below image and connect them up, then you are good to go

 

Elements in view

Another alternative are the following nodes from the archi-lab.net package. The “Id to Element” node can handle anything you throw at it, be it string, integer, elementId or a GUID :

1 Like

I updated my Clockwork and now have the nodes I was missing before, but when I put everything together I get a “null” in the Select Elements in View node. Also the ID to element returns a “null”. Do I need to modify my input ID’s from excel in a special way so thay are read by these nodes?

If your Ids are coming from Excel they are strings. I am not sure if Clockwork will be able to handle an Id that is a string and not an integer. I might be wrong on that. Try what Dimitar has suggested - archi-lab.net package and Id to Element node. I am 100% sure that it can handle strings as well as integers.

There might also be another reason this doesnt work. Is your model workshared? If it is, ids might no longer be valid because they change in a workshared model to ids that were last used by the user who last owned the element and synched it to central model. Google Unique Id and go to Jeremy Tammik’s blog for a much more detailed explanation of how element ids can change in life of a Revit model.

Hi David

I had the same problem recently (I could not get the Clockwork node to work)

I guessed that it was to do with strings vs numbers, and tried various things both in the data format in Excel and also in Dynamo, without success

I ended up using the Archi-Lab node, and using a CSV import, rather than Excel.

It seemed to bring the in the object data in the correct format.

(Mine is fairly similar to yours- rather than isolating objects in a view, it creates a selection set of them)

Andrew

 

20151224 Dynamo selection set from elementids

Hi all,

I am trying to do the exact same thing like you guys and girls with a clash export from revit and using the ID’s in a excel document and then pushing that back into Revit to isolate them so I can make my required adjustments. However I am having issues and this keeps apearing on my ID to elements node no mater how much I change the CSV file ValueError: Invalid Integer literal. I have attached my original CSV file and the screenshot of my current node setup. The original CSV file contains element ID’s for my Central RVT and my Linked modeled RVT. Why can’t Revit just have a built in filter/isolate selection option when you copy monitoring out clash reports to a html document and then trying to use the elemnt ID’s from that clash report :(.

Kind regards,

Jean-Luc

elemnt by ID final filter

 

1 Like

Jean-Luc,

your basic mistake is that you’re feeding wrong data structure to Id to Element node (the whole .csv file instead of the list of Ids only)… You need to extract only Ids from your Excel file - try to put code block [List.GetItemAtIndex(j<1>,1);] between CSV.ReadFromFile & Id to Element nodes… and personally I think it’s better to change nodes Document.Current - Document.ActiveView to Document.ActiveViewFromCurrentDocument from Clockwork package… cheers

Further to Anton’s post, if you’re trying to extract elements that reside in a linked document, you need to provide the linked document element and not the host one. Also you can not isolate linked elements in Revit unfortunately.

1 Like