I am trying to create a graph that will read a list of View Names from an Excel file, select those Views from a specified Standard Details file, and copy all elements within the selected Standard Detail views into the new Revit file in the correct views. I am hoping to essentially provide the same function as Revit’s “Insert from File”.
There is one major problem that I am running into. The “Select.ByCategoryAndView” node that I am using appears to not recognize the views from the specified Standard Details file and is giving me a warning. Is there any workaround for this that anyone can think of off the top of their head? Any suggestions or criticisms are welcome!
I have attached a screenshot of my graph. (Sorry it’s so messy). Thanks for any help!
I would also try with Element.GetFromLinkedFile (SteamNodes) or Collector.LinkedInstanceElements (SpringNodes) instead of Select.ByCategoryAndView since this last one is probably looking at views in the current document only…
Ah, that’s probably your problem. Even though you’re using views from the other project the SelectByCategoryAndView node is selecting elements in your active document. The Rhythm node that @Yna_Db mentioned might work or you might have to try Python.
However I have already tried the Document.CopyElementsFromDocument node from Rhythm. I had run into problems and asked @john_pierson about it a couple months ago. He replied and said that he had revised that node to only work with links, but he would try to rework it if he had the time. Unfortunately it seems he’s been busy, so I have been trying to find my own way.
Anything else you guys could think of off the top of your head? At this point, I’m wondering if I should try linking in my Standard Details files…
There isn’t a lot to the copy/paste method but it might be a little tricky figuring out what you need if you’re new to python. This is the API method you’ll need. http://www.revitapidocs.com/2018/b22df8f6-3fa3-e177-ffa5-ba6c639fb3dc.htm
If you can look at any of the other copy/paste nodes that use python I’m sure that can get you 90% of the way there. The only difference here is that you’ll have to define two documents instead of one.
I highly recommend it. It can make menial little tasks so much easier even if you know just a tiny bit. And once you get the hang of it it’s pretty easy to expand and do some pretty cool things with.
This whole process is a bit of a pain because you have to get views, then elements, then close the old doc. I have something, let me upload for you. (You’ll have to implement your filtering by names though.)
Also, apologies everyone. I have been absolutely swamped with getting ready for Autodesk University and trying to make sure I have some Rhythm updates out before. (Might add a single node for “Copy views from file”)
Your script is great for drafting views. Thanks for that.
I am currently finding a solution on how to import views, sections and elevations (not drafting views) from a Revit linked file to a main Revit project.
Scenario is I got two Revit files (Link.rvt is linked to Main.rvt). Link.rvt has all the views created and I want to copy it to Main.rvt. I got a script initially created using the Rhythm package. I was able to extract the views from Link.rvt but I haven’t been successful in pasting or creating the views to Main.rvt. Have you come across such scenario before? Thanks!