问题:
关于之前提到 REVIT 2012 版本
可以针对工作集找出相关资料
但我试过使用 "RevitLookup" 并未发现相关的资料
不知道这版本是否仍未对此部份加入引用呢?
另外HELP中,虽然可以查到 "Workset Class" 类别资料
但是否有案例可以参考呢?
答:
2012 版的RevitLookup没有更新代码来演示工作集的用法。
下面几行代码演示了基本的用法
public Workset GetActiveWorkset(Document doc) { // Get the workset table from the document WorksetTable worksetTable = doc.GetWorksetTable(); // Get the Id of the active workset WorksetId activeId = worksetTable.GetActiveWorksetId(); // Find the workset with that Id Workset workset = worksetTable.GetWorkset(activeId); return workset; }
工作集的API用法比较直接,基本上是根据API名字可以推测出如何使用。