-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.cs
34 lines (27 loc) · 909 Bytes
/
App.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using Autodesk.Revit.UI;
namespace PipeSplitter
{
class App : IExternalApplication
{
static readonly string ExecutingAssemblyPath = System.Reflection.Assembly
.GetExecutingAssembly().Location;
public Result OnStartup(UIControlledApplication app)
{
RibbonPanel rvtRibbonPanel = app.CreateRibbonPanel("PipeSplitter");
PushButtonData dataButton = new PushButtonData("Button", "PipeSplitter"
, ExecutingAssemblyPath, "PipeSplitter.Command");
PushButton button = rvtRibbonPanel.AddItem(dataButton) as PushButton;
button.LargeImage = new System.Windows.Media.Imaging.BitmapImage
(new Uri("pack://application:,,,/PipeSplitter;component/icon.ico"
, UriKind.Absolute));
button.ToolTip =
"Split Pipes by Selected Pipe Type";
return Result.Succeeded;
}
public Result OnShutdown(UIControlledApplication app)
{
return Result.Succeeded;
}
}
}