We are in the process of rolling out a new office template and I’m trying to copy certain elements from the new template into an existing project. For the most part I can Transfer Project Standards but this doesn’t copy View Types which is one of the things I’d like to transfer.
I’ve figured out how to retrieve all the View Types from the source model and copy them into another model with the below graph.
What it doesn’t do is copy the view template which is associated to the View Type (solving this probably leads to filters not copying but one thing at a time!) but I can’t figure this out and hope someone might know how to achieve this?
Hi
have you tried to get the view template with View.ViewTemplate (Clockwork) or Views.ViewTemplate (archilab), and then apply it to the new views with View.ApplyViewTemplate (SteamNodes) and Views.SetViewTemplate (Archilab)?
I have not, mainly because I don’t fully understand how to setup graphs in Dynamo to do what I want. I surprised myself by making the above based on a topic here that I found.
With regards to the nodes you’re suggesting, how would I apply a view template to a View Type? I should probably have added the below image which shows the View Type and Template assigned to it, both of which I’m trying to copy together.
Why would you want to do something with Dynamo that is one time only?
Just open two files in the same Revit session, select some views and copy/paste them in the other project.
If I can get it to work I’ll be running it on a number of models which don’t have the new View Types and Templates.
The only way I know of applying all the new View Types is by creating a callouts for each one with the correct template assigned, which I’m trying to avoid if at all possible.
The ViewFamilyTypes have a parameter called “View Template applied to new views”, the workflow is about getting this value and setting it to the new created types.
To do that we need first to filter the templates in the source document, pick the corresponding one, and applying to the new created elements.
I used to use this macro, the idea is to copy the view template to the clipboard and then paste into another view in another model. Sounds weird but works.
I copy/paste the parameter name from your post as well as typing it out and getting a colleague to look it over. I’m probably missing something or maybe using an older package? Just in case it matters, the source file only has a couple of views in it, not one for each view type.
I tried changing to the Get Type Parameter node (ootb I think) which doesn’t give a warning. I do get this for the ListAllIndicesOff node: Warning: List.AllIndicesOf operation failed
—edit—
You have lacing set to auto, I don’t have that option (version 1.3.3)
The last 3 nodes are orange because instead of “false” you have to write simply false, or use a boolean input (look at my graph).
Can you post what it’s the error in node Element.GetParameterByValue?
It might be related to Dynamo versions.
Can you give a try connecting Element.Parameters to Collectors.ElementsOfTypeInDocument, to see what you get, and maybe post it?
Yes, but don’t connect it to Element.GetParameterValue.
Element.Parameters is just a monitor to look inside the element and see which parameters are available.
You should expand the preview, so we can see if View Template applied to new views is inside.
I tried it with your file, same results/error. I have the same package and Dynamo version but I’m using Revit 2017, I get the same result with Revit 2018.
I appreciate your help and time spent in trying to get to the bottom of this.