├── .gitignore ├── Contribute.md ├── LICENSE.txt ├── README.md ├── addin-drilling-automation ├── Drilling Automation.sln ├── Drilling Automation.vb ├── Drilling Automation.vbproj ├── Drilling Automation │ ├── Drilling Automation.csproj │ ├── DrillingAutomation.cs │ ├── DrillingAutomationInstaller.Designer.cs │ ├── DrillingAutomationInstaller.cs │ ├── DrillingAutomationPaneWPF.xaml │ ├── DrillingAutomationPaneWPF.xaml.cs │ ├── Icons │ │ ├── Add_32x32.ico │ │ ├── Del_32x32.ico │ │ ├── Icon.ico │ │ └── Open - File Browser 32x32.ico │ ├── Options.Designer.cs │ ├── Options.cs │ ├── Options.resx │ ├── PowerMILLAutomation.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Resources │ │ └── Open - File Browser 32x32.ico │ ├── TagHoles.cs │ ├── bin │ │ └── Debug │ │ │ ├── CreateList.mac │ │ │ ├── EndOfTagging.mac │ │ │ ├── ImportMethod.mac │ │ │ ├── ImportToolpath.mac │ │ │ └── Rename.mac │ └── packages.config ├── DrillingAutomationInstaller │ └── DrillingAutomationInstaller.vdproj ├── Icon.ico ├── Icon.png ├── My Project │ ├── Application.Designer.vb │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Resources.Designer.vb │ ├── Resources.resx │ ├── Settings.Designer.vb │ └── Settings.settings ├── Open - File Browser 32x32.ico ├── README.md ├── UpgradeLog.htm ├── install.bat └── uninstall.bat ├── addin-excel-setup-sheet ├── .gitattributes ├── .gitignore ├── Help Files │ ├── PowerMILL Excel SetupSheet.docx │ ├── PowerMILL Excel SetupSheet.pdf │ ├── Tool_List.xlsx │ ├── Toolpath_List-Complete.xlsx │ └── Toolpath_List.xlsx ├── SetupSheet.sln └── SetupSheet │ ├── Icons │ ├── Add_32x32.ico │ ├── Del_32x32.ico │ ├── Icon_24.ico │ ├── Icon_32.ico │ ├── Icon_48.ico │ └── Open - File Browser 32x32.ico │ ├── Options.Designer.cs │ ├── Options.cs │ ├── Options.resx │ ├── PowerMILLAutomation.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx │ ├── Resources │ └── Open - File Browser 32x32.ico │ ├── SetupSheet.csproj │ ├── ToolSheet.cs │ ├── ToolSheetPaneWPF.xaml │ ├── ToolSheetPaneWPF.xaml.cs │ └── WriteFiles.cs └── addin-powermill-to-vericut ├── .gitignore ├── PowerMILLExporter ├── ClassDiagram1.cd ├── EventLogger.cs ├── MainModule.cs ├── Messages.cs ├── PowerMILLAutomation.cs ├── PowerMILLExporter.csproj ├── Properties │ └── AssemblyInfo.cs ├── Tools │ ├── 2DTool.cs │ ├── ATP5Mill.cs │ ├── DrillingTool.cs │ ├── MillingTool.cs │ ├── NCProgramTool.cs │ ├── SpecialMill.cs │ ├── TapTool.cs │ ├── TaperSpherical.cs │ ├── TaperedTipped.cs │ ├── Tool.cs │ ├── Tools.cs │ └── TopAndSideMill.cs └── Utilities.cs ├── PowerMILLVERICUTInterfacePlugin.sln ├── PowerMILLVERICUTInterfacePlugin ├── ClassDiagram2.cd ├── ExportData.cs ├── Forms.cd ├── Forms │ ├── VericutPaneWPF.xaml │ └── VericutPaneWPF.xaml.cs ├── Icons.Designer.cs ├── Icons.resx ├── Images │ ├── Logo24_1.png │ ├── Logo32_1.png │ ├── Logo48_1.png │ ├── delete.png │ └── file_open.png ├── PaneDefinition.cs ├── PluginSettings.cs ├── PowerMILLAutomation.cs ├── PowerMILLPlugin.cs ├── PowerMILLVERICUTInterfacePlugin.csproj ├── ProjectData.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources.cd ├── SetupFormData.cs ├── VericutMachineReader.cs └── WriteTools.cs └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | # Temp files 4 | *~ 5 | 6 | # Output files 7 | **/bin/* 8 | **/obj/* 9 | Setups/* 10 | 11 | # Visual studio files 12 | *.suo 13 | 14 | # VS code files 15 | */.vs/* 16 | -------------------------------------------------------------------------------- /Contribute.md: -------------------------------------------------------------------------------- 1 | # Contributing to PowerMill API Examples 2 | 3 | The PowerMill team will consider contributions to these example plugins in accordance with the guidelines below. 4 | 5 | ## Contributing code 6 | 7 | To contribute fixes or enhancements to these plugin examples, please: 8 | 9 | 1. Submit a pull request which clearly describes the purpose of the code change. 10 | - What is the issue and how it is fixed? 11 | - What is the new feature and how is it used? 12 | 2. Follow the coding style that is already used in the source code. 13 | 3. Describe how you have tested the changes. 14 | 4. Include a screenshot showing changes to the UI, if any. 15 | 5. The PowerMill team will review requests in the order they are received. 16 | 4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or perhaps taken over by someone on the team. 17 | 18 | ## Contribution "Bar" 19 | 20 | The PowerMill team will merge changes that fix bugs or enhance the ability of other users to use these plugins as templates for extending these interfaces or creating new ones. 21 | 22 | The PowerMill team will not merge changes that have narrowly-defined benefits, nor will large enhancements be merged. This is because we do not maintain current copies of the target software (Vericut) and have no way to verify the changes. 23 | 24 | Note that the plugins that are currently distributed with the PowerMill product are built from a separate copy of this source. Contributions may or may not be merged back into the source for the plugins distributed with PowerMill. 25 | 26 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2018 Autodesk 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PowerMill API Examples 2 | Welcome to the Autodesk PowerMill API Examples repository. This repo provides the source code for advanced plugins which are included with the PowerMill application only in compiled form or not included directly at all. These plugins are translators that use the PowerMill API to export data from PowerMill to third party applications such as Vericut. 3 | 4 | The PowerMill development team is not actively maintaining or enhancing these plugins. The source code is being made available to third parties who would like to do their own enhancements, or who would like to use these examples as templates for creating interfaces to other products. Contributions to this repo will be reviewed and considered for inclusion (see below), but please be aware that these plugins have low development priority. 5 | 6 | To learn more about PowerMill, visit the forum [here](https://forums.autodesk.com/t5/powermill-forum/bd-p/280) or the product website [here](https://www.autodesk.com/products/powermill/overview). 7 | 8 | The repository for the PowerMill API Examples is hosted at: 9 | https://github.com/Autodesk/powermill-api-examples 10 | 11 | To Contribute please see [Contribute.md](Contribute.md). 12 | 13 | The extension is distributed under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt). 14 | 15 | ## Building the Plugins 16 | 17 | There are just a few simple steps for building one of these plugins: 18 | 19 | 1. Clone the repository. 20 | 2. For the plugin you want to build, open the solution in Visual Studio. 21 | 3. Obtain dependencies (you will need `PowerMill.dll`, `PluginFramework.dll` and possibly others detailed in the specific README). 22 | 4. Build. 23 | 24 | The plugins may have more specific instructions in their README. 25 | 26 | ### Generating `PowerMill.dll` 27 | 28 | The plugins will require that you generate `PowerMill.dll`, which contains the interface that they need to communicate with PowerMill. The specific README will contain instructions of what to do with this. 29 | 30 | To generate `PowerMill.dll` follow these instructions: 31 | 32 | - Using a command window run as administrator, move to the PowerMill executable directory. e.g. 33 | ``` 34 | cd "C:\Program Files\Autodesk\PowerMill 2019\sys\exec64" 35 | ``` 36 | - Add the Microsoft SDK tools to the PATH variable if it's not already present (the exact path will different if you're not using .NET 4.0): 37 | ``` 38 | SET PATH=%PATH%;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ 39 | ``` 40 | - Generate a strong name key file using the strong name tool sn.exe: 41 | ``` 42 | sn.exe -k key_pair.snk 43 | ``` 44 | - Create the DLL from the type library using the `/keyfile` and `/asmversion` options (use the correct version number for the version of PowerMILL that's installed) e.g. 45 | ``` 46 | tlbimp.exe pmill.exe /keyfile:key_pair.snk /asmversion:2019.1.6 47 | ``` 48 | - The output file is called `PowerMILL.dll` as no output file was specified. 49 | 50 | ### Finding `PluginFramework.dll` 51 | 52 | `PluginFramework.dll` is included in each install of PowerMill. It is found at 53 | ``` 54 | \file\plugins\framework\PluginFramework40\bin\Release 55 | ``` 56 | e.g. 57 | ``` 58 | C:\Program Files\Autodesk\PowerMill 2019\file\plugins\framework\PluginFramework40\bin\Release 59 | ``` 60 | 61 | ## Running a Plugin 62 | To run the plugin within PowerMill, you must COM register it using `regasm.exe`. 63 | 64 | ### Registering the COM component 65 | 66 | To register the plugin, open a command window run as administrator, navigate to the directory containing the plugin DLL (typically in the 'bin' directory), and use: 67 | 68 | ``` 69 | C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\regasm.exe .dll /register /codebase 70 | ``` 71 | 72 | Note: This will issue a warning about the `/codebase` option being used not in conjunction with a strong named assembly. It is safe to ignore this warning, although giving your assembly a strong name will prevent the warning. 73 | 74 | ### Making the Plugin Accessible to PowerMill 75 | 76 | Find the GUID above the class that implments PowerMILL.IPowerMILLPlugin. Each plugin must use a different GUID. 77 | 78 | In a command window run as administrator: 79 | 80 | ``` 81 | reg.exe ADD "HKCR\CLSID\{AFBB4C14-BD94-4692-98DE-645609C1B033}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:64 /f 82 | ``` 83 | 84 | Replacing `AFBB4C14-BD94-4692-98DE-645609C1B033` with the GUID of the plugin class. 85 | 86 | ### Running the Plugin 87 | 88 | After registering your plugin, you will be able to access it from within PowerMill by following these steps. 89 | 90 | - Run PowerMill 91 | - Press the "File" button on the top left of the ribbon. 92 | - Open the Plugin Manager form, by going to "Options/Manage Installed Plugins" 93 | - Select your plugin in the list, and select Enable. 94 | - Your plugin should now have a green status icon, and be enabled. 95 | 96 | ## Further Documentation 97 | Additional documentation can be found by navigating to 'file\plugins\documentation' within your PowerMill install directory. 98 | 99 | ## Contributions 100 | In order to clarify the intellectual property license granted with Contributions from any person or entity, Autodesk must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor to this Open Source Project (the “Project”), indicating agreement to the license terms. This license is for your protection as a Contributor to the Project as well as the protection of Autodesk and the other Project users; it does not change your rights to use your own Contributions for any other purpose. There is no need to fill out the agreement until you actually have a contribution ready. Once you have a contribution you simply fill out and sign the applicable agreement (see the contributor folder in the repository) and send it to us at the address in the agreement. 101 | 102 | ## Trademarks 103 | 104 | The license does not grant permission to use the trade names, trademarks, service marks, or product names of Autodesk, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of any notice file. Autodesk, the Autodesk logo, Inventor HSM, HSMWorks, HSMXpress, Fusion 360, PowerMill, PartMarker, and PowerMILL are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk is not responsible for typographical or graphical errors that may appear in this document. 105 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2020 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Drilling Automation", "Drilling Automation\Drilling Automation.csproj", "{23106269-E38A-4A25-90D2-8E294244AD39}" 7 | EndProject 8 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "DrillingAutomationInstaller", "DrillingAutomationInstaller\DrillingAutomationInstaller.vdproj", "{A18D615A-E76A-43DB-847A-6FBFBA50B031}" 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 | {23106269-E38A-4A25-90D2-8E294244AD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {23106269-E38A-4A25-90D2-8E294244AD39}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {23106269-E38A-4A25-90D2-8E294244AD39}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {23106269-E38A-4A25-90D2-8E294244AD39}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {A18D615A-E76A-43DB-847A-6FBFBA50B031}.Debug|Any CPU.ActiveCfg = Debug 21 | {A18D615A-E76A-43DB-847A-6FBFBA50B031}.Release|Any CPU.ActiveCfg = Release 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | GlobalSection(ExtensibilityGlobals) = postSolution 27 | SolutionGuid = {D5AD1A13-3786-40B4-A4E7-99260797393A} 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation.vb: -------------------------------------------------------------------------------- 1 | Imports PowerMILL_Plugin = PowerMILL.IPowerMILLPlugin 2 | Imports System.Runtime.InteropServices 3 | 4 | 5 | 6 | 7 | Public Class Setupsheet 8 | 9 | 10 | End Class 11 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {BB78A7AD-074F-4EFB-90DD-A71A4F8289EE} 8 | Library 9 | Setupsheet 10 | Setupsheet 11 | 512 12 | Windows 13 | v4.6.1 14 | 15 | 16 | true 17 | full 18 | true 19 | true 20 | bin\Debug\ 21 | Setupsheet.xml 22 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 23 | 24 | 25 | pdbonly 26 | false 27 | true 28 | true 29 | bin\Release\ 30 | Setupsheet.xml 31 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 32 | 33 | 34 | On 35 | 36 | 37 | Binary 38 | 39 | 40 | Off 41 | 42 | 43 | On 44 | 45 | 46 | 47 | bin\Debug\PowerMILL.dll 48 | True 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | True 75 | Application.myapp 76 | 77 | 78 | True 79 | True 80 | Resources.resx 81 | 82 | 83 | True 84 | Settings.settings 85 | True 86 | 87 | 88 | 89 | 90 | VbMyResourcesResXFileCodeGenerator 91 | Resources.Designer.vb 92 | My.Resources 93 | Designer 94 | 95 | 96 | 97 | 98 | MyApplicationCodeGenerator 99 | Application.Designer.vb 100 | 101 | 102 | SettingsSingleFileGenerator 103 | My 104 | Settings.Designer.vb 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/DrillingAutomation.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | 10 | using System; 11 | using System.Collections.Generic; 12 | using System.Linq; 13 | using System.Text; 14 | using System.Threading.Tasks; 15 | using PowerMILL; 16 | using System.Runtime.InteropServices; 17 | using System.Windows.Forms; 18 | using System.Windows.Interop; 19 | using Delcam.Plugins.Framework; 20 | using System.Text.RegularExpressions; 21 | using Delcam.Plugins.Localisation; 22 | 23 | namespace DrillingAutomation 24 | { 25 | [Guid("7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2")] 26 | [ClassInterface(ClassInterfaceType.None)] 27 | [ComVisible(true)] 28 | 29 | public class DrillingAutomation_Plugin : PluginFrameworkWithPanes, 30 | PowerMILL.IPowerMILLPluginPane, 31 | Delcam.Plugins.Framework.IPluginCommunicationsInterface 32 | 33 | { 34 | public override string PluginName { get { return "Drilling Automation"; } } 35 | public override string PluginAuthor { get { return "Autodesk"; } } 36 | public override string PluginDescription { get { return "Automate drilling"; } } 37 | public override string PluginIconPath { get { return "Icons/Icon.ico"; } } 38 | public override Version PluginVersion { get { return new Version(1, 0, 14); } } 39 | public override Version PowerMILLVersion { get { return new Version(2019, 0); } } 40 | public override bool PluginHasOptions { get { return true; } } 41 | 42 | public override void DisplayOptionsForm() 43 | { 44 | base.DisplayOptionsForm(); 45 | Options OptionForm = new Options(); 46 | OptionForm.Show(); 47 | } 48 | public override string PluginAssemblyName { get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; } } 49 | public override Guid PluginGuid { get { return new Guid("7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2"); } } 50 | 51 | private DrillingAutomation.DrillingAutomationPaneWPF oDrillingAutomationPaneWPF; 52 | public override void setup_framework(string token, PluginServices services, int parent_window_hwnd) 53 | { 54 | base.setup_framework(token, services, parent_window_hwnd); 55 | } 56 | 57 | protected override void register_panes() 58 | { 59 | // create the plugin pane 60 | oDrillingAutomationPaneWPF = new DrillingAutomation.DrillingAutomationPaneWPF(this); 61 | register_pane(new PaneDefinition(oDrillingAutomationPaneWPF, 540, 295, "Drilling Automation", "Icons/Icon.ico")); 62 | } 63 | 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/DrillingAutomationInstaller.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DrillingAutomation 2 | { 3 | partial class DrillingAutomationInstaller 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 | components = new System.ComponentModel.Container(); 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/DrillingAutomationInstaller.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | 10 | 11 | using System; 12 | using System.Collections; 13 | using System.Collections.Generic; 14 | using System.ComponentModel; 15 | using System.Configuration.Install; 16 | using System.Linq; 17 | using System.Threading.Tasks; 18 | using System.IO; 19 | using System.Runtime.InteropServices; 20 | using System.Reflection; 21 | using System.Diagnostics; 22 | 23 | namespace DrillingAutomation 24 | { 25 | [RunInstaller(true)] 26 | public partial class DrillingAutomationInstaller : System.Configuration.Install.Installer 27 | { 28 | public DrillingAutomationInstaller() 29 | { 30 | InitializeComponent(); 31 | } 32 | public override void Install(IDictionary stateSaver) 33 | { 34 | base.Install(stateSaver); 35 | // Register the .NET assembly 36 | RegAsm("/codebase"); 37 | 38 | // Register the plugin component category 39 | RegisterCOMCategory(true); 40 | } 41 | public override void Uninstall(IDictionary savedState) 42 | { 43 | base.Uninstall(savedState); 44 | 45 | // Unregister the plugin component category 46 | RegisterCOMCategory(false); 47 | 48 | // Unregister the .NET assembly 49 | RegAsm("/u"); 50 | } 51 | private static void RegAsm(string parameters) 52 | { 53 | // RuntimeEnvironment.GetRuntimeDirectory() returns something like 54 | // C:\Windows\Microsoft.NET\Framework64\v2.0.50727\ 55 | // But we only want the "C:\Windows\Microsoft.NET" part 56 | string net_base = Path.GetFullPath(Path.Combine( 57 | RuntimeEnvironment.GetRuntimeDirectory(), @"..\..")); 58 | // Create paths to 32bit and 64bit versions of regasm.exe 59 | string[] to_exec = new[] 60 | { 61 | string.Concat(net_base, "\\Framework\\", 62 | RuntimeEnvironment.GetSystemVersion(), "\\regasm.exe"), 63 | string.Concat(net_base, "\\Framework64\\", 64 | RuntimeEnvironment.GetSystemVersion(), "\\regasm.exe") 65 | }; 66 | // Get the path to the plugin's location 67 | var dll_path = Assembly.GetExecutingAssembly().Location; 68 | foreach (string path in to_exec) 69 | { 70 | // Skip the executables that do not exist; This most likely happens on 71 | // a 32bit machine when processing the path to 64bit regasm 72 | if (!File.Exists(path)) continue; 73 | // Build the argument string 74 | string args = string.Format("\"{0}\" {1}", dll_path, parameters); 75 | // Launch the regasm.exe process 76 | LaunchProcess(path, args); 77 | } 78 | } 79 | 80 | private static void LaunchProcess(string path, string arguments) 81 | { 82 | // Create a new process object, and setup its startup structure 83 | Process process = new Process 84 | { 85 | StartInfo = 86 | { 87 | CreateNoWindow = true, 88 | ErrorDialog = false, 89 | UseShellExecute = false, 90 | FileName = path, 91 | Arguments = arguments 92 | } 93 | }; 94 | // Start the process, and wait for it to terminate 95 | using (process) 96 | { 97 | process.Start(); 98 | process.WaitForExit(); 99 | } 100 | } 101 | 102 | static string plugin_guid = "{7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2}"; 103 | static string plugin_comp_category = "{311B0135-1826-4A8C-98DE-F313289F815E}"; 104 | private static void RegisterCOMCategory(bool register) 105 | { 106 | // Build the registry key we wish to add 107 | string reg_key = "HKCR\\CLSID\\" + plugin_guid + 108 | "\\Implemented Categories\\" + plugin_comp_category; 109 | // Build the path 110 | string path = Environment.SystemDirectory + "\\reg.exe"; 111 | // Loop over the platforms we wish to add the key to 112 | string[] platforms = new[] { "32", "64" }; 113 | foreach (string platform in platforms) 114 | { 115 | // Build the arguments 116 | string args = (register) ? "ADD" : "DELETE"; 117 | args += " \"" + reg_key + "\" /reg:" + platform + " /f"; 118 | // Launch the reg.exe process 119 | LaunchProcess(path, args); 120 | } 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/Icons/Add_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Drilling Automation/Icons/Add_32x32.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/Icons/Del_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Drilling Automation/Icons/Del_32x32.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/Icons/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Drilling Automation/Icons/Icon.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/Icons/Open - File Browser 32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Drilling Automation/Icons/Open - File Browser 32x32.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/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("Drilling Automation")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Drilling Automation")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 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("23106269-e38a-4a25-90d2-8e294244ad39")] 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.14.0")] 36 | [assembly: AssemblyFileVersion("1.0.14.0")] 37 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/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 DrillingAutomation.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", "15.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("DrillingAutomation.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 resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Open___File_Browser_32x32 { 67 | get { 68 | object obj = ResourceManager.GetObject("Open - File Browser 32x32", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/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 | 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 | 121 | 122 | ..\Resources\Open - File Browser 32x32.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/Resources/Open - File Browser 32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Drilling Automation/Resources/Open - File Browser 32x32.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/bin/Debug/CreateList.mac: -------------------------------------------------------------------------------- 1 | // Creates a list of each hole found in the current featureset and saves 2 | // their names to a text file. This is executed before toolpaths are imported. 3 | 4 | STRING $path = project_pathname(0) 5 | $path = $path + "\HoleNames.txt" 6 | FILE OPEN $path FOR WRITE AS outputfile 7 | FOREACH $feature IN components($entity('featureset','')) { 8 | FILE WRITE $feature.name TO outputfile 9 | } 10 | FILE CLOSE outputfile 11 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/bin/Debug/EndOfTagging.mac: -------------------------------------------------------------------------------- 1 | // Add any commands you would like to launch once. Called at the end of 2 | // the tagging section. 3 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/bin/Debug/ImportMethod.mac: -------------------------------------------------------------------------------- 1 | // Called just after a drilling method is imported but before it's calculated. 2 | // Additional customization can be added here. 3 | 4 | EDIT TOOLPATH SAFEAREA TYPE PLANE 5 | EDIT TOOLPATH SAFEAREA WORKPLANE TOOLPATH_WORKPLANE 6 | EDIT TOOLPATH SAFEAREA MEASURE_FROM BLOCK_AND_MODEL 7 | EDIT PAR 'Rapid.CalculateDimensions.RapidClearance' "0.6" 8 | EDIT PAR 'Rapid.CalculateDimensions.PlungeClearance' "0.1" 9 | EDIT TOOLPATH SAFEAREA CALCULATE_DIMENSIONS 10 | EDIT PAR 'Connections.Link[0].Type' 'safe' 11 | EDIT PAR 'Connections.Link[1].Type' 'safe' 12 | EDIT PAR 'Connections.DefaultLink[0].Type' 'safe' 13 | PROCESS TPLEADS 14 | LEADS ACCEPT 15 | 16 | EDIT METHOD APPLY 17 | METHOD CANCEL 18 | TEXTINFO ACCEPT 19 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/bin/Debug/ImportToolpath.mac: -------------------------------------------------------------------------------- 1 | // Add your custom code to apply to each toolpath before it is calculated. 2 | // Called just after the toolpath is imported. 3 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/bin/Debug/Rename.mac: -------------------------------------------------------------------------------- 1 | // Rename every hole of a featureset to a known name before tagging them. 2 | // The holes of a featureset must have known names for the plugin to be 3 | // able to interact with them. 4 | // 5 | // This macro should not be used for customization as editing it may break 6 | // the plugin. 7 | 8 | int $Counter = 1 9 | $Counter = 1 10 | FOREACH $feature IN components($entity('featureset','')) { 11 | EDIT FEATURESET ; RENAME $feature.name ${"T" + $Counter} 12 | $Counter = $Counter + 1 13 | } 14 | -------------------------------------------------------------------------------- /addin-drilling-automation/Drilling Automation/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /addin-drilling-automation/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Icon.ico -------------------------------------------------------------------------------- /addin-drilling-automation/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Icon.png -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 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 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | false 4 | false 5 | 0 6 | true 7 | 0 8 | 1 9 | true 10 | 11 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports 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 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 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 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My.Resources 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 | ''' 22 | ''' A strongly-typed resource class, for looking up localized strings, etc. 23 | ''' 24 | _ 28 | Friend Module Resources 29 | 30 | Private resourceMan As Global.System.Resources.ResourceManager 31 | 32 | Private resourceCulture As Global.System.Globalization.CultureInfo 33 | 34 | ''' 35 | ''' Returns the cached ResourceManager instance used by this class. 36 | ''' 37 | _ 38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 39 | Get 40 | If Object.ReferenceEquals(resourceMan, Nothing) Then 41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Setupsheet.Resources", GetType(Resources).Assembly) 42 | resourceMan = temp 43 | End If 44 | Return resourceMan 45 | End Get 46 | End Property 47 | 48 | ''' 49 | ''' Overrides the current thread's CurrentUICulture property for all 50 | ''' resource lookups using this strongly typed resource class. 51 | ''' 52 | _ 53 | Friend Property Culture() As Global.System.Globalization.CultureInfo 54 | Get 55 | Return resourceCulture 56 | End Get 57 | Set(ByVal value As Global.System.Globalization.CultureInfo) 58 | resourceCulture = value 59 | End Set 60 | End Property 61 | End Module 62 | End Namespace 63 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/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 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 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 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.Setupsheet.My.MySettings 68 | Get 69 | Return Global.Setupsheet.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /addin-drilling-automation/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /addin-drilling-automation/Open - File Browser 32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/Open - File Browser 32x32.ico -------------------------------------------------------------------------------- /addin-drilling-automation/README.md: -------------------------------------------------------------------------------- 1 | # Drilling Automation Plugin 2 | Addin for PowerMill creates a database of hole shapes to allow an automatic renaming of holes to then apply specific toolpaths to them. 3 | 4 | # Setup 5 | To set this up for development you will need: 6 | 7 | - `PowerMill.dll`, this can be generated as described in the main repositories [README](/README.md). 8 | - `PluginFramework.dll`, this is found in a PowerMill installation, as documented in the main repositories [README](/README.md). 9 | 10 | # Developing 11 | Once you have built the DrillingAutomationPlugin solution, follow the instructions Running the Plugins in the main repository's [README](/README.md). 12 | -------------------------------------------------------------------------------- /addin-drilling-automation/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-drilling-automation/UpgradeLog.htm -------------------------------------------------------------------------------- /addin-drilling-automation/install.bat: -------------------------------------------------------------------------------- 1 | cd C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ 2 | regasm.exe "C:\Users\greniem\Delcam\PowerMILL\Macros\Drilling Automation\Drilling Automation\bin\Debug\DrillingAutomation.dll" /register /codebase 3 | REG ADD "HKCR\CLSID\{7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:32 /f 4 | REG ADD "HKCR\CLSID\{7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:64 /f 5 | 6 | -------------------------------------------------------------------------------- /addin-drilling-automation/uninstall.bat: -------------------------------------------------------------------------------- 1 | cd C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ 2 | regasm.exe "C:\Users\greniem\Delcam\PowerMILL\Macros\Drilling Automation\Drilling Automation\bin\Debug\DrillingAutomation.dll" /register /codebase 3 | REG DELETE "HKCR\CLSID\{7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:32 /f 4 | REG DELETE "HKCR\CLSID\{7893D42C-0A4D-44E4-9B06-8C9E2E8F2BE2}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:64 /f -------------------------------------------------------------------------------- /addin-excel-setup-sheet/.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 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /addin-excel-setup-sheet/Help Files/PowerMILL Excel SetupSheet.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/Help Files/PowerMILL Excel SetupSheet.docx -------------------------------------------------------------------------------- /addin-excel-setup-sheet/Help Files/PowerMILL Excel SetupSheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/Help Files/PowerMILL Excel SetupSheet.pdf -------------------------------------------------------------------------------- /addin-excel-setup-sheet/Help Files/Tool_List.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/Help Files/Tool_List.xlsx -------------------------------------------------------------------------------- /addin-excel-setup-sheet/Help Files/Toolpath_List-Complete.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/Help Files/Toolpath_List-Complete.xlsx -------------------------------------------------------------------------------- /addin-excel-setup-sheet/Help Files/Toolpath_List.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/Help Files/Toolpath_List.xlsx -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2020 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SetupSheet", "SetupSheet\SetupSheet.csproj", "{23106269-E38A-4A25-90D2-8E294244AD39}" 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 | {23106269-E38A-4A25-90D2-8E294244AD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {23106269-E38A-4A25-90D2-8E294244AD39}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {23106269-E38A-4A25-90D2-8E294244AD39}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {23106269-E38A-4A25-90D2-8E294244AD39}.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 = {D5AD1A13-3786-40B4-A4E7-99260797393A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Add_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Add_32x32.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Del_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Del_32x32.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Icon_24.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Icon_24.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Icon_32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Icon_32.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Icon_48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Icon_48.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Icons/Open - File Browser 32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Icons/Open - File Browser 32x32.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Options.Designer.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2019 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | namespace SetupSheet 9 | { 10 | partial class Options 11 | { 12 | /// 13 | /// Required designer variable. 14 | /// 15 | private System.ComponentModel.IContainer components = null; 16 | 17 | /// 18 | /// Clean up any resources being used. 19 | /// 20 | /// true if managed resources should be disposed; otherwise, false. 21 | protected override void Dispose(bool disposing) 22 | { 23 | if (disposing && (components != null)) 24 | { 25 | components.Dispose(); 26 | } 27 | base.Dispose(disposing); 28 | } 29 | 30 | #region Windows Form Designer generated code 31 | 32 | /// 33 | /// Required method for Designer support - do not modify 34 | /// the contents of this method with the code editor. 35 | /// 36 | private void InitializeComponent() 37 | { 38 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Options)); 39 | this.OK = new System.Windows.Forms.Button(); 40 | this.TemplateLBL = new System.Windows.Forms.Label(); 41 | this.Template = new System.Windows.Forms.TextBox(); 42 | this.Browse = new System.Windows.Forms.Button(); 43 | this.BrowseTemplate = new System.Windows.Forms.OpenFileDialog(); 44 | this.Cancel = new System.Windows.Forms.Button(); 45 | this.SuspendLayout(); 46 | // 47 | // OK 48 | // 49 | this.OK.Location = new System.Drawing.Point(525, 54); 50 | this.OK.Name = "OK"; 51 | this.OK.Size = new System.Drawing.Size(62, 25); 52 | this.OK.TabIndex = 0; 53 | this.OK.Text = "OK"; 54 | this.OK.UseVisualStyleBackColor = true; 55 | this.OK.Click += new System.EventHandler(this.OK_Click); 56 | // 57 | // TemplateLBL 58 | // 59 | this.TemplateLBL.AutoSize = true; 60 | this.TemplateLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 61 | this.TemplateLBL.Location = new System.Drawing.Point(12, 13); 62 | this.TemplateLBL.Name = "TemplateLBL"; 63 | this.TemplateLBL.Size = new System.Drawing.Size(79, 20); 64 | this.TemplateLBL.TabIndex = 1; 65 | this.TemplateLBL.Text = "Template:"; 66 | // 67 | // Template 68 | // 69 | this.Template.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 70 | this.Template.Location = new System.Drawing.Point(94, 10); 71 | this.Template.Name = "Template"; 72 | this.Template.ReadOnly = true; 73 | this.Template.Size = new System.Drawing.Size(451, 26); 74 | this.Template.TabIndex = 2; 75 | // 76 | // Browse 77 | // 78 | this.Browse.BackColor = System.Drawing.SystemColors.Control; 79 | this.Browse.BackgroundImage = global::SetupSheet.Properties.Resources.Open___File_Browser_32x32; 80 | this.Browse.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; 81 | this.Browse.Location = new System.Drawing.Point(551, 6); 82 | this.Browse.Name = "Browse"; 83 | this.Browse.Size = new System.Drawing.Size(34, 34); 84 | this.Browse.TabIndex = 3; 85 | this.Browse.UseVisualStyleBackColor = false; 86 | this.Browse.Click += new System.EventHandler(this.Browse_Click); 87 | // 88 | // BrowseTemplate 89 | // 90 | this.BrowseTemplate.FileName = "BrowseTemplate"; 91 | // 92 | // Cancel 93 | // 94 | this.Cancel.Location = new System.Drawing.Point(454, 55); 95 | this.Cancel.Name = "Cancel"; 96 | this.Cancel.Size = new System.Drawing.Size(56, 23); 97 | this.Cancel.TabIndex = 4; 98 | this.Cancel.Text = "Cancel"; 99 | this.Cancel.UseVisualStyleBackColor = true; 100 | this.Cancel.Click += new System.EventHandler(this.Cancel_Click); 101 | // 102 | // Options 103 | // 104 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 105 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 106 | this.ClientSize = new System.Drawing.Size(599, 89); 107 | this.Controls.Add(this.Cancel); 108 | this.Controls.Add(this.Browse); 109 | this.Controls.Add(this.Template); 110 | this.Controls.Add(this.TemplateLBL); 111 | this.Controls.Add(this.OK); 112 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 113 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 114 | this.Name = "Options"; 115 | this.Text = "Options"; 116 | this.ResumeLayout(false); 117 | this.PerformLayout(); 118 | 119 | } 120 | 121 | #endregion 122 | 123 | private System.Windows.Forms.Button OK; 124 | private System.Windows.Forms.Label TemplateLBL; 125 | private System.Windows.Forms.TextBox Template; 126 | private System.Windows.Forms.Button Browse; 127 | private System.Windows.Forms.OpenFileDialog BrowseTemplate; 128 | private System.Windows.Forms.Button Cancel; 129 | } 130 | } -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Options.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2019 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.IO; 11 | using System.Collections.Generic; 12 | using System.ComponentModel; 13 | using System.Data; 14 | using System.Drawing; 15 | using System.Linq; 16 | using System.Text; 17 | using System.Threading.Tasks; 18 | using System.Windows.Forms; 19 | 20 | namespace SetupSheet 21 | { 22 | public partial class Options : Form 23 | { 24 | public string FolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\ExcellSetupSheet"; 25 | public Options() 26 | { 27 | InitializeComponent(); 28 | string Path = FolderPath + "\\Template.ini"; 29 | 30 | if (File.Exists(Path)) 31 | { 32 | const Int32 BufferSize = 128; 33 | using (var fileStream = File.OpenRead(Path)) 34 | using (var streamReader = new StreamReader(fileStream, Encoding.UTF8, true, BufferSize)) 35 | { 36 | String line; 37 | while ((line = streamReader.ReadLine()) != null) 38 | { 39 | Template.Text = line; 40 | } 41 | } 42 | } 43 | else 44 | { 45 | Path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Substring(8, System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Length-8); 46 | string directory = System.IO.Path.GetDirectoryName(Path); 47 | Path = directory + "\\Tool_List.xlsx"; 48 | Template.Text = Path; 49 | } 50 | } 51 | 52 | private void OK_Click(object sender, EventArgs e) 53 | { 54 | string Path = FolderPath + "\\Template.ini"; 55 | if (Template.Text == "") 56 | { 57 | MessageBox.Show("Please select a template"); 58 | } 59 | else 60 | { 61 | if (File.Exists(Path)) 62 | { 63 | File.Delete(Path); 64 | } 65 | if (!Directory.Exists(FolderPath)) 66 | { 67 | Directory.CreateDirectory(FolderPath); 68 | } 69 | using (var TemplateINI = new StreamWriter(Path, true)) 70 | { 71 | TemplateINI.WriteLine(Template.Text); 72 | TemplateINI.Close(); 73 | } 74 | 75 | this.Close(); 76 | } 77 | 78 | } 79 | 80 | private void Browse_Click(object sender, EventArgs e) 81 | { 82 | string Path = FolderPath + "\\Template.ini"; 83 | OpenFileDialog BrowseDialog = new OpenFileDialog(); 84 | BrowseDialog.Title = "Select your Excel template"; 85 | BrowseDialog.InitialDirectory = Path; 86 | BrowseDialog.Filter = "Excel files (*.xlsx)|*.xlsx|Excel files (*.xls)|*.xls|All Files (*.*)|*.*"; 87 | BrowseDialog.FilterIndex = 1; 88 | BrowseDialog.RestoreDirectory = true; 89 | if (BrowseDialog.ShowDialog() == DialogResult.OK) 90 | { 91 | Template.Text = BrowseDialog.FileName; 92 | } 93 | } 94 | 95 | private void Cancel_Click(object sender, EventArgs e) 96 | { 97 | this.Close(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2019 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System.Reflection; 10 | using System.Runtime.CompilerServices; 11 | using System.Runtime.InteropServices; 12 | 13 | // General Information about an assembly is controlled through the following 14 | // set of attributes. Change these attribute values to modify the information 15 | // associated with an assembly. 16 | [assembly: AssemblyTitle("SetupSheet")] 17 | [assembly: AssemblyDescription("")] 18 | [assembly: AssemblyConfiguration("")] 19 | [assembly: AssemblyCompany("")] 20 | [assembly: AssemblyProduct("SetupSheet")] 21 | [assembly: AssemblyCopyright("Copyright © 2018")] 22 | [assembly: AssemblyTrademark("")] 23 | [assembly: AssemblyCulture("")] 24 | 25 | // Setting ComVisible to false makes the types in this assembly not visible 26 | // to COM components. If you need to access a type in this assembly from 27 | // COM, set the ComVisible attribute to true on that type. 28 | [assembly: ComVisible(false)] 29 | 30 | // The following GUID is for the ID of the typelib if this project is exposed to COM 31 | [assembly: Guid("23106269-e38a-4a25-90d2-8e294244ad39")] 32 | 33 | // Version information for an assembly consists of the following four values: 34 | // 35 | // Major Version 36 | // Minor Version 37 | // Build Number 38 | // Revision 39 | // 40 | // You can specify all the values or you can default the Build and Revision Numbers 41 | // by using the '*' as shown below: 42 | // [assembly: AssemblyVersion("1.0.*")] 43 | [assembly: AssemblyVersion("1.0.6.0")] 44 | [assembly: AssemblyFileVersion("1.0.6.0")] 45 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/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 SetupSheet.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", "15.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("SetupSheet.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 resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Open___File_Browser_32x32 { 67 | get { 68 | object obj = ResourceManager.GetObject("Open - File Browser 32x32", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/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 | 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 | 121 | 122 | ..\Resources\Open - File Browser 32x32.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/Resources/Open - File Browser 32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-excel-setup-sheet/SetupSheet/Resources/Open - File Browser 32x32.ico -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/SetupSheet.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {23106269-E38A-4A25-90D2-8E294244AD39} 8 | Library 9 | Properties 10 | SetupSheet 11 | SetupSheet 12 | v4.5 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | Icons\Icon_24.ico 37 | 38 | 39 | 40 | False 41 | .\PluginFramework.dll 42 | 43 | 44 | False 45 | False 46 | bin\Debug\PowerMILL.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | Form 68 | 69 | 70 | Options.cs 71 | 72 | 73 | 74 | True 75 | True 76 | Resources.resx 77 | 78 | 79 | 80 | 81 | ToolSheetPaneWPF.xaml 82 | 83 | 84 | 85 | 86 | 87 | 88 | PreserveNewest 89 | 90 | 91 | PreserveNewest 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | Designer 101 | MSBuild:Compile 102 | 103 | 104 | 105 | 106 | {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} 107 | 2 108 | 8 109 | 0 110 | primary 111 | False 112 | True 113 | 114 | 115 | {00020813-0000-0000-C000-000000000046} 116 | 1 117 | 9 118 | 0 119 | primary 120 | False 121 | True 122 | 123 | 124 | {0002E157-0000-0000-C000-000000000046} 125 | 5 126 | 3 127 | 0 128 | primary 129 | False 130 | True 131 | 132 | 133 | 134 | 135 | Options.cs 136 | 137 | 138 | ResXFileCodeGenerator 139 | Resources.Designer.cs 140 | Designer 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/ToolSheet.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2019 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | using PowerMILL; 15 | using System.Runtime.InteropServices; 16 | using System.Windows.Forms; 17 | using System.Windows.Interop; 18 | using Delcam.Plugins.Framework; 19 | using System.Text.RegularExpressions; 20 | using Delcam.Plugins.Localisation; 21 | 22 | namespace SetupSheet 23 | { 24 | [Guid("8C96851C-7A01-4389-8FBF-22C3DC7B09FD")] 25 | [ClassInterface(ClassInterfaceType.None)] 26 | [ComVisible(true)] 27 | 28 | public class SetupSheet_Plugin : PluginFrameworkWithPanes, 29 | PowerMILL.IPowerMILLPluginPane, 30 | Delcam.Plugins.Framework.IPluginCommunicationsInterface 31 | 32 | { 33 | public override string PluginName { get { return "Excel SetupSheet"; } } 34 | public override string PluginAuthor { get { return "Autodesk"; } } 35 | public override string PluginDescription { get { return "Export toolpath and tool list to Excel"; } } 36 | public override string PluginIconPath { get { return "Icons/Icon_24.ico"; } } 37 | public override Version PluginVersion { get { return new Version(1, 0, 5); } } 38 | public override Version PowerMILLVersion { get { return new Version(2018, 0); } } 39 | public override bool PluginHasOptions { get { return true; } } 40 | 41 | public override void DisplayOptionsForm() 42 | { 43 | base.DisplayOptionsForm(); 44 | Options OptionForm = new Options(); 45 | OptionForm.Show(); 46 | } 47 | public override string PluginAssemblyName { get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; } } 48 | public override Guid PluginGuid { get { return new Guid("8C96851C-7A01-4389-8FBF-22C3DC7B09FD"); } } 49 | 50 | private SetupSheet.ToolSheetPaneWPF oToolSheetPaneWPF; 51 | public override void setup_framework(string token, PluginServices services, int parent_window_hwnd) 52 | { 53 | base.setup_framework(token, services, parent_window_hwnd); 54 | } 55 | 56 | protected override void register_panes() 57 | { 58 | // create the plugin pane 59 | oToolSheetPaneWPF = new SetupSheet.ToolSheetPaneWPF(this); 60 | register_pane(new PaneDefinition(oToolSheetPaneWPF, 440, 300, "Excel SetupSheet", "Icons/Icon_24.ico")); 61 | } 62 | 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /addin-excel-setup-sheet/SetupSheet/ToolSheetPaneWPF.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 62 | 63 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/.gitignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | PluginFramework.dll 4 | PluginFramework.pdb 5 | MR_wrapper.dll 6 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | AAAAAAAAIAAAgAAAAEAAAAAAAAAUEAAAAAAIAAAAAAA= 7 | MainModule.cs 8 | 9 | 10 | 11 | 12 | 13 | AAAAAAAAAQAAAAAQAAAAQAAAAAAAAAAAAAIAAAAAAAA= 14 | MainModule.cs 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | PowerMILLAutomation.cs 26 | 27 | 28 | 29 | 30 | PowerMILLAutomation.cs 31 | 32 | 33 | 34 | 35 | QwAACAABkAJAAEQAAAAAAAQAAAACAIQEEUEEKIABEAA= 36 | PowerMILLAutomation.cs 37 | 38 | 39 | 40 | 41 | 42 | AAAAIACAAAACAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAA= 43 | Utilities.cs 44 | 45 | 46 | 47 | 48 | 49 | AAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA= 50 | Tools\2DTool.cs 51 | 52 | 53 | 54 | 55 | 56 | AEAAAAAAAAAACAAAAAAAAIAAAAQAAAAAAAAABAAAEAA= 57 | Tools\ATP5Mill.cs 58 | 59 | 60 | 61 | 62 | 63 | AAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAEAA= 64 | Tools\DrillingTool.cs 65 | 66 | 67 | 68 | 69 | 70 | AAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAABAAAAAA= 71 | Tools\MillingTool.cs 72 | 73 | 74 | 75 | 76 | 77 | AAAAAAIAAAAAAAAAAUAAAAQAAAAAAAAgAAAAACAAAAA= 78 | Tools\NCProgramTool.cs 79 | 80 | 81 | 82 | 83 | 84 | AAAEAAAAACAQAAAABACAAAAAAAAAAAAAABAwAAAAAAA= 85 | Tools\SpecialMill.cs 86 | 87 | 88 | 89 | 90 | 91 | AAAAAAAAAAAACAAAAAAAAAAAAAQAAAAAAAAABAAAEAA= 92 | Tools\TaperSpherical.cs 93 | 94 | 95 | 96 | 97 | 98 | IAAAAAAAAAAAggAAAEAAAAIAAAAAQAAAAAAAAACAgAA= 99 | Tools\TapTool.cs 100 | 101 | 102 | 103 | 104 | 105 | AAAgEAYAAAAACEAADCAACAVCAIAAAEgBAWCBAQAAGIA= 106 | Tools\Tool.cs 107 | 108 | 109 | 110 | 111 | 112 | AEAAAIgAAAAAAAAAAgAAAIAAAAAAAAAAAAAAAABAAAA= 113 | Tools\TopAndSideMill.cs 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/EventLogger.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | using System.IO; 14 | 15 | namespace PowerMILLExporter 16 | { 17 | public static class EventLogger 18 | { 19 | private static string sLogFPath = ""; 20 | 21 | public static void InitializeEventLogger() 22 | { 23 | if (!Directory.Exists(Path.Combine(Path.GetTempPath(), "PowerMILLVericutInterface"))) 24 | Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), "PowerMILLVericutInterface")); 25 | sLogFPath = Path.Combine(Path.GetTempPath(), "PowerMILLVericutInterface", DateTime.Now.ToString("MM_d_yy__HH_mm") + ".txt"); 26 | File.WriteAllText(sLogFPath, DateTime.Now.ToString("HH:mm:ss") + ": Plugin initialized" + Environment.NewLine); 27 | } 28 | 29 | public static void WriteToEvengLog(string sEntry) 30 | { 31 | if (sLogFPath != "") 32 | File.AppendAllText(sLogFPath, DateTime.Now.ToString("HH:mm:ss") + ": " + sEntry + Environment.NewLine); 33 | } 34 | 35 | public static void WriteExceptionToEvengLog(string sEntry, string sMethod) 36 | { 37 | if (sLogFPath != "") 38 | File.AppendAllText(sLogFPath, DateTime.Now.ToString("HH:mm:ss") + ": Exception occured in method " + sMethod + Environment.NewLine + 39 | sEntry + Environment.NewLine); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Messages.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows; 14 | using System.IO; 15 | using System.Text.RegularExpressions; 16 | 17 | namespace PowerMILLExporter 18 | { 19 | public static class Messages 20 | { 21 | public static string PluginName 22 | { 23 | get { return plugin_name; } 24 | set { plugin_name = value; } 25 | } 26 | private static string plugin_name; 27 | 28 | public static MessageBoxResult ShowError(string msg) 29 | { 30 | return MessageBox.Show(msg, 31 | plugin_name, MessageBoxButton.OK, MessageBoxImage.Error); 32 | } 33 | 34 | public static MessageBoxResult ShowError(string msg, object[] args) 35 | { 36 | return MessageBox.Show(String.Format(msg, args), 37 | plugin_name, MessageBoxButton.OK, MessageBoxImage.Error); 38 | } 39 | 40 | public static MessageBoxResult ShowError(string msg, string arg1) 41 | { 42 | string translation = msg; 43 | var regex = new Regex(Regex.Escape("%s")); 44 | var newText = regex.Replace(translation, arg1, 1); 45 | return MessageBox.Show(newText.Replace("\\n", Environment.NewLine), 46 | plugin_name, MessageBoxButton.OK, MessageBoxImage.Error); 47 | } 48 | 49 | public static MessageBoxResult ShowError(string msg, string arg1, string arg2) 50 | { 51 | string translation = msg; 52 | var regex = new Regex(Regex.Escape("%s")); 53 | var newText = regex.Replace(translation, arg1, 1); 54 | newText = regex.Replace(newText, arg2, 1); 55 | return MessageBox.Show(newText.Replace("\\n", Environment.NewLine), 56 | plugin_name, MessageBoxButton.OK, MessageBoxImage.Error); 57 | } 58 | 59 | public static MessageBoxResult ShowWarning(string msg) 60 | { 61 | return MessageBox.Show(msg, 62 | plugin_name, MessageBoxButton.YesNo, MessageBoxImage.Warning); 63 | } 64 | 65 | public static MessageBoxResult ShowWarning(string msg, object[] args) 66 | { 67 | return MessageBox.Show(String.Format(msg, args), 68 | plugin_name, MessageBoxButton.YesNo, MessageBoxImage.Warning); 69 | } 70 | 71 | public static MessageBoxResult ShowWarning(string msg, string arg1) 72 | { 73 | string translation = msg; 74 | var regex = new Regex(Regex.Escape("%s")); 75 | var newText = regex.Replace(translation, arg1, 1); 76 | return MessageBox.Show(newText.Replace("\\n", Environment.NewLine), 77 | plugin_name, MessageBoxButton.YesNo, MessageBoxImage.Warning); 78 | } 79 | 80 | public static MessageBoxResult ShowWarning(string msg, string arg1, string arg2) 81 | { 82 | string translation = msg; 83 | var regex = new Regex(Regex.Escape("%s")); 84 | var newText = regex.Replace(translation, arg1, 1); 85 | newText = regex.Replace(newText, arg2, 1); 86 | return MessageBox.Show(newText.Replace("\\n", Environment.NewLine), 87 | plugin_name, MessageBoxButton.YesNo, MessageBoxImage.Warning); 88 | } 89 | 90 | public static MessageBoxResult ShowQuestion(string msg) 91 | { 92 | return MessageBox.Show(msg, 93 | plugin_name, MessageBoxButton.YesNo, MessageBoxImage.Warning); 94 | } 95 | 96 | public static void ShowMessage(string msg) 97 | { 98 | MessageBox.Show(msg, 99 | plugin_name, MessageBoxButton.OK, MessageBoxImage.Information); 100 | } 101 | 102 | public static string Translate(string msg) 103 | { 104 | return msg; 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/PowerMILLExporter.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4} 9 | Library 10 | Properties 11 | PowerMILLExporter 12 | PowerMILLExporter 13 | v4.0 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | .\PluginFramework.dll 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | {38B343CC-4F1B-4AED-8196-EEEA6C0A7294} 76 | 1 77 | 0 78 | 0 79 | tlbimp 80 | False 81 | True 82 | 83 | 84 | 85 | 92 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System.Reflection; 10 | using System.Runtime.CompilerServices; 11 | using System.Runtime.InteropServices; 12 | 13 | // General Information about an assembly is controlled through the following 14 | // set of attributes. Change these attribute values to modify the information 15 | // associated with an assembly. 16 | [assembly: AssemblyTitle("PowerMILLExporter")] 17 | [assembly: AssemblyDescription("")] 18 | [assembly: AssemblyConfiguration("")] 19 | [assembly: AssemblyCompany("Autodesk")] 20 | [assembly: AssemblyProduct("PowerMILLExporter")] 21 | [assembly: AssemblyCopyright("Copyright (c) 2017 Autodesk, Inc. All rights reserved.")] 22 | [assembly: AssemblyTrademark("")] 23 | [assembly: AssemblyCulture("")] 24 | 25 | // Setting ComVisible to false makes the types in this assembly not visible 26 | // to COM components. If you need to access a type in this assembly from 27 | // COM, set the ComVisible attribute to true on that type. 28 | [assembly: ComVisible(false)] 29 | 30 | // The following GUID is for the ID of the typelib if this project is exposed to COM 31 | [assembly: Guid("b1a807ca-cfc7-456a-ba66-b1d4b8897d8a")] 32 | 33 | // Version information for an assembly consists of the following four values: 34 | // 35 | // Major Version 36 | // Minor Version 37 | // Build Number 38 | // Revision 39 | // 40 | // You can specify all the values or you can default the Build and Revision Numbers 41 | // by using the '*' as shown below: 42 | // [assembly: AssemblyVersion("1.0.*")] 43 | [assembly: AssemblyVersion("1.0.0.7")] 44 | [assembly: AssemblyFileVersion("1.0.0.7")] 45 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/2DTool.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's Milling ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | public class _2DTool : Tool 21 | { 22 | #region "Properties" 23 | /// 24 | /// Cad Path 25 | /// 26 | /// 27 | /// 28 | /// 29 | public string CADPath 30 | { 31 | get 32 | { 33 | return sCADPath; 34 | } 35 | } 36 | #endregion 37 | private string sCADPath = null; 38 | 39 | #region "Methods" 40 | /// 41 | /// Sub New 42 | /// 43 | /// Name of the tool 44 | /// ToolHolder Path 45 | /// ToolNumber 46 | /// Tool OverHang 47 | /// Tool Gauge 48 | /// Tool Diameter 49 | /// Tool Length 50 | /// Tool Total length 51 | /// Tool Cutting Length 52 | /// Shank path 53 | /// Tool Teeth Number 54 | /// Tool Profile 55 | /// 56 | public _2DTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, string CADPath) 57 | : base("9", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 58 | { 59 | 60 | sCADPath = CADPath; 61 | } 62 | 63 | public _2DTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, string CADPath, string Type) 64 | : base("9", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 65 | { 66 | 67 | sCADPath = CADPath; 68 | } 69 | #endregion 70 | } 71 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/ATP5Mill.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's ATP5MILL ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | 21 | 22 | public class ATP5Mill : Tool 23 | { 24 | 25 | #region "Properties" 26 | /// 27 | /// Tool CornerRadius 28 | /// 29 | /// 30 | /// 31 | /// 32 | public double CornerRadius 33 | { 34 | get 35 | { 36 | return dCornerRadius; 37 | } 38 | } 39 | 40 | private double dCornerRadius = 0; 41 | /// 42 | /// Tool Nose Angle 43 | /// 44 | /// 45 | /// 46 | /// 47 | public double NoseAngle 48 | { 49 | get 50 | { 51 | return dNoseAngle; 52 | } 53 | } 54 | 55 | private double dNoseAngle = 0; 56 | /// 57 | /// Side Angle 58 | /// 59 | /// 60 | /// 61 | /// 62 | public double SideAngle 63 | { 64 | get 65 | { 66 | return dSideAngle; 67 | } 68 | } 69 | #endregion 70 | private double dSideAngle = 0; 71 | #region "Methods" 72 | /// 73 | /// Sub New 74 | /// 75 | /// Name of the tool 76 | /// ToolHolder Path 77 | /// ToolNumber 78 | /// Tool OverHang 79 | /// Tool Gauge 80 | /// Tool Diameter 81 | /// Tool Length 82 | /// Tool Total length 83 | /// Tool Cutting Length 84 | /// Shank path 85 | /// Tool Teeth Number 86 | /// Tool CornerRadius 87 | /// Tool Nose Angle 88 | /// Side Angle 89 | /// 90 | public ATP5Mill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius, double NoseAngle, double SideAngle) 91 | : base("4", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 92 | { 93 | 94 | dCornerRadius = CornerRadius; 95 | dNoseAngle = NoseAngle; 96 | dSideAngle = SideAngle; 97 | } 98 | public ATP5Mill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius, double NoseAngle, double SideAngle, string Type) 99 | : base("4", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 100 | { 101 | 102 | dCornerRadius = CornerRadius; 103 | dNoseAngle = NoseAngle; 104 | dSideAngle = SideAngle; 105 | } 106 | 107 | #endregion 108 | } 109 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/DrillingTool.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's Drilling ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | 21 | public class DrillingTool : Tool 22 | { 23 | 24 | #region "Properties" 25 | /// 26 | /// Tool NoseAngle 27 | /// 28 | /// 29 | /// 30 | /// 31 | public double NoseAngle 32 | { 33 | get 34 | { 35 | return dNoseAngle; 36 | } 37 | } 38 | #endregion 39 | private double dNoseAngle = 0; 40 | #region "Methods" 41 | /// 42 | /// Sub New 43 | /// 44 | /// Name of the tool 45 | /// ToolHolder Path 46 | /// ToolNumber 47 | /// Tool OverHang 48 | /// Tool Gauge 49 | /// Tool Diameter 50 | /// Tool Length 51 | /// Tool Total length 52 | /// Tool Cutting Length 53 | /// Shank path 54 | /// Tool Teeth Number 55 | /// Tool NoseAngle 56 | /// 57 | public DrillingTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double NoseAngle) 58 | : base("2", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 59 | { 60 | 61 | dNoseAngle = NoseAngle; 62 | } 63 | public DrillingTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double NoseAngle, string Type) 64 | : base("2", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 65 | { 66 | 67 | dNoseAngle = NoseAngle; 68 | } 69 | #endregion 70 | } 71 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/MillingTool.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's Milling ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | 21 | public class MillingTool : Tool 22 | { 23 | 24 | #region "Properties" 25 | /// 26 | /// Tool CornerRadius 27 | /// 28 | /// 29 | /// 30 | /// 31 | public double CornerRadius 32 | { 33 | get 34 | { 35 | return dCornerRadius; 36 | } 37 | } 38 | #endregion 39 | private double dCornerRadius = 0; 40 | #region "Methods" 41 | /// 42 | /// Sub New 43 | /// 44 | /// Name of the tool 45 | /// ToolHolder Path 46 | /// ToolNumber 47 | /// Tool OverHang 48 | /// Tool Gauge 49 | /// Tool Diameter 50 | /// Tool Length 51 | /// Tool Total length 52 | /// Tool Cutting Length 53 | /// Shank path 54 | /// Tool Teeth Number 55 | /// Tool CornerRadius 56 | /// 57 | public MillingTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius) 58 | : base("1", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 59 | { 60 | 61 | dCornerRadius = CornerRadius; 62 | } 63 | 64 | public MillingTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius, string Type) 65 | : base("1", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 66 | { 67 | 68 | dCornerRadius = CornerRadius; 69 | } 70 | 71 | #endregion 72 | } 73 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/NCProgramTool.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's NCProgramTool ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | 18 | // ERROR: Not supported in C#: OptionDeclaration 19 | namespace PowerMILLExporter.Tools 20 | { 21 | 22 | /// 23 | /// This class is used to get NCprogram Tool number (they can be different from tool number) 24 | /// 25 | /// 26 | public class NCProgramTool 27 | { 28 | /// 29 | /// Name of the tool 30 | /// 31 | /// 32 | /// 33 | /// 34 | public string Name 35 | { 36 | get 37 | { 38 | return sName; 39 | } 40 | set 41 | { 42 | sName = value; 43 | } 44 | } 45 | private string sName = null; 46 | 47 | /// 48 | /// Name of the toolpath 49 | /// 50 | /// 51 | /// 52 | /// 53 | public string Toolpath 54 | { 55 | get 56 | { 57 | return sToolpath; 58 | } 59 | set 60 | { 61 | sToolpath = value; 62 | } 63 | } 64 | private string sToolpath = null; 65 | 66 | /// 67 | /// Tool Number 68 | /// 69 | /// 70 | /// 71 | /// 72 | public int Number 73 | { 74 | get 75 | { 76 | return iNumber; 77 | } 78 | set 79 | { 80 | iNumber = value; 81 | } 82 | } 83 | private int iNumber = 0; 84 | } 85 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/SpecialMill.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections; 11 | using System.Collections.Generic; 12 | //======================================================================================================================================================================================================================= 13 | //======================================================================================================================================================================================================================= 14 | //===== PowerMILLVericutInterface application's Milling ToolClass ============================================================================================================================================================================ 15 | //======================================================================================================================================================================================================================= 16 | //======================================================================================================================================================================================================================= 17 | 18 | 19 | // ERROR: Not supported in C#: OptionDeclaration 20 | namespace PowerMILLExporter.Tools 21 | { 22 | 23 | public class SpecialMill : Tool 24 | { 25 | 26 | #region "Properties" 27 | /// 28 | /// Tool Profile 29 | /// 30 | /// 31 | /// 32 | /// 33 | public List Profile 34 | { 35 | get 36 | { 37 | return sProfile; 38 | } 39 | } 40 | private List sProfile = new List(); 41 | 42 | private double dTipRad = 0; 43 | /// 44 | /// Tool TipRadius 45 | /// 46 | /// 47 | /// 48 | /// 49 | public double TipRadius 50 | { 51 | get 52 | { 53 | return dTipRad; 54 | } 55 | } 56 | 57 | 58 | /// 59 | /// Tool Radius X Offset 60 | /// 61 | /// 62 | /// 63 | /// 64 | public double RadXOffset 65 | { 66 | get 67 | { 68 | return dRadXOffset; 69 | } 70 | } 71 | private double dRadXOffset = 0; 72 | 73 | /// 74 | /// Tool Radius Y Offset 75 | /// 76 | /// 77 | /// 78 | /// 79 | public double RadYOffset 80 | { 81 | get 82 | { 83 | return dRadYOffset; 84 | } 85 | } 86 | private double dRadYOffset = 0; 87 | #endregion 88 | 89 | #region "Methods" 90 | /// 91 | /// Sub New 92 | /// 93 | /// Name of the tool 94 | /// ToolHolder Path 95 | /// ToolNumber 96 | /// Tool OverHang 97 | /// Tool Gauge 98 | /// Tool Diameter 99 | /// Tool Length 100 | /// Tool Total length 101 | /// Tool Cutting Length 102 | /// Shank path 103 | /// Tool Teeth Number 104 | /// Tip radius X offset 105 | /// Tip radius Y offset 106 | /// Tip radius 107 | /// Tool Profile 108 | /// 109 | public SpecialMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, double RadXOffset, double RadYOffset, double TipRadius, string ToolShankPath, int TeethNumber) 110 | : base("5", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 111 | { 112 | dRadXOffset = RadXOffset; 113 | dRadYOffset = RadYOffset; 114 | dTipRad = TipRadius; 115 | //sProfile = Profile; 116 | } 117 | public SpecialMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, double RadXOffset, double RadYOffset, double TipRadius, string ToolShankPath, int TeethNumber, string Type) 118 | : base("5", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 119 | { 120 | dRadXOffset = RadXOffset; 121 | dRadYOffset = RadYOffset; 122 | dTipRad = TipRadius; 123 | //sProfile = Profile; 124 | } 125 | public SpecialMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, List Profile) 126 | : base("5", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 127 | { 128 | 129 | sProfile = Profile; 130 | } 131 | public SpecialMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, List Profile, string Type) 132 | : base("5", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 133 | { 134 | 135 | sProfile = Profile; 136 | } 137 | #endregion 138 | } 139 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/TapTool.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's Tap ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | 21 | public class TapTool : Tool 22 | { 23 | 24 | #region "Properties" 25 | /// 26 | /// Step 27 | /// 28 | /// 29 | /// 30 | /// 31 | public double ToolStep 32 | { 33 | get 34 | { 35 | return dToolStep; 36 | } 37 | } 38 | 39 | private double dToolStep = 0; 40 | /// 41 | /// Chamfer Diameter 42 | /// 43 | /// 44 | /// 45 | /// 46 | public double ChamferDiameter 47 | { 48 | get 49 | { 50 | return dChamferDiameter; 51 | } 52 | } 53 | 54 | private double dChamferDiameter = 0; 55 | /// 56 | /// No cut Diameter 57 | /// 58 | /// 59 | /// 60 | /// 61 | public double NoCutDiameter 62 | { 63 | get 64 | { 65 | return dNoCutDiameter; 66 | } 67 | } 68 | 69 | private double dNoCutDiameter = 0; 70 | /// 71 | /// Length of the Chamfer 72 | /// 73 | /// 74 | /// 75 | /// 76 | public double ChamferLength 77 | { 78 | get 79 | { 80 | return dChamferLength; 81 | } 82 | } 83 | #endregion 84 | private double dChamferLength = 0; 85 | 86 | #region "Methods" 87 | /// 88 | /// Sub New 89 | /// 90 | /// Name of the tool 91 | /// ToolHolder Path 92 | /// ToolNumber 93 | /// Tool OverHang 94 | /// Tool Gauge 95 | /// Tool Diameter 96 | /// Tool Length 97 | /// Tool Total length 98 | /// Tool Cutting Length 99 | /// Shank path 100 | /// Tool Teeth Number 101 | /// Step 102 | /// Chamfer Diameter 103 | /// No cut Diameter 104 | /// Length of the Chamfer 105 | /// 106 | public TapTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double ToolStep, double ChamferDiameter, double NoCutDiameter, double ChamferLength) 107 | : base("3", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 108 | { 109 | 110 | dToolStep = ToolStep; 111 | dChamferDiameter = ChamferDiameter; 112 | dNoCutDiameter = NoCutDiameter; 113 | dChamferLength = ChamferLength; 114 | } 115 | public TapTool(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double ToolStep, double ChamferDiameter, double NoCutDiameter, double ChamferLength, string Type) 116 | : base("3", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 117 | { 118 | 119 | dToolStep = ToolStep; 120 | dChamferDiameter = ChamferDiameter; 121 | dNoCutDiameter = NoCutDiameter; 122 | dChamferLength = ChamferLength; 123 | } 124 | #endregion 125 | } 126 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/TaperSpherical.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's TaperSpherical ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | public class TaperSpherical : Tool 21 | { 22 | 23 | 24 | #region "Properties" 25 | /// 26 | /// Tool CornerRadius 27 | /// 28 | /// 29 | /// 30 | /// 31 | public double CornerRadius 32 | { 33 | get 34 | { 35 | return dCornerRadius; 36 | } 37 | } 38 | 39 | private double dCornerRadius = 0; 40 | /// 41 | /// Tool NoseAngle 42 | /// 43 | /// 44 | /// 45 | /// 46 | public double NoseAngle 47 | { 48 | get 49 | { 50 | return dNoseAngle; 51 | } 52 | } 53 | 54 | private double dNoseAngle = 0; 55 | #endregion 56 | #region "Methods" 57 | /// 58 | /// Sub New 59 | /// 60 | /// Name of the tool 61 | /// ToolHolder Path 62 | /// ToolNumber 63 | /// Tool OverHang 64 | /// Tool Gauge 65 | /// Tool Diameter 66 | /// Tool Length 67 | /// Tool Total length 68 | /// Tool Cutting Length 69 | /// Shank path 70 | /// Tool Teeth Number 71 | /// Tool CornerRadius 72 | /// Tool Nose Angle 73 | /// 74 | public TaperSpherical(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius, double NoseAngle) 75 | : base("11", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 76 | { 77 | 78 | dCornerRadius = CornerRadius; 79 | dNoseAngle = NoseAngle; 80 | } 81 | public TaperSpherical(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double CornerRadius, double NoseAngle, string Type) 82 | : base("11", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 83 | { 84 | 85 | dCornerRadius = CornerRadius; 86 | dNoseAngle = NoseAngle; 87 | } 88 | #endregion 89 | } 90 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/TaperedTipped.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | 14 | //======================================================================================================================================================================================================================= 15 | //======================================================================================================================================================================================================================= 16 | //===== PowerMILLVericutInterface application's TaperSpherical ToolClass ============================================================================================================================================================================ 17 | //======================================================================================================================================================================================================================= 18 | //======================================================================================================================================================================================================================= 19 | 20 | namespace PowerMILLExporter.Tools 21 | { 22 | public class TaperedTipped : Tool 23 | { 24 | 25 | 26 | #region "Properties" 27 | /// 28 | /// Tool TaperAngle 29 | /// 30 | /// 31 | /// 32 | /// 33 | public double TaperAngle 34 | { 35 | get 36 | { 37 | return dTaperAngle; 38 | } 39 | } 40 | private double dTaperAngle = 0; 41 | 42 | /// 43 | /// Tool TaperDiameter 44 | /// 45 | /// 46 | /// 47 | /// 48 | public double TaperDiameter 49 | { 50 | get 51 | { 52 | return dTaperDia; 53 | } 54 | } 55 | private double dTaperDia = 0; 56 | 57 | /// 58 | /// Tool TipRadius 59 | /// 60 | /// 61 | /// 62 | /// 63 | public double TipRadius 64 | { 65 | get 66 | { 67 | return dTipRad; 68 | } 69 | } 70 | private double dTipRad = 0; 71 | 72 | /// 73 | /// Tool TaperHeight 74 | /// 75 | /// 76 | /// 77 | /// 78 | public double TaperHeight 79 | { 80 | get 81 | { 82 | return dTaperHeight; 83 | } 84 | } 85 | private double dTaperHeight = 0; 86 | 87 | #endregion 88 | #region "Methods" 89 | /// 90 | /// Sub New 91 | /// 92 | /// Name of the tool 93 | /// ToolHolder Path 94 | /// ToolNumber 95 | /// Tool OverHang 96 | /// Tool Gauge 97 | /// Tool Diameter 98 | /// Tool Length 99 | /// Tool Total length 100 | /// Tool Cutting Length 101 | /// Shank path 102 | /// Tool Teeth Number 103 | /// Tool CornerRadius 104 | /// Tool Nose Angle 105 | /// 106 | public TaperedTipped(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double TaperAngle, double TaperDiameter, double TipRadius, double TaperHeight) 107 | : base("12", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 108 | { 109 | 110 | dTaperAngle = TaperAngle; 111 | dTaperDia = TaperDiameter; 112 | dTipRad = TipRadius; 113 | dTaperHeight = TaperHeight; 114 | } 115 | public TaperedTipped(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double TaperAngle, double TaperDiameter, double TipRadius, double TaperHeight, string Type) 116 | : base("12", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 117 | { 118 | 119 | dTaperAngle = TaperAngle; 120 | dTaperDia = TaperDiameter; 121 | dTipRad = TipRadius; 122 | dTaperHeight = TaperHeight; 123 | } 124 | #endregion 125 | } 126 | } 127 | 128 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/Tools.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | 14 | namespace PowerMILLExporter.Tools 15 | { 16 | public class Tools 17 | { 18 | public List oMillingTools { get; set; } 19 | public List oTaperSphericalTools { get; set; } 20 | public List oDrillingTools { get; set; } 21 | public List oTapTools { get; set; } 22 | public List oATP5MillTools { get; set; } 23 | public List oTopAndSideMillTools { get; set; } 24 | public List oTaperTippedTools { get; set; } 25 | public List oSpecialMILLTools { get; set; } 26 | public List<_2DTool> o2DTools { get; set; } 27 | 28 | public Tools() 29 | { 30 | oMillingTools = new List(); 31 | oTaperSphericalTools = new List(); 32 | oDrillingTools = new List(); 33 | oTapTools = new List(); 34 | oATP5MillTools = new List(); 35 | oTopAndSideMillTools = new List(); 36 | oTaperTippedTools = new List(); 37 | oSpecialMILLTools = new List(); 38 | o2DTools = new List<_2DTool>(); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Tools/TopAndSideMill.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | //======================================================================================================================================================================================================================= 11 | //======================================================================================================================================================================================================================= 12 | //===== PowerMILLVericutInterface application's TopAndSideMill ToolClass ============================================================================================================================================================================ 13 | //======================================================================================================================================================================================================================= 14 | //======================================================================================================================================================================================================================= 15 | 16 | 17 | // ERROR: Not supported in C#: OptionDeclaration 18 | namespace PowerMILLExporter.Tools 19 | { 20 | 21 | public class TopAndSideMill : Tool 22 | { 23 | 24 | /// 25 | /// Radius Inferior 26 | /// 27 | /// 28 | /// 29 | /// 30 | public double RadiusInf 31 | { 32 | get 33 | { 34 | return dRadiusInf; 35 | } 36 | } 37 | 38 | private double dRadiusInf = 0; 39 | 40 | /// 41 | /// Radius Superior 42 | /// 43 | /// 44 | /// 45 | /// 46 | public double RadiusSup 47 | { 48 | get 49 | { 50 | return dRadiusSup; 51 | } 52 | } 53 | 54 | private double dRadiusSup = 0; 55 | /// 56 | /// Side Angle 57 | /// 58 | /// 59 | /// 60 | /// 61 | public double SideAngle 62 | { 63 | get 64 | { 65 | return dSideAngle; 66 | } 67 | } 68 | 69 | private double dSideAngle = 0; 70 | #region "Methods" 71 | /// 72 | /// Sub New 73 | /// 74 | /// Name of the tool 75 | /// ToolHolder Path 76 | /// ToolNumber 77 | /// Tool OverHang 78 | /// Tool Gauge 79 | /// Tool Diameter 80 | /// Tool Length 81 | /// Tool Total length 82 | /// Tool Cutting Length 83 | /// Shank path 84 | /// Tool Teeth Number 85 | /// Tool Radius Inferior 86 | /// Tool Radius Superior 87 | /// Tool Side Angle 88 | /// Cutting length = Thickness 89 | public TopAndSideMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double RadiusInf, double RadiusSup, double SideAngle) 90 | : base("7", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber) 91 | { 92 | 93 | dRadiusInf = RadiusInf; 94 | dRadiusSup = RadiusSup; 95 | dSideAngle = SideAngle; 96 | 97 | } 98 | public TopAndSideMill(string Name, string ToolHolderPath, int ToolNumber, double OverHang, double Gauge, double Diameter, double Length, double OverLength, double CuttingLength, string ToolShankPath, int TeethNumber, double RadiusInf, double RadiusSup, double SideAngle, string Type) 99 | : base("7", Name, ToolHolderPath, ToolNumber, OverHang, Gauge, Diameter, Length, OverLength, CuttingLength, ToolShankPath, TeethNumber, Type) 100 | { 101 | 102 | dRadiusInf = RadiusInf; 103 | dRadiusSup = RadiusSup; 104 | dSideAngle = SideAngle; 105 | 106 | } 107 | #endregion 108 | } 109 | } -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLExporter/Utilities.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.IO; 12 | using System.Linq; 13 | using System.Text; 14 | using System.Windows.Forms; 15 | 16 | namespace PowerMILLExporter 17 | { 18 | public class Utilities 19 | { 20 | /// 21 | /// Check if Checked NCProg has been modified or if the OutputFile has been delete 22 | /// 23 | /// 24 | /// 25 | /// 26 | public static string CheckNCProgram(string NCProgramName, out string sStatus) 27 | { 28 | string sCNFileName = null; 29 | 30 | // Get the NC prog Status 31 | //string sStatus = pmill.ExecuteEx("print par \"entity('ncprogram';'" + NCProgramName + "').Status\"").Replace("(ENUM)", "").Trim(); 32 | sStatus = PowerMILLAutomation.GetParameterValueTerse("entity('ncprogram';'" + NCProgramName + "').Status").Trim(); 33 | string sWorkPlane = PowerMILLAutomation.GetParameterValueTerse("entity('ncprogram';'" + NCProgramName + "').OutputWorkplane").Trim(); 34 | 35 | if (sStatus.ToLower() == "written") 36 | { 37 | // Get NC prog Infos 38 | PowerMILLAutomation.Execute("DIALOGS MESSAGE OFF"); 39 | string sProgCN = PowerMILLAutomation.ExecuteEx("EDIT NCPROGRAM '" + NCProgramName + "' LIST"); 40 | PowerMILLAutomation.Execute("DIALOGS MESSAGE ON"); 41 | 42 | string[] sTabCNInfos = sProgCN.Split((char)13); 43 | int iSlashIndex = sTabCNInfos[2].IndexOf('/'); 44 | if (iSlashIndex < 0) iSlashIndex = 0; 45 | int iSpaceIndex = sTabCNInfos[2].LastIndexOf((char)32, iSlashIndex); 46 | 47 | // Get the NCProg File Path 48 | sCNFileName = sTabCNInfos[2].Remove(0, iSpaceIndex).Trim(); 49 | return sCNFileName; 50 | } 51 | else 52 | { 53 | return null; 54 | } 55 | } 56 | 57 | /// 58 | /// Put the number in the right format according to the decimal separator 59 | /// 60 | /// Number to convert in string 61 | /// 62 | /// 63 | public static double ConvertDecimalSeparator(string Number) 64 | { 65 | double dNumber = 0; 66 | if (Number.Contains(",")) 67 | { 68 | Number = Number.Replace(",", System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator); 69 | } 70 | double.TryParse(Number, out dNumber); 71 | return dNumber; 72 | } 73 | 74 | public static double DegreesToRadians(double alpha_deg) 75 | { 76 | return Math.PI * alpha_deg / 180.0; 77 | } 78 | 79 | public static string ToInvariantCultureString(double value) 80 | { 81 | return value.ToString(System.Globalization.CultureInfo.InvariantCulture); 82 | } 83 | 84 | public static double ToInvariantCultureDouble(string value) 85 | { 86 | return Convert.ToDouble(value, System.Globalization.CultureInfo.InvariantCulture); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerMILLVERICUTInterfacePlugin", "PowerMILLVERICUTInterfacePlugin\PowerMILLVERICUTInterfacePlugin.csproj", "{3C56D408-065D-49CE-8268-61F4D56C075D}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4} = {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4} 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerMILLExporter", "PowerMILLExporter\PowerMILLExporter.csproj", "{BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Debug|Mixed Platforms = Debug|Mixed Platforms 17 | Debug|x86 = Debug|x86 18 | Release|Any CPU = Release|Any CPU 19 | Release|Mixed Platforms = Release|Mixed Platforms 20 | Release|x86 = Release|x86 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 26 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 27 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Debug|x86.ActiveCfg = Debug|Any CPU 28 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 31 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Release|Mixed Platforms.Build.0 = Release|Any CPU 32 | {3C56D408-065D-49CE-8268-61F4D56C075D}.Release|x86.ActiveCfg = Release|Any CPU 33 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 36 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 37 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Debug|x86.ActiveCfg = Debug|Any CPU 38 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 41 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Release|Mixed Platforms.Build.0 = Release|Any CPU 42 | {BF0BBB53-8992-45E5-BB3D-8BA8454D4ED4}.Release|x86.ActiveCfg = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | GlobalSection(ExtensibilityGlobals) = postSolution 48 | SolutionGuid = {5CC35F03-5F97-4C76-A160-0144B591A26C} 49 | EndGlobalSection 50 | GlobalSection(SubversionScc) = preSolution 51 | Svn-Managed = True 52 | Manager = AnkhSVN - Subversion Support for Visual Studio 53 | EndGlobalSection 54 | EndGlobal 55 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/ClassDiagram2.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | AAAAAQEAARBQAAAAAACAAAAAAAAAEQAABBAAAAABAAA= 7 | ExportData.cs 8 | 9 | 10 | 11 | 12 | 13 | AAAAABAAAAAAAAAAAAABkAAAAQAAAAAAAAAAAAAAAIQ= 14 | 15 | 16 | 17 | 18 | 19 | AAAAAAAAICAAAAAEAAAAQAABgAAAAAAAAAAAAAAAAAA= 20 | Installer\InstallationUtils.cs 21 | 22 | 23 | 24 | 25 | 26 | AAAAAAAAACAAAAAEAAAAAAAAAAAAAAAAAAAAAAAgAAA= 27 | Installer\InstallerActions.cs 28 | 29 | 30 | 31 | 32 | 33 | AAAAAAAAAACAAAAAQBAAAgAAAAAAAABAAAAAAAAAAAA= 34 | PluginSettings.cs 35 | 36 | 37 | 38 | 39 | 40 | AADABAAgAAEgCABgAAAAAAAAgAgEAAAAAAgAAAAgAAA= 41 | PowerMILLPlugin.cs 42 | 43 | 44 | 45 | 46 | 47 | 48 | AAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAASAAAAAAAgA= 49 | ProjectData.cs 50 | 51 | 52 | 53 | 54 | 55 | AAAEQAAIMAAAhABADQIABARRAIAMAEAAAAAEJACABIA= 56 | ProjectData.cs 57 | 58 | 59 | 60 | 61 | 62 | EAKAgAAAAAAAAAAACAAQAEAAAAABAACAAAACAIAAAAA= 63 | ProjectData.cs 64 | 65 | 66 | 67 | 68 | 69 | AAAAAAAAAAAAAEAAAAAAAAAAAIAAAAAAAAAAAAAAAAA= 70 | SetupFormData.cs 71 | 72 | 73 | 74 | 75 | 76 | AAAAAAEACAAAAAAAAAAAAAACAAAAgAAAAAAAAAgAAAA= 77 | VericutMachineReader.cs 78 | 79 | 80 | 81 | 82 | 83 | BAIAgIACQIAWCAAAIEQAgIAAAAQMAAABAEAQAAAAgAA= 84 | WriteTools.cs 85 | 86 | 87 | 88 | 89 | 90 | cSFoY4jShUBJQluEIJIEDgVTAwAxiWEMyENVFQIgYkM= 91 | Forms\VericutPaneWPF.xaml.cs 92 | 93 | 94 | 95 | 96 | 97 | AAAAGUBDAQAiIFEDQUADmIACAQAEEEYAIBoEAOAACIg= 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Forms.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | cSFoY4jShUBJQluEIJIEDgVTAwAxiWEMyENVFQIgYkM= 10 | Forms\VericutPaneWPF.xaml.cs 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Icons.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 PowerMILLVERICUTInterfacePlugin { 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", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Icons { 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 Icons() { 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("PowerMILLVERICUTInterfacePlugin.Icons", typeof(Icons).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 resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Logo24_1 { 67 | get { 68 | object obj = ResourceManager.GetObject("Logo24_1", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap Logo32_1 { 77 | get { 78 | object obj = ResourceManager.GetObject("Logo32_1", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap Logo48_1 { 87 | get { 88 | object obj = ResourceManager.GetObject("Logo48_1", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo24_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo24_1.png -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo32_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo32_1.png -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo48_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/Logo48_1.png -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/delete.png -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/file_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autodesk/powermill-api-examples/9248260b85d68c704dded21db78e7f4e2509cf22/addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Images/file_open.png -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/PluginSettings.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | using System.Xml.Serialization; 15 | using PowerMILLExporter; 16 | 17 | namespace PowerMILLVERICUTInterfacePlugin 18 | { 19 | [Serializable] 20 | public class PluginSettings 21 | { 22 | public ExportOptions export_options; 23 | public string vericut_fpath; 24 | public bool start_vericut; 25 | public bool tool_id_use_name; 26 | public bool tool_id_use_num; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/PowerMILLPlugin.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | //============================================================================= 10 | // 11 | // PowerMILL must not be running when the plugin is rebuilt, as it the DLL will be locked. 12 | // 13 | // To register: 14 | // -------------- 15 | // 16 | // x64: 17 | // ---- 18 | // 19 | // .NET 3.5 => cd C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ 20 | // .NET 4 => cd C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ 21 | // 22 | // regasm.exe "C:\SVN\PowerMILL_Addins\PowerMILLVERICUTInterfacePlugin\PowerMILLVERICUTInterfacePlugin\bin\Debug\PowerMILLVERICUTInterfacePlugin.dll" /register /codebase 23 | // 24 | // x86: 25 | // ---- 26 | // 27 | // .NET 3.5 => cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ 28 | // .NET 4 => cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ 29 | // 30 | // regasm.exe "C:\SVN\PowerMILL_Addins\PowerMILLVERICUTInterfacePlugin\PowerMILLVERICUTInterfacePlugin\bin\Debug\PowerMILLVERICUTInterfacePlugin.dll" /register /codebase 31 | // 32 | // To un-register: 33 | // --------------- 34 | // regasm.exe "C:\SVN\PowerMILL_Addins\PowerMILLVERICUTInterfacePlugin\PowerMILLVERICUTInterfacePlugin\bin\Debug\PowerMILLVERICUTInterfacePlugin.dll" /u 35 | // 36 | // 37 | // Registry Link to PowerMILL (Do not change "311b0135-1826-4a8c-98de-f313289f815e" as this is PowerMILL Guid): 38 | // ------------------------------------------------------------------------------------------------------------ 39 | // 40 | // REG ADD "HKCR\CLSID\{AFBB4C14-BD94-4692-98DE-645609C1B033}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:32 /f 41 | // REG ADD "HKCR\CLSID\{AFBB4C14-BD94-4692-98DE-645609C1B033}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:64 /f 42 | // 43 | // to delete: REG DELETE ... 44 | // 45 | // 46 | // REG DELETE "HKCR\CLSID\{AFBB4C14-BD94-4692-98DE-645609C1B033}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:32 /f 47 | // REG DELETE "HKCR\CLSID\{AFBB4C14-BD94-4692-98DE-645609C1B033}\Implemented Categories\{311b0135-1826-4a8c-98de-f313289f815e}" /reg:64 /f 48 | 49 | using System; 50 | using System.Runtime.InteropServices; // For Guid and ComVisible attributes 51 | using System.Windows.Forms; // For Message boxes and WinForms 52 | using System.Windows.Interop; // For WindowInteropHelper 53 | using Delcam.Plugins.Framework; 54 | using Delcam.Plugins.Localisation; 55 | 56 | namespace PowerMILLVERICUTInterfacePlugin 57 | { 58 | // Attributes that allow the SamplePlugin class to be created as a COM object 59 | // Note: regenerate this guid for each new plugin you create - it must be unique! 60 | // This plugin GUID is declared is many placed of the project so look for all of them! 61 | [Guid("AFBB4C14-BD94-4692-98DE-645609C1B033")] 62 | [ClassInterface(ClassInterfaceType.None)] 63 | [ComVisible(true)] 64 | public class PowerMILLPlugin : PluginFrameworkWithPanes, 65 | PowerMILL.IPowerMILLPluginLicensable, 66 | Delcam.Plugins.Framework.IPluginCommunicationsInterface 67 | { 68 | // Licensing 69 | string PowerMILL.IPowerMILLPluginLicensable.RequiredLicenses() 70 | { 71 | return ""; 72 | } 73 | 74 | // plugin version 75 | public static int VersionMajor { get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major; } } 76 | public static int VersionMinor { get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor; } } 77 | public static int VersionBuild { get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build; } } 78 | 79 | // The main pane 80 | private PowerMILLVERICUTInterfacePlugin.Forms.VericutPaneWPF oVERICUTPaneWPF; 81 | 82 | #region PluginFrameworkWithPanes 83 | 84 | 85 | protected override void register_panes() 86 | { 87 | // create the plugin pane 88 | oVERICUTPaneWPF = new PowerMILLVERICUTInterfacePlugin.Forms.VericutPaneWPF(this); 89 | register_pane(new PaneDefinition(oVERICUTPaneWPF, 780, 300, "VERICUT Interface", "Images/Logo24_1.png")); 90 | } 91 | 92 | public override string PluginName 93 | { 94 | get 95 | { 96 | return "VERICUT Interface"; 97 | } 98 | } 99 | public override string PluginAuthor 100 | { 101 | get 102 | { 103 | return "Autodesk"; 104 | } 105 | } 106 | 107 | public override string PluginDescription 108 | { 109 | get 110 | { 111 | return "Interface for VERICUT"; 112 | } 113 | } 114 | public override string PluginIconPath 115 | { 116 | get 117 | { 118 | return "Images/Logo32_1.png"; 119 | } 120 | } 121 | 122 | public override Version PluginVersion 123 | { 124 | get 125 | { 126 | return new Version(VersionMajor, VersionMinor, VersionBuild); 127 | } 128 | } 129 | 130 | public override Version PowerMILLVersion 131 | { 132 | get 133 | { 134 | return new Version(15, 0, 14); 135 | } 136 | } 137 | 138 | public override bool PluginHasOptions 139 | { 140 | get 141 | { 142 | return false; 143 | } 144 | } 145 | 146 | public override string PluginAssemblyName 147 | { 148 | get 149 | { 150 | return System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; 151 | } 152 | } 153 | 154 | public override Guid PluginGuid 155 | { 156 | get 157 | { 158 | return new Guid("AFBB4C14-BD94-4692-98DE-645609C1B033"); 159 | } 160 | } 161 | 162 | #endregion 163 | 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/PowerMILLVERICUTInterfacePlugin.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {3C56D408-065D-49CE-8268-61F4D56C075D} 9 | Library 10 | Properties 11 | PowerMILLVERICUTInterfacePlugin 12 | PowerMILLVERICUTInterfacePlugin 13 | v4.5.1 14 | 512 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | true 27 | full 28 | false 29 | bin\Debug\ 30 | DEBUG 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | pdbonly 37 | true 38 | bin\Release\ 39 | TRACE 40 | prompt 41 | 4 42 | false 43 | 44 | 45 | 46 | False 47 | .\PluginFramework.dll 48 | False 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | VericutPaneWPF.xaml 70 | 71 | 72 | True 73 | True 74 | Icons.resx 75 | 76 | 77 | 78 | 79 | True 80 | True 81 | Resources.resx 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | ResXFileCodeGenerator 93 | Icons.Designer.cs 94 | Designer 95 | 96 | 97 | ResXFileCodeGenerator 98 | Designer 99 | Resources1.Designer.cs 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | PreserveNewest 111 | 112 | 113 | PreserveNewest 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | PreserveNewest 122 | 123 | 124 | 125 | 126 | Designer 127 | MSBuild:Compile 128 | 129 | 130 | 131 | 132 | {38B343CC-4F1B-4AED-8196-EEEA6C0A7294} 133 | 1 134 | 0 135 | 0 136 | tlbimp 137 | False 138 | True 139 | 140 | 141 | 142 | 143 | {bf0bbb53-8992-45e5-bb3d-8ba8454d4ed4} 144 | PowerMILLExporter 145 | 146 | 147 | 148 | 155 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System.Reflection; 10 | using System.Runtime.CompilerServices; 11 | using System.Runtime.InteropServices; 12 | 13 | // General Information about an assembly is controlled through the following 14 | // set of attributes. Change these attribute values to modify the information 15 | // associated with an assembly. 16 | [assembly: AssemblyTitle("PowerMILLVERICUTInterfacePlugin")] 17 | [assembly: AssemblyDescription("")] 18 | [assembly: AssemblyConfiguration("")] 19 | [assembly: AssemblyCompany("Autodesk")] 20 | [assembly: AssemblyProduct("PowerMILLVERICUTInterfacePlugin")] 21 | [assembly: AssemblyCopyright("Copyright (c) 2018 Autodesk,Inc. All rights reserved.")] 22 | [assembly: AssemblyTrademark("")] 23 | [assembly: AssemblyCulture("")] 24 | 25 | // Setting ComVisible to false makes the types in this assembly not visible 26 | // to COM components. If you need to access a type in this assembly from 27 | // COM, set the ComVisible attribute to true on that type. 28 | [assembly: ComVisible(false)] 29 | 30 | // The following GUID is for the ID of the typelib if this project is exposed to COM 31 | [assembly: Guid("8ba3aaf5-dcf0-4d03-aa7a-42dc4be02a23")] 32 | 33 | // Version information for an assembly consists of the following four values: 34 | // 35 | // Major Version 36 | // Minor Version 37 | // Build Number 38 | // Revision 39 | // 40 | // You can specify all the values or you can default the Build and Revision Numbers 41 | // by using the '*' as shown below: 42 | // [assembly: AssemblyVersion("1.0.*")] 43 | [assembly: AssemblyVersion("2.0.21")] 44 | [assembly: AssemblyFileVersion("2.0.21")] 45 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/Resources.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | AAAAGUBDAQAiIFEDQUADmIACAQAEEEYAIBoEAOAACIg= 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/SetupFormData.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | 14 | namespace PowerMILLVERICUTInterfacePlugin 15 | { 16 | public class SetupFormData 17 | { 18 | public string Title { get; set; } 19 | public string Setup_template { get; set; } 20 | 21 | public SetupFormData() { } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/PowerMILLVERICUTInterfacePlugin/VericutMachineReader.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // Copyright 2018 Autodesk, Inc. All rights reserved. 3 | // 4 | // Use of this software is subject to the terms of the Autodesk license 5 | // agreement provided at the time of installation or download, or which 6 | // otherwise accompanies this software in either electronic or hard copy form. 7 | // ----------------------------------------------------------------------- 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Runtime.InteropServices; 14 | 15 | namespace PowerMILLVERICUTInterfacePlugin 16 | { 17 | public class VericutMachineReader 18 | { 19 | [DllImport("MR_wrapper.dll", CallingConvention = CallingConvention.Cdecl)] 20 | private static extern string MR_extract_machine_file_name_CPP(string projectFileName); 21 | [DllImport("MR_wrapper.dll", CallingConvention = CallingConvention.Cdecl)] 22 | private static extern int MR_extract_components_CPP(int option, string machineFileName, out IntPtr componentList); 23 | [DllImport("MR_wrapper.dll", CallingConvention = CallingConvention.Cdecl)] 24 | private static extern int MR_extract_subsystems_CPP(string machineFile, out IntPtr subsystemsList); 25 | 26 | public static List GetMachineSubsystems(string template_proj_fpath) 27 | { 28 | List subsystems = new List(); 29 | String machineFile = MR_extract_machine_file_name_CPP(template_proj_fpath); 30 | if (String.IsNullOrEmpty(machineFile)) 31 | { 32 | PowerMILLExporter.Messages.ShowError(Properties.Resources.IDFS_FailMachineFileRead); 33 | return subsystems; 34 | } 35 | 36 | IntPtr unManagedSlist = IntPtr.Zero; 37 | int scount = MR_extract_subsystems_CPP(machineFile, out unManagedSlist); 38 | if (scount > 0) 39 | { 40 | // Convert unmanaged strings received from C++ side to C# format and release memory 41 | // allocated on C++ side. 42 | UnmananagedStrings2ManagedStringList(unManagedSlist, scount, out subsystems); 43 | } 44 | return subsystems; 45 | } 46 | 47 | 48 | /**********************************************************************/ 49 | /** 50 | * Converts unmanaged C-style string into C# format. 51 | */ 52 | static void UnmananagedStrings2ManagedStringList(IntPtr unmanagedStrings, 53 | int count, out List managedStrings) 54 | { 55 | IntPtr[] intPtrArray = new IntPtr[count]; 56 | managedStrings = new List(); 57 | 58 | Marshal.Copy(unmanagedStrings, intPtrArray, 0, count); 59 | 60 | for (int i = 0; i < count; i++) 61 | { 62 | managedStrings.Add(Marshal.PtrToStringAnsi(intPtrArray[i])); 63 | // Free memory allocated to unmanaged strings. 64 | Marshal.FreeCoTaskMem(intPtrArray[i]); 65 | } 66 | // Free memory allocated to array of strings. 67 | Marshal.FreeCoTaskMem(unmanagedStrings); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /addin-powermill-to-vericut/README.md: -------------------------------------------------------------------------------- 1 | # PowerMill to Vericut 2 | 3 | Addin for PowerMill that exports stock, clamps, workpiece, tools, nc code and other required data from PowerMill to VERICUT. 4 | 5 | ## Setup 6 | 7 | To set this up for development you will need: 8 | 9 | - `MR_wrapper.dll`, this can be requested from CGTech (Vericut). This should be placed in the `PowerMILLVERICUTInterfacePlugin` folder. 10 | - `PluginFramework.dll`, this is found in a PowerMill installation, as documented in the main repository's [README](/README.md). It should be copied to the `PowerMILLVERICUTInterfacePlugin` and `PowerMILLExporter` folders. 11 | 12 | You can now open the Visual Studio solution and build it. 13 | 14 | ## Developing 15 | 16 | Once you have built the PowerMILLVERICUTInterfacePlugin solution, follow the instructions for **Running a Plugin** in the main repository's [README](/README.md). It is not necessary to follow the instructions in **Making the Plugin Accessible to PowerMill** if you have not changed the plugin class GUID, and have a version of the VERICUT Interface plugin installed (if you uninstall it you will need to follow those instructions). 17 | --------------------------------------------------------------------------------