最近在b站学习Dynamo之python编程课程,着实发现了python的强大之处(啰嗦了),在学习过滤器时,发现了一个特疑惑的问题,分享一下。直接上代码:
#1、启用python支持和加载DesibnScript库
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#2、引入c#中原生的list(python中定义的list在RevitAPI是不符合要求的)
clr.AddReference('System')
from System.Collections.Generic import List
#3、导入Dynamo中封装后的Revit节点
clr.AddReference