我尝试使用iron python为Revit创建一个脚本,它接受多个数据输入,即IN [0],创建数据并将其作为单独的图像保存在目录中。当输入文本时我怎么能将它变成函数?
这是我到目前为止。我使用一个输入作为代码块
import clr
import sys
import System
from System import Array
from System.Collections.Generic import *
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
import os
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
FileName = IN[0]
FileDirectory = IN[1]
Image = IN[2]
completeName = os.path.join(FileDirectory,FileName+".png")
file = open(completeName,"w")
tofile = Image
file.write(tofile)
file.close()
out=0
截图: