It is crazy how just a tiny little insignificant Revit API tool can save you tons of time. If you work with Revit on a day to day basis (or any other authoring tool) there must be some process that you use hundreds times per day. Maybe you don’t notice it at first but then at some point it starts getting on your nerves. Those are the moments that you think – man, I wish I could make it a bit simpler and remove a click or two from this task. And that is not a bad thought – in the end of the day if you manage to simplify this task to the point that it removes one or two clicks out of it then you get to click 100-200 times a day less. And voila – the task itself doesn’t appear as annoying anymore and all of the sudden the sky outside becomes bluer (hopefully you are facing the window).
I use “IDs of Selection” and “Select by ID” commands A LOT! Hundreds times a day, I have shortcuts assigned to them and everything. I am glad Revit has those commands out of the box and I always though they were great. When I don’t want to loose selection I do Select by ID, copy to clipboard and then in a few minutes I use IDs of Selection to select the same elements. Sometimes I even paste the IDs into the notepad and copy them from there later. As I said I do that many, many times a day – about a 100 times (I know that you can save selections and then pull them out but I never use it – it just doesn’t work for me). So then you start thinking, OK to copy IDs of a selection I need to:
- select elements
- run IDs of Selection shortcut
- hit Ctrl – C to copy element IDs
- hit Enter or click OK to close the IDs of Selection form
Here you go – 4 actions (times 100 = 400). A lot! Why don’t we simplify that process. Meet CopySelectionIds addin! I think it took me 10 minutes or so to write and compile a Revit add-in that has absolutely no interface and is the simplest tool on Earth (simpler than any “Hello World” sample). But who cares – it saves me 200 dumb actions per day – I will take it! Now my process of copying selection IDs to clipboard look precisely like that:
- select elements
- run CopySelectionIds shortcut
That is it – the IDs are on the clipboard! I know you might say it is a total Revit geekery, I just spent my time reading a 500-word blogpost (I hope you made it that far) on some weird tiny Revit tool that I couldn’t care less about. And I will partially agree with you, but hey, it works for me, reduces the level of frustration by the end of the day, and illustrates the power of programming, so why not? Sometimes you just need to take matters in your hands and stop waiting from one year to another for a big software company to add your “dream” tool to a package – they have a long list of stuff and that is what API is for!
You can download magic CopySelectionIds Revit addin from here