Hello!
I am working on making a script that Duplicates views (elevations), applies a view template to them, and then changes their view type.
We have internal and external working and printing views. We will generally make a set of printing views first for submittal drawings, then we create our working views for placing additional things into walls. is there a way to get dynamo to do both apply our templates + change the duplicated views to a different view type?
I am using both Clockwork and Spring nodes to do this duplicate and rename!
Ok i have gotten stuck here. I have the Elevations duplicating and getting renamed just fine, then the view template gets applied. but switching the views type is not working, the error on the Views.GetbyType is giving me an error “Warning: Views.GetByType operation failed. Requested value ‘WORKING ELEVATION’ was not found.” no matter how I put that in there it give me that error with whatever string I had in there. I think im missing something but not sure what!
Views.GetByType returns views not view types. You need the ViewFamilyType element for setting the view type of your new views. You can get these via the Element Classes and All Elements of Class nodes (Element Types and All Elements of Type nodes in previous versions.)
So i would then need to filter out so I just have the view type I want (EXTERIOR ELEVATION) and attach that to the parameter name in the SetTypeParameter node?
That’s because you’re using the EXTERIOR ELEVATIONS template instead of the WORKING ELEVATION template. You need to use the correct template when duplicating the view.
Even with that changed to the WORKING ELEVATION view template it does not move the view to the working elevations area. Shouldn’t the view template not effect the view type? i also fixed it so its not “View” but is “Type” going into the set type parameter node
The only relationship between view type and view template is if the view type has a template to be applied on creation.
After the view has been created there’s no tie between the two. So now you need to look at your Browser Organization and see what’s driving your view groups and whether your template is controlling that property.
Woohoo That does it! I also needed to add the element.type node into the element.setparamaterbyname node! Thank you so much for your help! Now I just need to make some of the code blocks inputs and should be good!!
That’s because you’re still getting the Views of that Type instead of the ViewFamilyTypes. If you use Element Classes like I originally mentioned you won’t have to do that and you won’t have to reply on those views already existing.