-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dagmc_Toolbox_AddIn.cs
70 lines (50 loc) · 1.92 KB
/
Dagmc_Toolbox_AddIn.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
using System.IO;
using SpaceClaim.Api.V19.Extensibility;
using System.Windows.Forms;
using SpaceClaim.Api.V19.Geometry;
using Dagmc_Toolbox.Properties;
namespace Dagmc_Toolbox
{
class Dagmc_Toolbox_AddIn : SpaceClaim.Api.V19.Extensibility.AddIn, SpaceClaim.Api.V19.Extensibility.IExtensibility, SpaceClaim.Api.V19.Extensibility.ICommandExtensibility, SpaceClaim.Api.V19.Extensibility.IRibbonExtensibility
{
readonly SpaceClaim.Api.V19.Extensibility.CommandCapsule[] capsules = new[]
{
new SpaceClaim.Api.V19.Extensibility.CommandCapsule("Dagmc_Toolbox.C#.V18.RibbonTab", Properties.Resources.RibbonTabText),
new SpaceClaim.Api.V19.Extensibility.CommandCapsule("Dagmc_Toolbox.C#.V18.PartGroup", Properties.Resources.PartGroupText),
new Commands.ExportDagmc(),
//new Commands.PrintUid(),
new Commands.CheckGeometry(),
new Commands.CreateGroup()
//new Commands.RemoteTrelis()
};
#region IExtensibility members
public bool Connect()
{
// Initilization for add-in
SpaceClaim.Api.V19.Unsupported.JournalMethods.RecordAutoLoadAddIn("SampleAddIn.C#.V18.RibbonTab", Properties.Resources.AddInManifestInfo);
return true;
}
public void Disconnect()
{
}
#endregion
#region ICommandExtensibility members
public void Initialize()
{
foreach (SpaceClaim.Api.V19.Extensibility.CommandCapsule capsule in capsules)
capsule.Initialize();
// Insert commands here for the context menu
}
#endregion
#region IRibbonExtensibility members
public string GetCustomUI()
{
return Properties.Resources.Ribbon;
}
#endregion
}
}