From 2140b44a13a2a51ace99aec3a01637151a80b8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eugen=20H=C3=B6glinger?= Date: Wed, 26 Feb 2020 15:21:37 +0100 Subject: [PATCH] Projekt neu angelegt. --- .gitignore | 32 ++++++ Test_NXEditExcel/Test_NXEditExcel.sln | 25 +++++ Test_NXEditExcel/Test_NXEditExcel/Program.cs | 90 +++++++++++++++ Test_NXEditExcel/Test_NXEditExcel/ReadMe.txt | 103 ++++++++++++++++++ .../Test_NXEditExcel/Test_NXEditExcel.csproj | 73 +++++++++++++ 5 files changed, 323 insertions(+) create mode 100644 .gitignore create mode 100644 Test_NXEditExcel/Test_NXEditExcel.sln create mode 100644 Test_NXEditExcel/Test_NXEditExcel/Program.cs create mode 100644 Test_NXEditExcel/Test_NXEditExcel/ReadMe.txt create mode 100644 Test_NXEditExcel/Test_NXEditExcel/Test_NXEditExcel.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a5f80a --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ + +#Ignore thumbnails created by Windows +Thumbs.db +#Ignore files built by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +.vs/ +#Nuget packages folder +packages/ diff --git a/Test_NXEditExcel/Test_NXEditExcel.sln b/Test_NXEditExcel/Test_NXEditExcel.sln new file mode 100644 index 0000000..cb2c6f2 --- /dev/null +++ b/Test_NXEditExcel/Test_NXEditExcel.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_NXEditExcel", "Test_NXEditExcel\Test_NXEditExcel.csproj", "{187C3625-C4FE-4289-8F0E-EC21550B248D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {187C3625-C4FE-4289-8F0E-EC21550B248D}.Debug|x64.ActiveCfg = Debug|x64 + {187C3625-C4FE-4289-8F0E-EC21550B248D}.Debug|x64.Build.0 = Debug|x64 + {187C3625-C4FE-4289-8F0E-EC21550B248D}.Release|x64.ActiveCfg = Release|x64 + {187C3625-C4FE-4289-8F0E-EC21550B248D}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {458A3DAF-104D-4BF5-AEEB-939EA59D0339} + EndGlobalSection +EndGlobal diff --git a/Test_NXEditExcel/Test_NXEditExcel/Program.cs b/Test_NXEditExcel/Test_NXEditExcel/Program.cs new file mode 100644 index 0000000..f0029c8 --- /dev/null +++ b/Test_NXEditExcel/Test_NXEditExcel/Program.cs @@ -0,0 +1,90 @@ +using System; +using System.Windows.Forms; +using NXOpen; +using NXOpen.UF; +using NXOpenUI; +using NXOpen.Utilities; + +public class Program +{ + // class members + private static Session theSession; + private static UFSession theUfSession; + public static Program theProgram; + public static bool isDisposeCalled; + + //------------------------------------------------------------------------------ + // Constructor + //------------------------------------------------------------------------------ + public Program() + { + try + { + theSession = Session.GetSession(); + theUfSession = UFSession.GetUFSession(); + isDisposeCalled = false; + } + catch (NXOpen.NXException ex) + { + // ---- Enter your exception handling code here ----- + // UI.GetUI().NXMessageBox.Show("Message", NXMessageBox.DialogType.Error, ex.Message); + } + } + + //------------------------------------------------------------------------------ + // Explicit Activation + // This entry point is used to activate the application explicitly + //------------------------------------------------------------------------------ + public static int Main(string[] args) + { + int retValue = 0; + try + { + theProgram = new Program(); + + //TODO: Add your application code here + + theProgram.Dispose(); + } + catch (NXOpen.NXException ex) + { + // ---- Enter your exception handling code here ----- + + } + return retValue; + } + + //------------------------------------------------------------------------------ + // Following method disposes all the class members + //------------------------------------------------------------------------------ + public void Dispose() + { + try + { + if (isDisposeCalled == false) + { + //TODO: Add your application code here + } + isDisposeCalled = true; + } + catch (NXOpen.NXException ex) + { + // ---- Enter your exception handling code here ----- + + } + } + + public static int GetUnloadOption(string arg) + { + //Unloads the image explicitly, via an unload dialog + //return System.Convert.ToInt32(Session.LibraryUnloadOption.Explicitly); + + //Unloads the image immediately after execution within NX + // return System.Convert.ToInt32(Session.LibraryUnloadOption.Immediately); + + //Unloads the image when the NX session terminates + return System.Convert.ToInt32(Session.LibraryUnloadOption.AtTermination); + } + +} + diff --git a/Test_NXEditExcel/Test_NXEditExcel/ReadMe.txt b/Test_NXEditExcel/Test_NXEditExcel/ReadMe.txt new file mode 100644 index 0000000..70047a6 --- /dev/null +++ b/Test_NXEditExcel/Test_NXEditExcel/ReadMe.txt @@ -0,0 +1,103 @@ +======================================================================== + NX_OPEN : NXOpen_CS_Wizard1 Project Overview +======================================================================== + +NX12 Open C# Wizard has created this NXOpen_CS_Wizard1 project for you as a starting point. + +This file contains a summary of what you will find in each of the files that make up your project. + +NXOpen_CS_Wizard1.vbproj + This is the main project file for projects generated using an Application Wizard. + It contains information about the version of the product that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + + Executing User Exit Functions + ----------------------------- + + For execution of each user exit, corresponding Environment Variable need to be set with the full path + of the dll. + + The following environment variables are used to point to user exit executables. + Alternatively a single Environment Variable USER_DEFAULT can be set for all the Entry point. + +User Exit Environment Variable Entry Point + +Open Part USER_RETRIEVE ufget + +New Part USER_CREATE ufcre + +Save Part USER_FILE ufput + +Save Part As USER_SAVEAS ufsvas + +Import Part USER_MERGE ufmrg + +Execute GRIP Program USER_GRIP ufgrp + +Add Existing Part USER_RCOMP ufrcp + +Export Part USER_FCOMP uffcp + +Component Where-used USER_WHERE_USED ufusd + +Plot File USER_PLOT ufplt + +2D Analysis Using +Curves USER_AREAPROPCRV uf2da + +User Defined Symbols USER_UDSYMBOL ufuds + +Open CLSF USER_CLS_OPEN ufclso + +Save CLSF USER_CLS_SAVE ufclss + +Rename CLSF USER_CLS_RENAME ufclsr + +Generate CLF USER_CL_GEN ufclg + +Postprocess CLSF USER_POST ufpost + +Create Component USER_CCOMP ufccp + +Change Displayed Part USER_CDISP ufcdp + +Change Work Part USER_CWORK ufcwp + +Remove Component USER_DCOMP ufdcp + +Reposition Component USER_MCOMP ufmcp + +Substitute Component +Out USER_SCOMP1 ufscpo + +Substitute Component In USER_SCOMP2 ufscpi + +Open Spreadsheet USER_SPRD_OPN ufspop + +Close Spreadsheet USER_SPRD_CLO ufspcl + +Update Spreadsheet USER_SPRD_UPD ufspup + +Finish Updating +Spreadsheet USER_SPRD_UPF ufspuf + +Replace Reference Set USER_RRSET ufrrs + +Rename Component USER_NCOMP ufncp + +NX Startup USER_STARTUP ufsta + +Access Genius Library +Management System USER_GENIUS ufgen + +Execute Debug GRIP USER_GRIPDEBUG ufgrpd + +Execute User Function USER_UFUN ufufun + +Initialize new operation +Re-initialize an +existing operation USER_CREATE_OPER ufnopr + +CAM Startup USER_CAM_STARTUP ufcams + diff --git a/Test_NXEditExcel/Test_NXEditExcel/Test_NXEditExcel.csproj b/Test_NXEditExcel/Test_NXEditExcel/Test_NXEditExcel.csproj new file mode 100644 index 0000000..f0344e3 --- /dev/null +++ b/Test_NXEditExcel/Test_NXEditExcel/Test_NXEditExcel.csproj @@ -0,0 +1,73 @@ + + + + Debug + x64 + Exe + Properties + Test_NXEditExcel + $(PROJECT_NAME) + v4.6 + {187C3625-C4FE-4289-8F0E-EC21550B248D} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + C:\CAD\NX\NXBIN\managed\NXOpen.dll + + + C:\CAD\NX\NXBIN\managed\NXOpen.Guide.dll + + + C:\CAD\NX\NXBIN\managed\NXOpen.UF.dll + + + C:\CAD\NX\NXBIN\managed\NXOpen.Utilities.dll + + + C:\CAD\NX\NXBIN\managed\NXOpenUI.dll + + + + + + + + + + + + + + + + + + \ No newline at end of file