Hi there,
I trying to import some data from a Excel file in order to modify the structural foundation dimensions when mark values matches with the results of the python script.
I also leave the script in case you see an error:
Importa los módulos necesarios
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
Definir la función que busca el valor de la entrada 3
def buscar_valor(valores_1, valores_2, valores_3):
salida = 0
for i, v1 in enumerate(valores_1):
for j, v2 in enumerate(valores_2):
if set(zip(v1, v2)) == set(zip(valores_1[j], valores_2[j])):
nivel = sorted(range(len(valores_2[j])), key=lambda k: valores_2[j][k])
salida = [valores_3[i][nivel[k]] for k in nivel]
break
if salida != 0:
break
return salida
Obtener las entradas del nodo
valores_1 = IN[0]
valores_2 = IN[1]
valores_3 = IN[2]
Ejecutar la función para buscar el valor correspondiente
salida = buscar_valor(valores_1, valores_2, valores_3)
Enviar la salida del nodo
OUT = salida
Any help would be really appreciated. Thanks.