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 suppose I should check and verify. I came up with that conclusion because the graph works fine when I use it to copy drafting views within the same project.
EDIT: Just checked with Object.Type node. They are indeed views.
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…
Sure, but it requires some basic notions, unless you want someone to do that for you, which is not the point of this forum (if I may remind that once in a while)
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. CopyElements Method (Document, ICollection(ElementId), Document, Transform, CopyPasteOptions)
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”)
Thanks!! I was totally not expecting this. Can’t wait to try it out. Your graph is much simpler and cleaner than what I was trying too…
Although @Nick_Boyts definitely has piqued my interest a bit in Python and will probably be messing around with that now, especially since @john_pierson helped me with this issue.
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!
This has come up a few times before, but I do not think anyone has found a solution yet. The part with sections and elevations is, they require the marker to come through.
Additionally, the copy elements between files workflows are fairly unstable.
You might be able to do the following:
Get the views from link document
Obtain the plan symbol for the views. (Elevation marker, section marker)
Get the location of the plan symbol
Create a new plan symbol in your host document.
I don’t have anything showing this at this time though. You might want to give it a try and start a new topic.
Also, reference this post for some additonal ideas.