Creating window sections/ elevations /views!

Hello,

I’ve posted about this before, a previous employee wrote a script for automated window elevations which works but is very bloated (earlier dynamo times).

I would like to understand, and simplify it.

Here is a copy of this script. CreateAllWindowElevations2019.dyn (141.3 KB)
Here is a copy of a sample project: wetransfer link

In my simplification attempts, I’ve played with @Dieter_Vermeulen’s script and by simply copying it these are the error message I get:
Capture
The element geometry node says - Warning: Element.Geometry operation failed. Value cannot be null. Parameter name: source

I often get this _array error message and don’t understand it. If someone could explain it that would be great.

I’ve also tried this script and am struggling to get my head around it

So, in conclusion if anyone could forward me any links or, help me break through the brick wall of my understanding. That would be awesome.