Copy the view type and its template

Hi everyone,
I want to transfer view type and its template for the new created view.

I use this script, that works well to transfer the view type from one project to another, but it doesn’t transfer all the parameters of the view type. I don’t have the template which I set up in the view type to apply to the created new views.

I want to keep this template after copy.

Someone have any ideals?

Thank you

Yuan

Only way that I can think of is by using the Transfer Project Standards method. However, you will be copying all view templates and not just the one. Take a look at the post below and see if it can provide some guidance.

Transfer Project Standards is not available in the API (only as a postable command) and I believe you’re limited on what elements you can copy between documents. In many cases (like this one) you are required to “recreate” the element rather than copying or transferring it. Of course Dynamo can help automate this but you need to rethink your process around building a new element based on an existing set of properties.

Yeah, I didn’t see the option in the API either, but then I saw that post and thought I had missed something. Thanks!

Call me crazy, but isn’t a ViewTemplate a type of view? Try transferring the template, then the view and see if it picks up automatically or if you can apply it after the fact that way.

1 Like

It’ll even work if you transfer them at the same time. The template just needs to exist on importing the view.

1 Like

Thank you Jacob. it works your ideal.