So, I’m trying to convert a schedule to excel but in a specific way.
I have 2 types of terraces, some apartments have 2 terraces and have 1 of each type which means the schedule looks like this:
unit 4D0.2 has 2 types of terraces and so has 2 different/separate area values.
When I convert this tho excel I will have something like the ABC columns but my goal is to have something like columns EFG. The goal is that I only want 1 line for unit 4D0.2.
Afterwards I want to be able to replace the yes/no with the area values of the corresponding units like columns IJK
@khuzaimah.ElecEng I’m actually almost there, I combined the lists so that it can fill in ‘x’ if it doesn’t have the type, but I don’t really know how to reduce the part in red to only the 2 values…
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
type1=IN[0]
type2=IN[1]
list1=[]
for ty1,ty2 in zip(type1,type2):
if len(ty1)>1:
for t1,t2 in zip(ty1,ty2):
if t1=="x":
ty1.remove(t1)
if t2=="x":
ty2.remove(t2)
list1.append(ty1+ty2)
#Assign your output to the OUT variable.
OUT = list1