Python Script for Placing Views on Sheets

Hi There

I have downloaded a dnamo script for creating sheets and views and placing the views on the sheets. the script includes a python script for placing the sheets on the views. By and large i have the script working as i want it too, but it seems i do have a problem with this particular python script. When i run the script when i already have sheets in the project, the new sheets do not get placed onto the new views. As oposed to whith no sheets, it works fine. It would be great if i could get it to do this.
i should add that i do not have experince with python scripts and i intend to spend some time looking at it. In the meantime any helpful pointers on this would be great, both on this, and any tips on where to learn about scripting (ive found some videos on youtube i belive will be helpful).

As always guys your help is greatly appreciated!

1 Like

I have a video on my Youtube channel for this topic in Python, run through in its entirety.

I use a zip loop instead of the range based iterator used in this example. The Python script itself looks fine, my guess is the sheet creation method prior is conflicting with either the previously created sheets or old sheets are being collected earlier in the script.

I’d also suggest only ever to run a node that places or creates sheets/viewports once per session (ideally use Dynamo player). Typically Revit holds onto these elements and tries to recreate them instead of make extra sets of elements. I believe this is due to the element bindings.

Thanks alot Gavin!!
Ill take a llok and let you know

Hi Gavin

I had look at your video (impressive!). I also joined GitHub and downloaded your crumple files. unfortunatley i cant load them into my dynamo. Could this be because im using 2019? I gather it is not an actuall package, but some sort of add on?
I guess the next thing is to try to replicate your video, though i thought i would show the rest of the dynamo script to see if you can idenfy where there might be a problem. its reading the new sheets and views from an excell file. There is another python script for creating the sheets, as shown. As far as i can see it seems to run and work fine. There are few other errors when running the script and i think these are because i want it to able to create more sheets than views (e.g. if i want to create sheets for sections, but obviously not create the sections and place them), therefore some of the view values are ‘null’. As far as i am concerned this is no proplem and it runs fine in that respect.
I may also try installing 2020.
I hope im not too much of pest. Once again mate, your help

is greatly appreciated!!

Sorry mate. Just wanted to say your help is greatly appreciated. Missed it off the end there.

Also noticed the text in the 3rd image didn’t come through.

Sorry Gavin, me again
i have installed 2020 and this is the error im getting when i try to import your dll file.dll error

To install the package simply copy it to your packages folder as a subfolder called Crumple - no libraries to install in this case. I believe it will only work in Revit 2020 as you identified, this is why I don’t put it on the package manager, don’t have time to manage older versioning and pathways to enable pre Dynamo 2.3.

There is also a node in my custom package for creating new sheets (with no view required), this maybe this might help instead. I’ve also got a video for the python contained in it;

Thanks Gavin!

1 Like

Hi Gavin. Just wanted say ive been watching your videos on youtube for this stuff and im really pleased with what ive come up with so thanks! Theres more i still might add, as i know your aware it is ever evolving. Keep up the great vids, its helped me no end :+1:

1 Like