Duplicating Views

I’m trying to duplicate views from Revit but these errors are coming up.
What should I do?

1 Like

I sort of feel that by posting the Python code you might get some better responses to your questions. Even posting the DYN would be good.

You’re input is a sheet element. I’m pretty sure the API doesn’t allow sheet duplication but I could be wrong.

@yragab7 there is no method to duplicate sheets using the API as @Nick_Boyts stated. View.Duplicate() only works on Views, it fails if called on a ViewSheets instance. If you want to duplicate sheets you need to create new sheets, then transfer the parameter information from the old sheet (number, name etc) to the new sheet.

Alternatively, you can save yourself all the hassle, and use BimorphNodes DuplicateSheets Node

2 Likes

The error you’re getting in the window above is because you’re trying to iterate over a single element. For loops will iterate of a list of elements, wereas you’re only feeding it a single item.

You can just remove the for loop and do all the subsequent methods outside the loop. If you need the ability to process both lists, and single elements you could preceed the for loop with an if statment that tests the type of the variable “viewlistTwo”.

I put the views on sheets and then I duplicated the sheets with BimorphNodes. thank you very much for telling me about it.

About half year ago I used Sheet Duplicator by bimorph with success. Today this node is unfortunately not working. I tried using different releases of bimorph package with no result. What might be wrong with it?
(Revit 2017.2, Dynamo 1.3.1)

You are attempting to duplicate place-holder sheets. You can only duplicate ‘real’ sheets.

Thanks for answer!
I’m quite newbie in dynamo but if I understand the difference between real and placeholder sheets properly I have only “real” ones in my project (created by add sheet in project browser). Please correct me if I’m wrong.

I also tried to use previous release of dynamo with revit 2015 and bimorph 1.5.1 on super basic project with result like this:

image

If you sheets are ‘real’, that is, they appear in the browser and can be viewed/views can be placed, then its difficult to explain why you are seeing that error. I would suggest uninstalling all packages (you could just cut them to a different location to avoid distruption). Now, download BimorphNodes v2.0.9 and test again. If you still get the error, test on a different machine (if possible) or upload your RVT file.

Thank you very much,
There must be something wrong with my pc, on different machine everything works fine. Thanks to this node we saved couple of hours!