Randomise horizontal grids on curtain wall - Getting height value

Following this Topic Randomise grids on curtain wall from list of spacing values from Mr. Δrsham (arshamm) and Ms. Amy (awilliams), I’ve tried to created one but now I’m getting a problem about getting height value that I can not create horizontal gridlines. I’d appreciate any help.

[Python Script from Ms. Amy]

import clr
from Autodesk.DesignScript.Geometry import *

import sys
#The inputs to this node will be stored as a list in the IN variables.
pyt_path = r’C:\Program Files (x86)\IronPython 2.7\Lib’
import random

#The inputs to this node will be stored as a list in the IN variables.
vals = IN[0]
length = IN[1]
refresh = IN[2]

def addVals(nums,total):
sum = 0
vals =
i = 0
while sum<=total:
i = random.choice(nums)
return vals

OUT = addVals(vals,length)

Ah yes it is failing because you need to modify the code block like I described here:


This is the part you want to change - rather than applying curtain grids at points across the location line, you need to construct a line on the curtain wall in the Z direction. Try changing the code block to this:

p1 = curtWall.GetLocation().StartPoint;
p2 = p1.Translate(0,0, height);
line = Line.ByStartPointEndPoint(p1,p2);
points = line.PointAtParameter(params);

Perfect! Thanks a lot!

Did you ever get this to work? @NguyenTriTrung @awilliams