• Build a NX Open .NET application


    A basic setup to build a NX Open .NET application using Visual Studio (IDE)

    Interactive Application: .NET authoring license is required

    Start Visual Studio 2003 (7.1)

    Create class library project

    • File -> New -> Project -> Visual C# Projects (project types) -> Class Library

    Add references

    • Project -> Add Reference…

    Browse to UGII_BASE_DIR\UGII\managed\
    Add the following files

    • NXOpen.dll
    • NXOpen.Utilities.dll
    • NXOpen.UF.dll
    • NXOpenUI.dll (only needed if you build an user interface for your application)

    Add Main() function to the class

      public static void Main()
      {

      }

    Compile and build the application

    Test Appilcation:

    Launch NX

    Run your sample application

    • File -> Execute -> NX/Open… (browse to your sample application \bin\Debug\ location, select your application.dll)

    Sign Application:
    In order to release an application and have non programers use this (someone without a .NET authoring license) you need to sign your application.

    Add resource file NXSigningResource.res to your Visual Studio project

    • File -> Add Existing Item -> browse to UGII_BASE_DIR\UGOPEN\NXSigningResource.res

    Set the NXSigningResource.res file Build Action to Embedded Resource

    • Properties on the NXSigningResource.res file that’s attached to your Visual Studio project

    Sign the application, at a command prompt:

    • UGII_BASE_DIR\UGII\SignLibrary.exe yourSampleApplicationLocation\sampleApplication.dll

    If you don’t sign your application when you release it to your end users, they will be required to have a “.NET authoring license”. This is very costly and unnecesary.

    Set your Project Configuration Build to Release
    This will change the build arguments and remove the unnecessary debug statements for the released application

    • Build -> Configuration Manager
    • Set “Active Solution Configuration” to Release

    Compile, Build, and test

    Summary
    This application does not do anything but it does set up the foundation needed to get an application built using the Visual Studio IDE and have it signed for release.

    reference:

    http://plmexchange.net/build-a-nx-open-net-application/#comment-713

    image

    欢迎访问我的专业知识博客!
    博主:白途思(begtostudy)
    微信/QQ:370566617
    Email:begtostudy#gmail.com
    欢迎访问我的其他博客:我的编程知识博客 我的学术知识博客

  • 相关阅读:
    AC日记——色板游戏 洛谷 P1558
    AC日记——方差 洛谷 P1471
    AC日记——[Scoi2010]序列操作 bzoj 1858
    AC日记——Sagheer and Nubian Market codeforces 812c
    AC日记——Sagheer, the Hausmeister codeforces 812b
    AC日记——Sagheer and Crossroads codeforces 812a
    [BJOI2019]排兵布阵 DP
    多重背包二进制优化
    BZOJ 3211 花神游历各国 线段树
    「CQOI2006」简单题 线段树
  • 原文地址:https://www.cnblogs.com/begtostudy/p/1882017.html
Copyright © 2020-2023  润新知