Converting a python Script to be useable in Dynamo/Creating dependent room views

I am working on a script that will take room elements and create a dependent view with a crop box focused on that room. I have a script now that will take room elements and create separate floor plan views with a crop box around it. The problems are 1.) The view won’t update because it isn’t dependent, and 2.) The cropbox will not follow the path of rooms exactly. The crop box will only form square/rectangular shapes, but will not follow the path of non-rectangular rooms. I am currently using the python code generously provided by Konrad. I found this python code online on, and this script is intended to create dependent room views based on whichever rooms you select in Revit beforehand, and it will create crop boxes that are nonrectangular, but I am hoping someone can convert this code so that I can use it in Dynamo with inputs. If someone has any solutions with my current graph, that would work too. Thanks. Current Graph:

Current Code I am Using (Named “Room View Node”):

have a look at this:

Hey Konrad, This is the blog where I found the code that I linked. I found this and knew it would work, the problem is I have no clue how to get this code to work in a dynamo python node. From what I tried, it isn’t as easy as plugging it in and running it.

@Eric_Richter did anything come from this in the end?