Run external command on Revit startup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Guys,
I have an external command that I can run when I click a button in Revit (it opens a family file, adds some parameters, closes and saves it).
I've also found in the SDK samples an example of running some code when Revit starts up.
The problem I have is how do I run my command when the application starts? The startup one implements IExternalAplication and the button one implements IExternalCommand. I can't just put the code for my button into the OnStartup function of the external application as it needs access to the CommandData that you get in the Execute function of the external command.
I've come from programming AutoCAD and I'm a bit of a Revit noob so apologies if the answer is obvious but I've had a search around and can't seem to find anything.
Thanks in advance.