-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathConfigureCommand.cs
More file actions
41 lines (36 loc) · 1.27 KB
/
ConfigureCommand.cs
File metadata and controls
41 lines (36 loc) · 1.27 KB
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
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;
namespace NavisPythonShell
{
/// <summary>
/// Open the configuration dialog.
/// </summary>
[PluginAttribute("NavisPythonShell.ConfigureCommand",
"ACOM",
ToolTip = "NPS configuration window",
DisplayName = "Configure NPS")]
[AddInPluginAttribute(AddInLocation.AddIn,
Icon = "Icons\\Settings-16.ico",
LargeIcon = "Icons\\Settings-32.ico",
LoadForCanExecute = true)]
class ConfigureCommand : AddInPlugin
{
public override int Execute(params string[] parameters)
{
//load the application
if (!NavisPythonShellApplication.applicationLoaded)
{
NavisPythonShellApplication.OnLoaded();
}
var dialog = new ConfigureCommandsForm();
dialog.ShowDialog();
//MessageBox.Show("Restart Navisworks to see changes to the commands in the Ribbon", "Configure NavisPythonShell", MessageBoxButtons.OK, MessageBoxIcon.Information);
return 0;
}
}
}