Element ids from Dynamo (i.e. watch node) to be used manually in "select by element id" of Revit

seems i cannot directly copy from element ids of Dynamo watch node output, did i miss something simple? i just need to do it on the fly, paste to Revit’s select element by id for quick and dirty task

Springnodes package has a useful node, SelectInRevit if you want to go directly to having the elements selected in Revit (as opposed to using the ids for some other task)

image

3 Likes

thanks Thomas, but some element ids are in linked model, i need to paste those element ids into linked model which is obviously in another Revit session, got to have simple way to “copy” those ids, isn’t it?

Once you have ids, you can concatenate into a single string with ; as the separator and then use Clockwork Clipboard.SendTo. Then you can paste into Select by Id in the linked model

1 Like

got it, thanks Thomas!
just wonder why cannot we directly copy from node’s output by right mouse click…

1 Like

I used to want something like this, but quickly found that by using an intermediate file I was actually able to do more faster. Writing to the intermediary for all links at the same time, allowed me to then run the same graph repeatedly on all links, parsing the excel file to get the info from the sheet with the name that matches the current Revit document and selecting those in the model (and doing stuff to the elements at the same time). No copy/paste = no concern for manual errors.

I don’t have any answers to that, but some questions to understand what you’d like to see.

How would you copy a solid, polycurve, or any other data type which doesn’t readily get read by other programs? How would you deal with a list or dictionary?

The data.Remember node in refinery might also help out here, as you could unwire the inputs after saving the graph and moving the data into the dyn. Something else to consider.

i just noticed that Clipboard.SendTo doesn’t recognize new line string (if i use code block “\n” as separator), perhaps it’s window OS issue?
my idea is to check each element on the fly via paste to “Select by ID”

  1. thought about exporting to Excel, but still too tedious (select/highlight each in model)
  2. schedule is good way via “Highlight in Model” but not easy to “create” schedule w/ those elements (even they’re in same category), well, it’s more about filter in schedule indeed

That’s a Revit thing in select by ID I believe. Try using a ; as your separator character.

thanks Jacob, ; works great but it is useful only if you want to select multiple elements at once in Revit, but in my case, i need to select each element in Revit, so obviously if i can paste out to notepad first w/ each element id in one line then i can a bit easy to copy and paste to “Select by ID”

Ah. Selecting all and adding to a new selection set, or marking a parameter (day review set == true) might make an easy way to filter your items in the arched ups view you mentioned. At that point all IDs to excel and import excel to select becomes somewhat easier as it works across models at once (this was almost exactly my old workflow).

I tried to see if I could get it to work with newlines but I couldn’t. Notepad used not to support \n and would only recognise \r\n but since Windows 10 it recognises \n. Neither worked when I added to the string.

Is using Excel more tedious than Notepad? If you write each id as a new row, when it opens you can then copy and paste as easily as if from Notepad.

Depending on how many elements, I would suggest writing out the ids to Excel and have an graph that you run on your linked models that imports the Excel and then uses, for example, archi-lab Select.ByElementId to get the elements programmatically

1 Like

thanks Jacob and Thomas for your insight, looks like Excel is the way to go

1 Like