Message 1 of 4
Call external Command with a ComboBoxEvent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
To create a new pushButton in Revit I use this command :
PushButtonData _myPushButton = new PushButtonData("Naùe", "Texte", "AssemblyName", "MyClassName");
And I create my class like this : and implementing IExternalCommand
MyClassName : IExternnalCommand
{
Public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
//do something with commandData...etc.
return Result.Succeeded;
}
}
Now :
I want to create a ComboBoxData and doing something in Revit when I click on the combo.
So I use one of the 3 events : DropDownOpened
My code is :
void ComboScopBoxOpened(object sender, Autodesk.Revit.UI.Events.ComboBoxDropDownOpenedEventArgs args)
{
MyClassName _myClassName = new MyClassName();
//How to Execute whereas I do not have the commandData informations?
}
My question is :❓
How to call my class like a PushButton? How to get the ExternalCommandData?
Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107