├── samples
├── addin
│ ├── DemoAddIn
│ │ └── cs
│ │ │ ├── DemoAddIn
│ │ │ ├── Properties
│ │ │ │ ├── Resources.zh-CN.Designer.cs
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Resources.zh-CN.resx
│ │ │ │ └── Resources.Designer.cs
│ │ │ ├── Native.rc
│ │ │ ├── Native.res
│ │ │ ├── res
│ │ │ │ ├── Box_32.png
│ │ │ │ ├── Help_32.png
│ │ │ │ ├── Save_16.png
│ │ │ │ ├── Boxes_32.png
│ │ │ │ ├── Camera_32.png
│ │ │ │ ├── EdgeBar_20.png
│ │ │ │ ├── Folder_16.png
│ │ │ │ ├── GdiPlus_32.png
│ │ │ │ ├── Monitor_16.png
│ │ │ │ ├── Notepad_32.png
│ │ │ │ ├── Printer_32.png
│ │ │ │ ├── Search_32.png
│ │ │ │ ├── Tools_32.png
│ │ │ │ ├── Favorites_32.png
│ │ │ │ ├── Question_32.png
│ │ │ │ ├── BoundingBox_32.png
│ │ │ │ ├── Photograph_32.png
│ │ │ │ └── CommandPrompt_32.png
│ │ │ ├── packages.config
│ │ │ ├── AboutDialog.cs
│ │ │ ├── MyGlobalEdgeBarControl.cs
│ │ │ ├── CompileNativeRes.bat
│ │ │ ├── NativeMessageEdgeBarControl.cs
│ │ │ ├── MyCustomDialog.cs
│ │ │ ├── MyEdgeBarPage.cs
│ │ │ ├── Registration.bat
│ │ │ ├── Instructions.txt
│ │ │ ├── NativeMessageEdgeBarControl.Designer.cs
│ │ │ ├── MyConstants.cs
│ │ │ ├── MyCommands.cs
│ │ │ ├── MyGlobalEdgeBarControl.Designer.cs
│ │ │ ├── AboutDialog.Designer.cs
│ │ │ ├── MyCustomDialog.Designer.cs
│ │ │ ├── MyDocumentEdgeBarControl.cs
│ │ │ ├── MyDocumentEdgeBarControl.Designer.cs
│ │ │ ├── AboutDialog.resx
│ │ │ ├── MyCustomDialog.resx
│ │ │ ├── MyDocumentEdgeBarControl.resx
│ │ │ ├── MyGlobalEdgeBarControl.resx
│ │ │ ├── NativeMessageEdgeBarControl.resx
│ │ │ ├── DemoAddIn.csproj
│ │ │ └── MyViewOverlay3D.cs
│ │ │ ├── DemoAddIn.WPF
│ │ │ ├── Properties
│ │ │ │ ├── Settings.settings
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ └── Resources.resx
│ │ │ ├── MyWpfEdgeBarPage.xaml.cs
│ │ │ ├── MyWpfEdgeBarPage.xaml
│ │ │ └── DemoAddIn.WPF.csproj
│ │ │ └── DemoAddIn.sln
│ └── EmptyAddIn
│ │ └── cs
│ │ ├── EmptyAddIn
│ │ ├── Native.rc
│ │ ├── Native.res
│ │ ├── CompileNativeRes.bat
│ │ ├── MyConstants.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ └── Resources.resx
│ │ ├── Registration.bat
│ │ ├── Instructions.txt
│ │ ├── MyAddIn.cs
│ │ └── EmptyAddIn.csproj
│ │ └── EmptyAddIn.sln
└── README.md
├── tools
└── ResetUserSettings.bat
├── LICENSE
├── README.md
├── .gitattributes
└── .gitignore
/samples/addin/DemoAddIn/cs/DemoAddIn/Properties/Resources.zh-CN.Designer.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tools/ResetUserSettings.bat:
--------------------------------------------------------------------------------
1 | reg delete "HKEY_CURRENT_USER\Software\Siemens\Solid Edge" /f
2 | rmdir "%APPDATA%\Siemens\Solid Edge" /s /q
3 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/Native.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/Native.rc
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/Native.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/Native.res
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Native.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/EmptyAddIn/cs/EmptyAddIn/Native.rc
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Native.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/EmptyAddIn/cs/EmptyAddIn/Native.res
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Box_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Box_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Help_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Help_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Save_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Save_16.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Boxes_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Boxes_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Camera_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Camera_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/EdgeBar_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/EdgeBar_20.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Folder_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Folder_16.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/GdiPlus_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/GdiPlus_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Monitor_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Monitor_16.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Notepad_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Notepad_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Printer_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Printer_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Search_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Search_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Tools_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Tools_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Favorites_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Favorites_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Question_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Question_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/BoundingBox_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/BoundingBox_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/Photograph_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/Photograph_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/res/CommandPrompt_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SolidEdgeCommunity/SDK/HEAD/samples/addin/DemoAddIn/cs/DemoAddIn/res/CommandPrompt_32.png
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/README.md:
--------------------------------------------------------------------------------
1 | # Samples
2 | We are in the process of converting legacy [Samples](https://github.com/SolidEdgeCommunity/Samples) to the new SDK. These new samples will not require [Interop.SolidEdge](https://github.com/SolidEdgeCommunity/Interop.SolidEdge) NuGet dependencies.
3 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/AboutDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace DemoAddIn
12 | {
13 | public partial class AboutDialog : Form
14 | {
15 | public AboutDialog()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void buttonClose_Click(object sender, EventArgs e)
21 | {
22 | Close();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyGlobalEdgeBarControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace DemoAddIn
12 | {
13 | public partial class MyGlobalEdgeBarControl : UserControl
14 | {
15 | public MyGlobalEdgeBarControl()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void MyGlobalEdgeBarControl_Load(object sender, EventArgs e)
21 | {
22 | }
23 |
24 | public SolidEdgeFramework.Application Application { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/CompileNativeRes.bat:
--------------------------------------------------------------------------------
1 | :: Resource Compiler (rc.exe) is included in the Windows 10 SDK
2 | :: and can be installed using the Visual Studio Installer.
3 | :: https://docs.microsoft.com/en-us/windows/win32/menurc/resource-compiler
4 |
5 | :: Solid Edge AddIns require native resources for BITMAP, PNG, etc.
6 | :: If you examine the .csproj, you will see Native.res.
7 | :: This instructs MSBUILD to embed Native.res into the $(TargetPath).
8 |
9 | :: Update Native.rc and MyConstants.cs as needed.
10 | :: This batch file must be executed manually but could be added
11 | :: to pre-build events.
12 | @echo off
13 |
14 | set RC_PATH="Native.rc"
15 | set RES_PATH="Native.res"
16 |
17 | :: RC_PATH -> RES_PATH
18 | rc.exe /fo%RES_PATH% %RC_PATH%
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/CompileNativeRes.bat:
--------------------------------------------------------------------------------
1 | :: Resource Compiler (rc.exe) is included in the Windows 10 SDK
2 | :: and can be installed using the Visual Studio Installer.
3 | :: https://docs.microsoft.com/en-us/windows/win32/menurc/resource-compiler
4 |
5 | :: Solid Edge AddIns require native resources for BITMAP, PNG, etc.
6 | :: If you examine the .csproj, you will see Native.res.
7 | :: This instructs MSBUILD to embed Native.res into the $(TargetPath).
8 |
9 | :: Update Native.rc and MyConstants.cs as needed.
10 | :: This batch file must be executed manually but could be added
11 | :: to pre-build events.
12 | @echo off
13 |
14 | set RC_PATH="Native.rc"
15 | set RES_PATH="Native.res"
16 |
17 | :: RC_PATH -> RES_PATH
18 | rc.exe /fo%RES_PATH% %RC_PATH%
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/NativeMessageEdgeBarControl.cs:
--------------------------------------------------------------------------------
1 | using SolidEdgeSDK.AddIn;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace DemoAddIn
13 | {
14 | public partial class NativeMessageEdgeBarControl : UserControl
15 | {
16 | public NativeMessageEdgeBarControl()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | public void LogMessage(Message m)
22 | {
23 | tbMessages.AppendText($"{m.ToString()}{Environment.NewLine}");
24 | }
25 |
26 | public EdgeBarPage EdgeBarPage { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/MyWpfEdgeBarPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace DemoAddIn.WPF
17 | {
18 | ///
19 | /// Interaction logic for MyWpfEdgeBarPage.xaml
20 | ///
21 | public partial class MyWpfEdgeBarPage : Page
22 | {
23 | public MyWpfEdgeBarPage()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyCustomDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace DemoAddIn
12 | {
13 | public partial class MyCustomDialog : Form
14 | {
15 | public MyCustomDialog()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void buttonOK_Click(object sender, EventArgs e)
21 | {
22 | this.DialogResult = System.Windows.Forms.DialogResult.OK;
23 | Close();
24 | }
25 |
26 | private void buttonCancel_Click(object sender, EventArgs e)
27 | {
28 | this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
29 | Close();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/MyConstants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace EmptyAddIn
7 | {
8 | static class MyConstants
9 | {
10 | ///
11 | /// Unique GUID for the addin.
12 | ///
13 | ///
14 | /// You must generate a new unique GUID for your addin.
15 | ///
16 | ///
17 | /// 7EC6031B-F90B-4AE2-8999-40EFED6664BB
18 | ///
19 | public const string AddInGuid = "7EC6031B-F90B-4AE2-8999-40EFED6664BB";
20 |
21 | ///
22 | /// Unique PROGID for the addin.
23 | ///
24 | ///
25 | /// You must specify a unique PROGID for your addin.
26 | ///
27 | public const string AddInProgId = "SolidEdgeCommunity.EmptyAddIn";
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/MyWpfEdgeBarPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyEdgeBarPage.cs:
--------------------------------------------------------------------------------
1 | using SolidEdgeSDK.AddIn;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Forms;
8 |
9 | namespace DemoAddIn
10 | {
11 | public class MyEdgeBarPage : EdgeBarPage
12 | {
13 | public MyEdgeBarPage()
14 | {
15 | }
16 |
17 | protected override void WndProc(ref Message m)
18 | {
19 | const int WM_SETFOCUS = 0x0007;
20 | const int WM_KILLFOCUS = 0x0008;
21 | const int WM_ENABLE = 0x000A;
22 |
23 | switch (m.Msg)
24 | {
25 | case WM_SETFOCUS:
26 | break;
27 | case WM_KILLFOCUS:
28 | break;
29 | case WM_ENABLE:
30 | break;
31 | }
32 |
33 | if (this.ChildObject is NativeMessageEdgeBarControl control)
34 | {
35 | control.LogMessage(m);
36 | }
37 |
38 | base.WndProc(ref m);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Solid Edge Community
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30320.27
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmptyAddIn", "EmptyAddIn\EmptyAddIn.csproj", "{877CEFBC-1E32-40B1-9A86-3851CB2721CC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {877CEFBC-1E32-40B1-9A86-3851CB2721CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {877CEFBC-1E32-40B1-9A86-3851CB2721CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {877CEFBC-1E32-40B1-9A86-3851CB2721CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {877CEFBC-1E32-40B1-9A86-3851CB2721CC}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {280D519C-5669-40F3-B1B5-CBBC7AA791D2}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DemoAddIn.WPF.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DemoAddIn")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DemoAddIn")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("8692b005-b856-4452-9592-470e3ec75aad")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("EmptyAddIn")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EmptyAddIn")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | //[assembly: Guid("8692b005-b856-4452-9592-470e3ec75aad")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30320.27
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoAddIn", "DemoAddIn\DemoAddIn.csproj", "{8692B005-B856-4452-9592-470E3EC75AAD}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoAddIn.WPF", "DemoAddIn.WPF\DemoAddIn.WPF.csproj", "{3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {8692B005-B856-4452-9592-470E3EC75AAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {8692B005-B856-4452-9592-470E3EC75AAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {8692B005-B856-4452-9592-470E3EC75AAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {8692B005-B856-4452-9592-470E3EC75AAD}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {A84FB33C-E72A-42BC-B2A6-BD86CDB9E040}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/Registration.bat:
--------------------------------------------------------------------------------
1 | :: If you are changing bin\Debug\ to something like ..\..\..\MyProduct,
2 | :: you are probably doing it wrong and this script will not work for you.
3 |
4 | :: Execute WHERE RegAsm.exe from a command prompt like the Developer Command Prompt for VS 2019.
5 | :: It will return C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe which is the 32 bit version.
6 | :: Using the 32 bit version of RegAsm.exe will not correctly register your addin for modern Solid Edge (x64).
7 | :: %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe is the 64 bit version and is the correct
8 | :: version for registering modern Solid Edge AddIns.
9 |
10 | @echo off
11 |
12 | :: Update to match as necessary.
13 | set ASSEMBLY_NAME=DemoAddIn
14 |
15 | :: If you left alone, this will resolve to the correct path.
16 | set ADDIN_PATH="%~dp0bin\Debug\%ASSEMBLY_NAME%.dll"
17 |
18 | :: set REGASM_X32="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
19 | set REGASM_X64="%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"
20 |
21 | CLS
22 |
23 | WHOAMI /Groups | FIND "S-1-16-12288" >NUL
24 | IF ERRORLEVEL 1 (
25 | ECHO This batch file requires elevated privileges.
26 | EXIT /B 1
27 | )
28 |
29 | :menu
30 | echo [Options]
31 | echo 1 Register %ADDIN_PATH%
32 | echo 2 Unregister %ADDIN_PATH%
33 | echo 3 Quit
34 |
35 | :choice
36 | set /P C=Enter selection:
37 | if "%C%"=="1" goto register
38 | if "%C%"=="2" goto unregister
39 | if "%C%"=="3" goto end
40 | goto choice
41 |
42 | :register
43 | echo.
44 | %REGASM_X64% /codebase %ADDIN_PATH%
45 | goto end
46 |
47 | :unregister
48 | echo.
49 | %REGASM_X64% /u %ADDIN_PATH%
50 | goto end
51 |
52 | :end
53 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Registration.bat:
--------------------------------------------------------------------------------
1 | :: If you are changing bin\Debug\ to something like ..\..\..\MyProduct,
2 | :: you are probably doing it wrong and this script will not work for you.
3 |
4 | :: Execute WHERE RegAsm.exe from a command prompt like the Developer Command Prompt for VS 2019.
5 | :: It will return C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe which is the 32 bit version.
6 | :: Using the 32 bit version of RegAsm.exe will not correctly register your addin for modern Solid Edge (x64).
7 | :: %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe is the 64 bit version and is the correct
8 | :: version for registering modern Solid Edge AddIns.
9 |
10 | @echo off
11 |
12 | :: Update to match as necessary.
13 | set ASSEMBLY_NAME=EmptyAddIn
14 |
15 | :: If you left alone, this will resolve to the correct path.
16 | set ADDIN_PATH="%~dp0bin\Debug\%ASSEMBLY_NAME%.dll"
17 |
18 | :: set REGASM_X32="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
19 | set REGASM_X64="%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"
20 |
21 | CLS
22 |
23 | WHOAMI /Groups | FIND "S-1-16-12288" >NUL
24 | IF ERRORLEVEL 1 (
25 | ECHO This batch file requires elevated privileges.
26 | EXIT /B 1
27 | )
28 |
29 | :menu
30 | echo [Options]
31 | echo 1 Register %ADDIN_PATH%
32 | echo 2 Unregister %ADDIN_PATH%
33 | echo 3 Quit
34 |
35 | :choice
36 | set /P C=Enter selection:
37 | if "%C%"=="1" goto register
38 | if "%C%"=="2" goto unregister
39 | if "%C%"=="3" goto end
40 | goto choice
41 |
42 | :register
43 | echo.
44 | %REGASM_X64% /codebase %ADDIN_PATH%
45 | goto end
46 |
47 | :unregister
48 | echo.
49 | %REGASM_X64% /u %ADDIN_PATH%
50 | goto end
51 |
52 | :end
53 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Solid Edge Community SDK
2 | Solid Edge Community SDK is a community driven SDK for Solid Edge. The goal of the SDK is to provide sample .NET code for Solid Edge.
3 |
4 | * [SolidEdgeSDK.cs](https://github.com/SolidEdgeCommunity/SDK/blob/master/src/SolidEdgeSDK.cs) is the primary include that can be used in any project.
5 | * [SolidEdgeSDK.vb](https://github.com/SolidEdgeCommunity/SDK/blob/master/src/SolidEdgeSDK.vb) is generated using [Telerik Code Converter](https://converter.telerik.com) but is not tested or supported. If you want\need to use Visual Basic, we recommend adding [SolidEdgeSDK.cs](https://github.com/SolidEdgeCommunity/SDK/blob/master/src/SolidEdgeSDK.cs) to a separate project and adding a reference.
6 |
7 | ## Legacy projects
8 | The following legacy repositories and NuGet packages are no longer maintained and have been archived. Where it makes sense and where it is possible, the functionality in these repositories will be merged into this repository.
9 |
10 | | GitHub Repository | NuGet Package |
11 | | ------------- | ------------- |
12 | | [Interop.SolidEdge](https://github.com/SolidEdgeCommunity/Interop.SolidEdge) | [Interop.SolidEdge](https://www.nuget.org/packages/Interop.SolidEdge) |
13 | | [SolidEdge.Community](https://github.com/SolidEdgeCommunity/SolidEdge.Community) | [SolidEdge.Community](https://www.nuget.org/packages/SolidEdge.Community) |
14 | | [SolidEdge.Community.AddIn](https://github.com/SolidEdgeCommunity/SolidEdge.Community.AddIn) | [SolidEdge.Community.AddIn](https://www.nuget.org/packages/SolidEdge.Community.AddIn) |
15 | | [SolidEdge.Community.Reader](https://github.com/SolidEdgeCommunity/SolidEdge.Community.Reader) | [SolidEdge.Community.Reader](https://www.nuget.org/packages/SolidEdge.Community.Reader) |
16 | | [Samples](https://github.com/SolidEdgeCommunity/Samples) | |
17 | | [Templates](https://github.com/SolidEdgeCommunity/Templates) | |
18 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Instructions.txt:
--------------------------------------------------------------------------------
1 | [COM references]
2 | - All COM references in this project have "Embed Interop Types" set to True.
3 | - This prevents Interop.*.dll assemblies from being generated and is typically desired.
4 | - You are welcome to "Embed Interop Types" set to False. It does not change the code execution.
5 |
6 | [MyConstants.cs]
7 | - Generate new unique GUID for MyConstants.AddInGuid.
8 | - Update MyConstants.AddInProgId accordingly.
9 |
10 | [Native.rc]
11 | - Native images used by EdgeBar & Ribbon.
12 | - Must be maintained manually.
13 | - Execute CompileNativeRes.bat to compile Native.rc to Native.res.
14 |
15 | [Native.res]
16 | - Native images used by EdgeBar & Ribbon.
17 | - Compiled version of Native.rc.
18 | - Native.res in EmptyAddIn.csproj.
19 |
20 | [Properties\Resources.resx]
21 | - Example of how to use .NET resources for strings.
22 | - .NET resources can be localized.
23 |
24 | [Registration.bat]
25 | - Sample batch file to register the addin on a developer system.
26 | - Must be executed with administrator privilege.
27 | - Use "Developer Command Prompt for VS 20XX " shortcut so that regasm.exe resolves correctly.
28 | - If you change the assemlby name, modify the ASSEMBLY_NAME variable to match.
29 |
30 | [MyAddIn.cs]
31 | - Core addin code. Solid Edge will create an instance of this class when it loads the addin.
32 | - OnConnection(), OnConnectToEnvironment() & OnDisconnection() are primary entry\exit points.
33 | - Desired event sets can be easily attached by implementing event interface and using ComEventsManager.Attach().
34 | - CATID.SolidEdgeAddIn is currently specified to make the demo easy to setup.
35 | - When you make changes to your ribbon, you MUST increment AddInInstance.GuiVersion during OnConnection() for the changes to work correctly.
36 |
37 | [SolidEdgeSDK.cs]
38 | - Community provided and maintained Solid Edge SDK for C#.
39 | - Hosted at https://github.com/SolidEdgeCommunity/SDK.
40 | - You are welcome to modify this file as needed.
41 | - Any changes you make will be lost if you manually update from the GitHub repository.
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/Instructions.txt:
--------------------------------------------------------------------------------
1 | [COM references]
2 | - All COM references in this project have "Embed Interop Types" set to True.
3 | - This prevents Interop.*.dll assemblies from being generated and is typically desired.
4 | - You are welcome to "Embed Interop Types" set to False. It does not change the code execution.
5 |
6 | [MyConstants.cs]
7 | - Generate new unique GUID for MyConstants.AddInGuid.
8 | - Update MyConstants.AddInProgId accordingly.
9 | - NativeResources.BMP & NativeResources.PNG should match Native.rc.
10 |
11 | [Native.rc]
12 | - Native images used by EdgeBar & Ribbon.
13 | - Must be maintained manually.
14 | - Execute CompileNativeRes.bat to compile Native.rc to Native.res.
15 |
16 | [Native.res]
17 | - Native images used by EdgeBar & Ribbon.
18 | - Compiled version of Native.rc.
19 | - Native.res in DemoAddIn.csproj.
20 |
21 | [Properties\Resources.resx]
22 | [Properties\Resources.zh-CN.resx]
23 | - Example of how to use .NET resources for strings.
24 | - .NET resources can be localized.
25 |
26 | [Registration.bat]
27 | - Sample batch file to register the addin on a developer system.
28 | - Must be executed with administrator privilege.
29 | - Use "Developer Command Prompt for VS 20XX " shortcut so that regasm.exe resolves correctly.
30 | - If you change the assemlby name, modify the ASSEMBLY_NAME variable to match.
31 |
32 | [MyAddIn.cs]
33 | - Core addin code. Solid Edge will create an instance of this class when it loads the addin.
34 | - OnConnection(), OnConnectToEnvironment() & OnDisconnection() are primary entry\exit points.
35 | - Desired event sets can be easily attached by implementing event interface and using ComEventsManager.Attach().
36 | - CATID.SolidEdgeAddIn is currently specified to make the demo easy to setup.
37 | - When you make changes to your ribbon, you MUST increment AddInInstance.GuiVersion during OnConnection() for the changes to work correctly.
38 |
39 | [My3dRibbon.cs & My2dRibbon.cs]
40 | - Example of how to define a ribbon with commands.
41 | - When you make changes to your ribbon, you MUST increment AddInInstance.GuiVersion during OnConnection() for the changes to work correctly.
42 |
43 | [SolidEdgeSDK.cs]
44 | - Community provided and maintained Solid Edge SDK for C#.
45 | - Hosted at https://github.com/SolidEdgeCommunity/SDK.
46 | - You are welcome to modify this file as needed.
47 | - Any changes you make will be lost if you manually update from the GitHub repository.
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/NativeMessageEdgeBarControl.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DemoAddIn
3 | {
4 | partial class NativeMessageEdgeBarControl
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Component Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | this.tbMessages = new System.Windows.Forms.TextBox();
33 | this.SuspendLayout();
34 | //
35 | // tbMessages
36 | //
37 | this.tbMessages.Dock = System.Windows.Forms.DockStyle.Fill;
38 | this.tbMessages.HideSelection = false;
39 | this.tbMessages.Location = new System.Drawing.Point(0, 0);
40 | this.tbMessages.Multiline = true;
41 | this.tbMessages.Name = "tbMessages";
42 | this.tbMessages.ScrollBars = System.Windows.Forms.ScrollBars.Both;
43 | this.tbMessages.Size = new System.Drawing.Size(573, 489);
44 | this.tbMessages.TabIndex = 0;
45 | this.tbMessages.WordWrap = false;
46 | //
47 | // NativeMessageEdgeBarControl
48 | //
49 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
50 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
51 | this.Controls.Add(this.tbMessages);
52 | this.Name = "NativeMessageEdgeBarControl";
53 | this.Size = new System.Drawing.Size(573, 489);
54 | this.ResumeLayout(false);
55 | this.PerformLayout();
56 |
57 | }
58 |
59 | #endregion
60 |
61 | private System.Windows.Forms.TextBox tbMessages;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyConstants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace DemoAddIn
7 | {
8 | static class MyConstants
9 | {
10 | ///
11 | /// Unique GUID for the addin.
12 | ///
13 | ///
14 | /// You must generate a new unique GUID for your addin.
15 | ///
16 | ///
17 | /// A6D088BE-0640-480B-93D2-FC9A7F49ADF5
18 | ///
19 | public const string AddInGuid = "03504538-C2A2-44BC-994C-42876F57363F";
20 |
21 | ///
22 | /// Unique PROGID for the addin.
23 | ///
24 | ///
25 | /// You must specify a unique PROGID for your addin.
26 | ///
27 | public const string AddInProgId = "SolidEdgeCommunity.DemoAddIn";
28 | }
29 |
30 | ///
31 | /// Native.rc constants.
32 | ///
33 | ///
34 | /// This class and Native.rc must be manually maintained.
35 | ///
36 | static class NativeResources
37 | {
38 | ///
39 | /// Native BMP resources.
40 | ///
41 | public static class BMP
42 | {
43 | //public const int Example = 5000;
44 | }
45 |
46 | ///
47 | /// Native PNG resources.
48 | ///
49 | public static class PNG
50 | {
51 | public const int BoundingBox_32 = 6000;
52 | public const int Boxes_32 = 6001;
53 | public const int Box_32x32 = 6002;
54 | public const int Camera_32x32 = 6003;
55 | public const int CommandPrompt_32x32 = 6004;
56 | public const int EdgeBar_20x20 = 6005;
57 | public const int Favorites_32x32 = 6006;
58 | public const int Folder_16x16 = 6007;
59 | public const int GdiPlus_32 = 6008;
60 | public const int Help_32x32 = 6009;
61 | public const int Monitor_16x16 = 6010;
62 | public const int Notepad_32x32 = 6011;
63 | public const int Photograph_32x32 = 6012;
64 | public const int Printer_32x32 = 6013;
65 | public const int Question_32x32 = 6014;
66 | public const int Save_16x16 = 6015;
67 | public const int Search_32x32 = 6016;
68 | public const int Tools_32x32 = 6017;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("DemoAddIn.WPF")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("DemoAddIn.WPF")]
15 | [assembly: AssemblyCopyright("Copyright © 2020")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly:ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyCommands.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DemoAddIn
8 | {
9 | ///
10 | /// Command Ids
11 | ///
12 | ///
13 | /// When you make changes to your commands, you must increment AddInInstance.GuiVersion in MyAddIn.cs.
14 | ///
15 | public enum MyCommandIds : int
16 | {
17 | Save,
18 | Folder,
19 | Monitor,
20 | Box,
21 | Camera,
22 | Photograph,
23 | Favorites,
24 | Printer,
25 | Tools,
26 | CommandPrompt,
27 | Notepad,
28 | Help,
29 | Search,
30 | Question,
31 | CheckBox1,
32 | CheckBox2,
33 | CheckBox3,
34 | RadioButton1,
35 | RadioButton2,
36 | RadioButton3,
37 | BoundingBox,
38 | OpenGlBoxes,
39 | GdiPlus,
40 | About
41 | }
42 |
43 | public class MyCommand
44 | {
45 | public MyCommand()
46 | {
47 | }
48 |
49 | public MyCommand(MyCommandIds commandId, string category, string group, string command, int imageId, SolidEdgeFramework.SeButtonStyle buttonStyle)
50 | {
51 | CommandId = commandId;
52 | Category = category;
53 | Group = group;
54 | CommandString = command;
55 | ImageId = imageId;
56 | ButtonStyle = buttonStyle;
57 | }
58 |
59 | public MyCommandIds CommandId { get; set; }
60 | public int SolidEdgeCommandId { get; set; }
61 | public string Category { get; set; }
62 | public string Group { get; set; }
63 | public string CommandString { get; set; }
64 | public int ImageId { get; set; }
65 | public SolidEdgeFramework.SeButtonStyle ButtonStyle { get; set; } = SolidEdgeFramework.SeButtonStyle.seButtonAutomatic;
66 | public string RuntimeCategoryName { get; set; }
67 | public string RuntimeCommandName { get; set; }
68 | public bool Enabled { get; set; } = true;
69 | public bool Checked { get; set; }
70 |
71 | public override string ToString()
72 | {
73 | if (String.IsNullOrWhiteSpace(RuntimeCommandName) == false)
74 | {
75 | return RuntimeCommandName;
76 | }
77 | else if (String.IsNullOrWhiteSpace(CommandString) == false)
78 | {
79 | return CommandString;
80 | }
81 |
82 | return base.ToString();
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyGlobalEdgeBarControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoAddIn
2 | {
3 | partial class MyGlobalEdgeBarControl
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // label1
35 | //
36 | this.label1.BackColor = System.Drawing.Color.RoyalBlue;
37 | this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
38 | this.label1.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
39 | this.label1.ForeColor = System.Drawing.Color.White;
40 | this.label1.Location = new System.Drawing.Point(0, 0);
41 | this.label1.Name = "label1";
42 | this.label1.Size = new System.Drawing.Size(435, 461);
43 | this.label1.TabIndex = 0;
44 | this.label1.Text = "Welcome to the Solid Edge Community SDK DemoAddIn";
45 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
46 | //
47 | // MyGlobalEdgeBarControl
48 | //
49 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
50 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
51 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(96)))), ((int)(((byte)(0)))));
52 | this.Controls.Add(this.label1);
53 | this.Name = "MyGlobalEdgeBarControl";
54 | this.Size = new System.Drawing.Size(435, 461);
55 | this.Load += new System.EventHandler(this.MyGlobalEdgeBarControl_Load);
56 | this.ResumeLayout(false);
57 |
58 | }
59 |
60 | #endregion
61 |
62 | private System.Windows.Forms.Label label1;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/AboutDialog.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DemoAddIn
3 | {
4 | partial class AboutDialog
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | this.buttonClose = new System.Windows.Forms.Button();
33 | this.SuspendLayout();
34 | //
35 | // buttonClose
36 | //
37 | this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
38 | this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
39 | this.buttonClose.ImeMode = System.Windows.Forms.ImeMode.NoControl;
40 | this.buttonClose.Location = new System.Drawing.Point(384, 248);
41 | this.buttonClose.Name = "buttonClose";
42 | this.buttonClose.Size = new System.Drawing.Size(75, 23);
43 | this.buttonClose.TabIndex = 6;
44 | this.buttonClose.Text = "&Close";
45 | this.buttonClose.UseVisualStyleBackColor = true;
46 | this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
47 | //
48 | // AboutDialog
49 | //
50 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
51 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
52 | this.ClientSize = new System.Drawing.Size(471, 283);
53 | this.Controls.Add(this.buttonClose);
54 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
55 | this.MaximizeBox = false;
56 | this.MinimizeBox = false;
57 | this.Name = "AboutDialog";
58 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
59 | this.Text = "About";
60 | this.ResumeLayout(false);
61 |
62 | }
63 |
64 | #endregion
65 |
66 | private System.Windows.Forms.Button buttonClose;
67 | }
68 | }
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DemoAddIn.WPF.Properties {
12 |
13 |
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// Returns the cached ResourceManager instance used by this class.
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if ((resourceMan == null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DemoAddIn.WPF.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// Overrides the current thread's CurrentUICulture property for all
50 | /// resource lookups using this strongly typed resource class.
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/MyAddIn.cs:
--------------------------------------------------------------------------------
1 | using SolidEdgeSDK.AddIn;
2 | using SolidEdgeSDK.InteropServices;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Runtime.InteropServices;
7 |
8 | // Please refer to Instructions.txt.
9 | namespace EmptyAddIn
10 | {
11 | // MUST UPDATE MyConstants.cs!
12 | [Guid(MyConstants.AddInGuid), ProgId(MyConstants.AddInProgId), ComVisible(true)]
13 | [AddInImplementedCategory(CATID.SolidEdgeAddIn)]
14 | [AddInEnvironmentCategory(CATID.SEApplication)]
15 | [AddInEnvironmentCategory(CATID.SEAllDocumentEnvrionments)]
16 | [AddInCulture("en-US")]
17 | public class MyAddIn : SolidEdgeAddIn
18 | {
19 | #region SolidEdgeAddIn implementation
20 |
21 | public override void OnConnection(SolidEdgeFramework.SeConnectMode ConnectMode)
22 | {
23 | }
24 |
25 | public override void OnConnectToEnvironment(Guid EnvCatID, SolidEdgeFramework.Environment environment, bool firstTime)
26 | {
27 | }
28 |
29 | public override void OnDisconnection(SolidEdgeFramework.SeDisconnectMode DisconnectMode)
30 | {
31 | }
32 |
33 | #endregion
34 |
35 | #region Registration (regasm.exe) functions
36 |
37 | [ComRegisterFunction]
38 | static void OnComRegister(Type t)
39 | {
40 | if (Guid.Equals(t.GUID, typeof(MyAddIn).GUID))
41 | {
42 | var implementedCategories = System.Attribute
43 | .GetCustomAttributes(t, typeof(AddInImplementedCategoryAttribute))
44 | .Cast()
45 | .Select(a => a.Value)
46 | .ToArray();
47 |
48 | var environmentCategories = System.Attribute
49 | .GetCustomAttributes(t, typeof(AddInEnvironmentCategoryAttribute))
50 | .Cast()
51 | .Select(a => a.Value)
52 | .ToArray();
53 |
54 | var cultures = System.Attribute
55 | .GetCustomAttributes(t, typeof(AddInCultureAttribute))
56 | .Cast()
57 | .Select(a => a.Value);
58 |
59 | var descriptors = cultures
60 | .Select(culture => new AddInDescriptor(culture, typeof(Properties.Resources)))
61 | .ToArray();
62 |
63 | var settings = new ComRegistrationSettings(t)
64 | {
65 | Enabled = true,
66 | ImplementedCategories = implementedCategories,
67 | EnvironmentCategories = environmentCategories,
68 | Descriptors = descriptors
69 | };
70 |
71 | ComRegisterSolidEdgeAddIn(settings);
72 | }
73 | }
74 |
75 | [ComUnregisterFunction]
76 | static void OnComUnregister(Type t)
77 | {
78 | if (Guid.Equals(t.GUID, typeof(MyAddIn).GUID))
79 | {
80 | ComUnregisterSolidEdgeAddIn(t);
81 | }
82 | }
83 |
84 | #endregion
85 | }
86 | }
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyCustomDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoAddIn
2 | {
3 | partial class MyCustomDialog
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.buttonCancel = new System.Windows.Forms.Button();
32 | this.buttonOK = new System.Windows.Forms.Button();
33 | this.SuspendLayout();
34 | //
35 | // buttonCancel
36 | //
37 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
38 | this.buttonCancel.Location = new System.Drawing.Point(297, 196);
39 | this.buttonCancel.Name = "buttonCancel";
40 | this.buttonCancel.Size = new System.Drawing.Size(75, 23);
41 | this.buttonCancel.TabIndex = 3;
42 | this.buttonCancel.Text = "Cancel";
43 | this.buttonCancel.UseVisualStyleBackColor = true;
44 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
45 | //
46 | // buttonOK
47 | //
48 | this.buttonOK.Location = new System.Drawing.Point(216, 196);
49 | this.buttonOK.Name = "buttonOK";
50 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
51 | this.buttonOK.TabIndex = 2;
52 | this.buttonOK.Text = "OK";
53 | this.buttonOK.UseVisualStyleBackColor = true;
54 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
55 | //
56 | // MyCustomDialog
57 | //
58 | this.AcceptButton = this.buttonOK;
59 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
60 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
61 | this.CancelButton = this.buttonCancel;
62 | this.ClientSize = new System.Drawing.Size(384, 231);
63 | this.Controls.Add(this.buttonCancel);
64 | this.Controls.Add(this.buttonOK);
65 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
66 | this.MaximizeBox = false;
67 | this.MinimizeBox = false;
68 | this.Name = "MyCustomDialog";
69 | this.ShowInTaskbar = false;
70 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
71 | this.Text = "My Custom Dialog";
72 | this.ResumeLayout(false);
73 |
74 | }
75 |
76 | #endregion
77 |
78 | private System.Windows.Forms.Button buttonCancel;
79 | private System.Windows.Forms.Button buttonOK;
80 | }
81 |
82 | }
--------------------------------------------------------------------------------
/samples/addin/EmptyAddIn/cs/EmptyAddIn/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EmptyAddIn.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EmptyAddIn.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized string similar to Solid Edge Community EmptyAddIn (C#).
65 | ///
66 | internal static string AddInDescription {
67 | get {
68 | return ResourceManager.GetString("AddInDescription", resourceCulture);
69 | }
70 | }
71 |
72 | ///
73 | /// Looks up a localized string similar to Solid Edge Community EmptyAddIn (C#).
74 | ///
75 | internal static string AddInSummary {
76 | get {
77 | return ResourceManager.GetString("AddInSummary", resourceCulture);
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn.WPF/DemoAddIn.WPF.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {3DAAD612-153D-4549-8E4C-5AE5E1FFDF1A}
8 | library
9 | DemoAddIn.WPF
10 | DemoAddIn.WPF
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 4.0
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | MSBuild:Compile
53 | Designer
54 |
55 |
56 | MyWpfEdgeBarPage.xaml
57 | Code
58 |
59 |
60 |
61 |
62 | Code
63 |
64 |
65 | True
66 | True
67 | Resources.resx
68 |
69 |
70 | True
71 | Settings.settings
72 | True
73 |
74 |
75 | ResXFileCodeGenerator
76 | Resources.Designer.cs
77 |
78 |
79 | SettingsSingleFileGenerator
80 | Settings.Designer.cs
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyDocumentEdgeBarControl.cs:
--------------------------------------------------------------------------------
1 | using SolidEdgeFramework;
2 | using SolidEdgeSDK;
3 | using SolidEdgeSDK.Extensions;
4 | using SolidEdgeSDK.InteropServices;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel;
8 | using System.Drawing;
9 | using System.Data;
10 | using System.Linq;
11 | using System.Text;
12 | using System.Threading.Tasks;
13 | using System.Windows.Forms;
14 | using System.Reflection;
15 | using SolidEdgeSDK.AddIn;
16 |
17 | namespace DemoAddIn
18 | {
19 | public partial class MyDocumentEdgeBarControl : UserControl,
20 | SolidEdgeFramework.ISEDocumentEvents
21 | {
22 | private SolidEdgeFramework.SolidEdgeDocument _document;
23 |
24 | public MyDocumentEdgeBarControl()
25 | {
26 | InitializeComponent();
27 | }
28 |
29 | private void MyEdgeBarControl_Load(object sender, EventArgs e)
30 | {
31 | // Trick to use the default system font.
32 | Font = SystemFonts.MessageBoxFont;
33 |
34 | ComEventsManager = new ComEventsManager(this);
35 | }
36 |
37 | private void listView_SelectedIndexChanged(object sender, EventArgs e)
38 | {
39 | propertyGrid.SelectedObject = null;
40 |
41 | if (listView.SelectedItems.Count > 0)
42 | {
43 | var item = listView.SelectedItems[0];
44 | propertyGrid.SelectedObject = item.Tag;
45 | }
46 | }
47 |
48 | private void UpdateListView(object[] items)
49 | {
50 | listView.Items.Clear();
51 | propertyGrid.SelectedObject = null;
52 |
53 | var listViewItems = new List();
54 |
55 | for (int i = 0; i < items.Length; i++)
56 | {
57 | listViewItems.Add(new ListViewItem(new string[] { $"{i + 1}", ComObject.GetComTypeFullName(items[i]) })
58 | {
59 | Tag = items[i]
60 | });
61 | }
62 |
63 | listView.Items.AddRange(listViewItems.ToArray());
64 |
65 | foreach (ColumnHeader header in listView.Columns)
66 | {
67 | header.Width = -2;
68 | }
69 |
70 | if (listView.Items.Count > 0)
71 | {
72 | listView.Items[0].Selected = true;
73 | }
74 | }
75 |
76 | #region ISEDocumentEvents
77 |
78 | void ISEDocumentEvents.BeforeClose()
79 | {
80 | ComEventsManager.DetachAll();
81 | }
82 |
83 | void ISEDocumentEvents.BeforeSave()
84 | {
85 | }
86 |
87 | void ISEDocumentEvents.AfterSave()
88 | {
89 | }
90 |
91 | void ISEDocumentEvents.SelectSetChanged(object SelectSet)
92 | {
93 | var items = new object[] { };
94 |
95 | if (SelectSet is SolidEdgeFramework.SelectSet selectSet)
96 | {
97 | items = selectSet.OfType