BIM World
A Professional BIM Learning Platform


Revit Secondary Development: How to Create a Custom Tab After Launch

In Revit, the user interface (UI) for a typical plugin is usually created during Revit’s startup process, utilizing the UIControlledApplication type within the OnStartup method of the IExternalApplication interface.

However, upon reviewing the SDK, I discovered that the UI can also be created using the UIApplication type. Through testing, I confirmed that it is possible to add UI elements after Revit has already launched.

Consider the following example code:

   public class TestCommand : IExternalCommand
        {
            public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
            {
                UIApplication uiapp = commandData.Application;

            RibbonPanel rb = uiapp.CreateRibbonPanel(uiapp.CreateRibbonTab("Capol"), "NewRibbonPanel");

            return Result.Succeeded;

        }

    }

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 » Revit Secondary Development: How to Create a Custom Tab After Launch

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