Message 1 of 8

Not applicable
02-26-2014
06:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Try something like this
app.PostCommand(Autodesk.Revit.UI.RevitCommandId.LookupPostableCommandId(Autodesk.Revit.UI.PostableCommand.Whatever here.....))
Cheers
Phillip
Hi,
Did you try using the ClientId as name ? Something like this :
// External commands defined by add-ins are // identified by the client id specified in // the add-in manifest string name = "64b3d907-37cf-4cab-8bbc-3de9b66a3efa"; RevitCommandId id_addin = RevitCommandId.LookupCommandId( name );
Please refer to this blog post of my colleague Jeremy :
Hope this helps.
Thanks,
Partha
Just a heads up for anyone: if you're trying to get a command defined in a custom button, the answer also on the same post outlined by Partha (https://thebuildingcoder.typepad.com/blog/2013/10/programmatic-custom-add-in-external-command-launch...)
// External tool commands defined by add-ins are // identified by the string listed in the // journal file when the command is launched // manually. string name_addin_button_cmd = "CustomCtrl_%CustomCtrl_%" + "Add-Ins%Post Add-in Command%Dummy2"; RevitCommandId id_addin_button_cmd = RevitCommandId.LookupCommandId( name_addin_button_cmd ); uiapp.PostCommand( id_addin_button_cmd );