/// <summary> /// Create the NXF File /// </summary> /// <returns></returns> /// <remarks></remarks> private static bool GetListOfTools(SetupInfo setup_info, PluginSettings plugin_settings, string output_dir, out PowerMILLExporter.Tools.Tools setup_tools) { List <PowerMILLExporter.Tools.NCProgramTool> oTools = new List <PowerMILLExporter.Tools.NCProgramTool>(); int iInitToolNum = -1; bool bReturn = true; List <int> oUsedToolNumbers = new List <int>(); PowerMILLAutomation.ExecuteEx(String.Format(System.Globalization.CultureInfo.InvariantCulture, "$Powermill.Export.TriangleTolerance = \"{0}\"", plugin_settings.export_options.tool_tol)); setup_tools = new PowerMILLExporter.Tools.Tools(); // For each NC prog, create and add tools in list of tools for (int nc_i = 0; nc_i < setup_info.nc_progs.Count; nc_i++) { if (String.IsNullOrEmpty(setup_info.nc_progs[nc_i].sName)) { continue; } EventLogger.WriteToEvengLog("Get all toolpaths for nc program " + setup_info.nc_progs[nc_i].sName); setup_info.toolpaths = PowerMILLAutomation.GetNCProgToolpathes(setup_info.nc_progs[nc_i].sName); EventLogger.WriteToEvengLog("Get all tools for nc program " + setup_info.nc_progs[nc_i].sName); //OTools get's out of the function with the first toolpath missing MainModule.FillNCProgramTools(setup_info.nc_progs[nc_i].sName, setup_info.toolpaths, nc_i, out oTools, ref iInitToolNum); setup_info.nc_progs[nc_i].oTools = oTools; EventLogger.WriteToEvengLog("Get tool info for nc program " + setup_info.nc_progs[nc_i].sName); bReturn &= WriteTools.CreateListOfTools(setup_info.toolpaths, output_dir, setup_info.nc_progs, ref oUsedToolNumbers, ref setup_tools); } return(bReturn); }