1.外部命令IExternalCommand
IEXternalCommand 是Revit API 用户通过外部命令来扩展Revit时必须在外部命令中实现的接口。
IEternalCommand:UI vs DB
UIApplication:创建菜单
UIDocument:用户和文档的交互
Application:处理文档
Document:处理元素
UIDocument uiDoc = commandData.Application.ActiveUIDocument;
Document doc = uiDoc.Document;