Placing multiple Window Types in a wall

Hi All,

I am trying to create a script to place a window types of a window family in a wall to elevate.
I got it mostly ok, apart from the location where the Windows should be placed in the wall. For a reason in throws an error as per attached, and return values of Null for all list points.

Anyone able to tell me what I have got wrong please?
Thanks for your help in advance.


Regards,
Bassem

Which build of Dynamo do you use?

image