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.
import clr
clr.AddReference(‘ProtoGeometry’)
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’
sys.path.append(pyt_path)
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)
vals.append(i)
sum+=i
return vals
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: