Hello friend again. I confused by Sum two sample list. I want to only corresponding member be added to each other. You can see the pic. But i cant do that. Do you have solution for that?
you will need some kind of zip function
lis1 = IN[0]
lis2 = IN[1]
lis3 = []
for sublist1, sublist2 in zip(lis1, lis2):
for i, val2 in enumerate(sublist2):
lis3.append([val2 + val1 for val1 in sublist1])
OUT= lis3
thats great and work , but I want to use that for determine point distance, can you help me how I can do that by python script?
Hi,
You add
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
Geometry.DistanceTo(val1,val2)
Cordially
Christian.stan
thanx alot Mr. @christian.stan that is true ,
thank you for the compliment, all the credit goes to Mr. Andreas, a natural hard worker (also a beer on the terrace from time to time, the good Dynamo spirit) the training provided by Mr. Erick Frits seems to have made him progress a lot Also no subliminal message
Sincerely
christian.stan
thats true Erik Fritz is my mentor. it boosted my understanding how code works in the field.
I see this was already solved here. nevertheless it was a nice little problem for me to work on. while Iām here I wonder if anyone has some sort of workbook to practice python on dynamo and revit problems like this. I have started my python journey and it would be great to work on some practice problems. Any guides.
Great resources! Thank you!