BIM World
A Professional BIM Learning Platform


BIM Q&A | How to Use the Revit API to Execute Your Own Custom External Commands

BIM Q&A | How to Use the Revit API to Call Your Own External Custom Commands


Within the Revit API, you can invoke commands available on the Revit interface through IExternalCommand.

The main method for this is PostCommand.

Each function button on the Revit interface has a unique ID, which you can leverage to call the command programmatically.

For example:

The Wall tool has the ID "ID_OBJECTS-WALL".

The corresponding RevitCommandId can be retrieved by:

RevitCommandId.LookupCommandId("ID_OBJECTS-WALL");

Additionally, the Revit API provides a PostableCommand enumeration, which includes a set of commands readily available for developers to use.

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » BIM Q&A | How to Use the Revit API to Execute Your Own Custom External Commands

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up