Insert From File - Views

Hello,
I’m trying to use Dynamo to insert views from file, but I can’t find a way to do it. I know it is possible through the API but I’m not very familiar with it.
Any thoughts?

Hi @gbardales

Are you looking to create views from excel?

Hi Kulkul,
I could have explain my self better.
What I’m trying to do is bring some sheets and drafting view from other .rvt files but using Dynamo.

Thank you,

@gbardales Refer this link Set a starting view to multiple background opened files will get you started.

1 Like

@gbardales, here is the workflow you need. It might act weird with view templates though, (not too sure). You need to download Rhythm to get these custom nodes.

And here it is in action

And here is the dynamo graph. copyViewsFromDocument.dyn (8.6 KB)

8 Likes

Hi John,

It works great. I can transfer all the views that I need, but I lost all the content of the views.
Is there a way to keep the content that the view has?

Thank you,

Darn, well those nodes were made primarily for copying types. I can take a look at this when I have some spare time. (Unless someone else does) Here is some information regarding this.

FWIW, it seems a little involved and may be more appropriate for a zero touch node.

1 Like

ok. I’ll take a look and see what I can find.
If you don’t mind please do take a look, when ever you have some time.

Thank you,

1 Like

@gbardales Discussed here: ( I will send the graph once I update the nodes to Rhythm)

3 Likes

That’s amassing. I really need to get more into Python.
Question, Would this also work on bringing sheets with views on it?

Thank you,

@gbardales Unfortunately it does not.

also, DYN for the copy views/ elements in view http://sixtysecondrevit.com/dyn/copyViewsFromDocument.dyn

1 Like

@john_pierson
Hi john, just wondering if you have a chance on posting or updating rhythm package as you describe on the above link? Thanks a lot for all your efforts.

It appears to be possible. I just have not built the workflow yet. I am finding that time is my biggest enemy lately. :unamused:

Is there anyone who knows or can replicate the above. Can someone share please if you have done this. This was about copying Drafting views and elements from another revit document.

Hi John, I’ve been trying to use your code to see if I can make it do something I’m trying to achieve. When I run the code versin with the copy views and elements, I have been getting Python Script errors, so I tried running the earlier version that simply copied the views. This didn’t seem to do anything when I ran it but I didn’t see any errors, so I added a lot of watch nodes to see what was being returned at each stage. The watch at Filepath returned the filename and path, and the watch at Element Types returned Autodesk.Revit.DB.ViewDrafting but all of the other nodes returned null. I’m not sure if I’m doing something wrong here? I’ve tried running it with just the target file open and with the source and target files open, but still getting all the nulls. Do you have any ideas?
What I in the end was trying to see if I could achieve was to be able to copy Legends and text only contents between projects. Do you think this is achievable by me modifying this script?

Hi @blairmack, I will have to take a look at this. I have actually been working through and converting a bunch of Rhythm nodes to C# Zerotouch nodes and I can add this to the list.

The unfortunate thing is when working with other Documents in Dynamo it gets a bit difficult and is unpredictable. I will let you know when I can take a look at this.

-John

Hi @john_pierson, I downloaded your graph from above (posted Jan 26) to try copying view/elements in a view. However, I get an error message when I run the graph. I was wondering if there was an update on this graph or if I am missing something.

If anyone could help point in the right direction it would be greatly appreciated.

Do you have any view templates for drafting views in your file?

No, I do not

Ok, well this workflow is pretty messy and I recently revised the copy node to only work with links… I will let you know if I can revise.