Revit內置了一些命令,直接調用Revit操做方式。app
能夠去API文檔查詢PostableCommand枚舉,仍是不少的。spa
話很少說,直接上代碼code
var commandId = RevitCommandId.LookupPostableCommandId(PostableCommand.LineStyles); if (app.CanPostCommand(commandId)) { app.PostCommand(commandId); }