30 lines
767 B
C#
30 lines
767 B
C#
|
|
using System;
|
||
|
|
using System.Reflection;
|
||
|
|
using System.Runtime.CompilerServices;
|
||
|
|
using Autodesk.Revit.DB;
|
||
|
|
using Autodesk.Revit.UI;
|
||
|
|
using ricaun.Revit.UI;
|
||
|
|
|
||
|
|
|
||
|
|
namespace RevitAddin.Revit
|
||
|
|
{
|
||
|
|
[AppLoader]
|
||
|
|
public class App : IExternalApplication
|
||
|
|
{
|
||
|
|
private RibbonPanel ribbonPanel;
|
||
|
|
public Result OnStartup(UIControlledApplication application)
|
||
|
|
{
|
||
|
|
ribbonPanel = application.CreatePanel("RevitAddin");
|
||
|
|
ribbonPanel.CreatePushButton<Commands.Command>()
|
||
|
|
.SetLargeImage("Resources/Revit.ico");
|
||
|
|
return Result.Succeeded;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Result OnShutdown(UIControlledApplication application)
|
||
|
|
{
|
||
|
|
ribbonPanel?.Remove();
|
||
|
|
return Result.Succeeded;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|