We have demonstrated how to generate Revit ribbon creation code automatically in either C# or VB.NET with the assistance of the Ribbon Creator of Revit Addin Wizard (RevitAddinWizard) many times before. The Revit Ribbon Creator provides a cool user interface to help collect necessary data for all available ribbon groups and items, assign images big or small to them, and set up associations between Revit ribbon buttons and external commands.
The Ribbon Creator has been enhanced dramatically to facilitate the Revit .NET API ribbon creation work much better. The most noted new features are the Revit Ribbon Definition schema invention and the ribbon creator row/item edition.
By default, no Revit Ribbon Definition is created. As demonstrated in the following image, no Container, Item or Command has been populated when the Ribbon Creator is opened up:
We can use the File menus to create, open, save, or save as a Revit Ribbon Definition file:
If the New command is clicked, the Ribbon Creator rows will be enabled:
Various items and properties can be created and set afterwards.
If the Open command is pressed, an Open dialog for the file type of Revit Ribbon Definition (.RRD) will pop up:
If a RRD file is opened, the grid rows of the Ribbon Creator will be automatically populated. This is an example look:
As can be noticed, not only some rows are properly populated from the opened RRD file in case it is good, but also the title of the Ribbon Creator has been updated to reflect the RRD path.
The Save and Save As commands behave just as normal as people can reasonably imagine, thus we will not demonstrate them in detail here. The Exit command is more obvious.
The new Ribbon Creator of RevitAddinWizard makes Revit programmers’ life much easier for both C# lovers and VB.NETers.
Recent Comments