├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── samples
├── README.md
└── addin
│ ├── DemoAddIn
│ └── cs
│ │ ├── DemoAddIn.WPF
│ │ ├── DemoAddIn.WPF.csproj
│ │ ├── MyWpfEdgeBarPage.xaml
│ │ ├── MyWpfEdgeBarPage.xaml.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── DemoAddIn.sln
│ │ └── DemoAddIn
│ │ ├── AboutDialog.Designer.cs
│ │ ├── AboutDialog.cs
│ │ ├── AboutDialog.resx
│ │ ├── CompileNativeRes.bat
│ │ ├── DemoAddIn.csproj
│ │ ├── Instructions.txt
│ │ ├── MyAddIn.cs
│ │ ├── MyCommands.cs
│ │ ├── MyConstants.cs
│ │ ├── MyCustomDialog.Designer.cs
│ │ ├── MyCustomDialog.cs
│ │ ├── MyCustomDialog.resx
│ │ ├── MyDocumentEdgeBarControl.Designer.cs
│ │ ├── MyDocumentEdgeBarControl.cs
│ │ ├── MyDocumentEdgeBarControl.resx
│ │ ├── MyEdgeBarPage.cs
│ │ ├── MyGlobalEdgeBarControl.Designer.cs
│ │ ├── MyGlobalEdgeBarControl.cs
│ │ ├── MyGlobalEdgeBarControl.resx
│ │ ├── MyViewOverlay3D.cs
│ │ ├── Native.rc
│ │ ├── Native.res
│ │ ├── NativeMessageEdgeBarControl.Designer.cs
│ │ ├── NativeMessageEdgeBarControl.cs
│ │ ├── NativeMessageEdgeBarControl.resx
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Resources.zh-CN.Designer.cs
│ │ └── Resources.zh-CN.resx
│ │ ├── Registration.bat
│ │ ├── packages.config
│ │ └── res
│ │ ├── BoundingBox_32.png
│ │ ├── Box_32.png
│ │ ├── Boxes_32.png
│ │ ├── Camera_32.png
│ │ ├── CommandPrompt_32.png
│ │ ├── EdgeBar_20.png
│ │ ├── Favorites_32.png
│ │ ├── Folder_16.png
│ │ ├── GdiPlus_32.png
│ │ ├── Help_32.png
│ │ ├── Monitor_16.png
│ │ ├── Notepad_32.png
│ │ ├── Photograph_32.png
│ │ ├── Printer_32.png
│ │ ├── Question_32.png
│ │ ├── Save_16.png
│ │ ├── Search_32.png
│ │ └── Tools_32.png
│ └── EmptyAddIn
│ └── cs
│ ├── EmptyAddIn.sln
│ └── EmptyAddIn
│ ├── CompileNativeRes.bat
│ ├── EmptyAddIn.csproj
│ ├── Instructions.txt
│ ├── MyAddIn.cs
│ ├── MyConstants.cs
│ ├── Native.rc
│ ├── Native.res
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
│ └── Registration.bat
├── src
├── SolidEdgeSDK.cs
└── SolidEdgeSDK.vb
└── tools
└── ResetUserSettings.bat
/.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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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.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.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.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.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/DemoAddIn/cs/DemoAddIn.WPF/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/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.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/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/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/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/AboutDialog.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/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/DemoAddIn/cs/DemoAddIn/DemoAddIn.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8692B005-B856-4452-9592-470E3EC75AAD}
8 | Library
9 | Properties
10 | DemoAddIn
11 | DemoAddIn
12 | v4.7.2
13 | 512
14 | true
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | TRACE;DEBUG
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 | Native.res
35 |
36 |
37 |
38 |
39 |
40 | ..\packages\SharpGL.3.1.1\lib\net472\SharpGL.dll
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | SolidEdgeSDK.cs
57 |
58 |
59 | Form
60 |
61 |
62 | AboutDialog.cs
63 |
64 |
65 |
66 |
67 |
68 | Form
69 |
70 |
71 | MyCustomDialog.cs
72 |
73 |
74 | UserControl
75 |
76 |
77 | MyDocumentEdgeBarControl.cs
78 |
79 |
80 |
81 | UserControl
82 |
83 |
84 | MyGlobalEdgeBarControl.cs
85 |
86 |
87 |
88 | UserControl
89 |
90 |
91 | NativeMessageEdgeBarControl.cs
92 |
93 |
94 |
95 | Resources.zh-CN.resx
96 | True
97 | True
98 |
99 |
100 | True
101 | True
102 | Resources.resx
103 |
104 |
105 |
106 |
107 | AboutDialog.cs
108 |
109 |
110 | MyCustomDialog.cs
111 |
112 |
113 | MyDocumentEdgeBarControl.cs
114 |
115 |
116 | MyGlobalEdgeBarControl.cs
117 |
118 |
119 | NativeMessageEdgeBarControl.cs
120 |
121 |
122 | ResXFileCodeGenerator
123 | Resources.zh-CN.Designer.cs
124 | Designer
125 |
126 |
127 | ResXFileCodeGenerator
128 | Resources.Designer.cs
129 | Designer
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | {3E2B3BD4-F0B9-11D1-BDFD-080036B4D502}
140 | 1
141 | 0
142 | 0
143 | tlbimp
144 | False
145 | True
146 |
147 |
148 | {C467A6F5-27ED-11D2-BE30-080036B4D502}
149 | 1
150 | 0
151 | 0
152 | tlbimp
153 | False
154 | True
155 |
156 |
157 | {3E2B3BDC-F0B9-11D1-BDFD-080036B4D502}
158 | 1
159 | 0
160 | 0
161 | tlbimp
162 | False
163 | True
164 |
165 |
166 | {8A7EFA3A-F000-11D1-BDFC-080036B4D502}
167 | 1
168 | 0
169 | 0
170 | tlbimp
171 | False
172 | True
173 |
174 |
175 | {943AC5C6-F4DB-11D1-BE00-080036B4D502}
176 | 1
177 | 0
178 | 0
179 | tlbimp
180 | False
181 | True
182 |
183 |
184 | {3E2B3BE1-F0B9-11D1-BDFD-080036B4D502}
185 | 1
186 | 0
187 | 0
188 | tlbimp
189 | False
190 | True
191 |
192 |
193 | {8A7EFA42-F000-11D1-BDFC-080036B4D502}
194 | 1
195 | 0
196 | 0
197 | tlbimp
198 | False
199 | True
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | {3daad612-153d-4549-8e4c-5ae5e1ffdf1a}
208 | DemoAddIn.WPF
209 |
210 |
211 |
212 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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/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/DemoAddIn/cs/DemoAddIn/MyCustomDialog.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/samples/addin/DemoAddIn/cs/DemoAddIn/MyDocumentEdgeBarControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoAddIn
2 | {
3 | partial class MyDocumentEdgeBarControl
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.propertyGrid = new System.Windows.Forms.PropertyGrid();
32 | this.listView = new System.Windows.Forms.ListView();
33 | this.splitContainer = new System.Windows.Forms.SplitContainer();
34 | this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
35 | this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
36 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
37 | this.splitContainer.Panel1.SuspendLayout();
38 | this.splitContainer.Panel2.SuspendLayout();
39 | this.splitContainer.SuspendLayout();
40 | this.SuspendLayout();
41 | //
42 | // propertyGrid
43 | //
44 | this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
45 | this.propertyGrid.Location = new System.Drawing.Point(0, 0);
46 | this.propertyGrid.Name = "propertyGrid";
47 | this.propertyGrid.Size = new System.Drawing.Size(601, 476);
48 | this.propertyGrid.TabIndex = 0;
49 | //
50 | // listView
51 | //
52 | this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
53 | this.columnHeader1,
54 | this.columnHeader2});
55 | this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
56 | this.listView.FullRowSelect = true;
57 | this.listView.Location = new System.Drawing.Point(0, 0);
58 | this.listView.MultiSelect = false;
59 | this.listView.Name = "listView";
60 | this.listView.Size = new System.Drawing.Size(601, 234);
61 | this.listView.TabIndex = 1;
62 | this.listView.UseCompatibleStateImageBehavior = false;
63 | this.listView.View = System.Windows.Forms.View.Details;
64 | this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
65 | //
66 | // splitContainer
67 | //
68 | this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
69 | this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
70 | this.splitContainer.Location = new System.Drawing.Point(0, 0);
71 | this.splitContainer.Name = "splitContainer";
72 | this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
73 | //
74 | // splitContainer.Panel1
75 | //
76 | this.splitContainer.Panel1.Controls.Add(this.listView);
77 | //
78 | // splitContainer.Panel2
79 | //
80 | this.splitContainer.Panel2.Controls.Add(this.propertyGrid);
81 | this.splitContainer.Size = new System.Drawing.Size(601, 714);
82 | this.splitContainer.SplitterDistance = 234;
83 | this.splitContainer.TabIndex = 2;
84 | //
85 | // columnHeader1
86 | //
87 | this.columnHeader1.Text = "Index";
88 | this.columnHeader1.Width = 116;
89 | //
90 | // columnHeader2
91 | //
92 | this.columnHeader2.Text = "Type";
93 | this.columnHeader2.Width = 167;
94 | //
95 | // MyDocumentEdgeBarControl
96 | //
97 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
98 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
99 | this.Controls.Add(this.splitContainer);
100 | this.Name = "MyDocumentEdgeBarControl";
101 | this.Size = new System.Drawing.Size(601, 714);
102 | this.Load += new System.EventHandler(this.MyEdgeBarControl_Load);
103 | this.splitContainer.Panel1.ResumeLayout(false);
104 | this.splitContainer.Panel2.ResumeLayout(false);
105 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
106 | this.splitContainer.ResumeLayout(false);
107 | this.ResumeLayout(false);
108 |
109 | }
110 |
111 | #endregion
112 |
113 | private System.Windows.Forms.PropertyGrid propertyGrid;
114 | private System.Windows.Forms.ListView listView;
115 | private System.Windows.Forms.SplitContainer splitContainer;
116 | private System.Windows.Forms.ColumnHeader columnHeader1;
117 | private System.Windows.Forms.ColumnHeader columnHeader2;
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/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