PLM之家PLMHome-工业软件与AI结合践行者

[原创] NX二次开发签名的方法完整版本,详细步骤如下:

  [复制链接]

2017-4-21 08:17:55 8293 1

admin 发表于 2015-2-25 13:00:05 |阅读模式

admin 楼主

2015-2-25 13:00:05

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x

* f/ u/ D5 k% k  @8 s* {; w
1 {4 a- [' B+ K3 P1 Z5 m; _9 x( C# b% R+ C1 G  [4 g
Once you have fully tested your NXOpen API application, you should "sign" it
# |' Y* U" Q' ]before distributing it to your end users.  Even if your end users also have2 e. I# E, a3 F9 r
access to the Author license which is required to load and run an NXOpen  P6 D/ a2 V: s" b1 a
application, signing it has its benefits.1 l* A; Z* j0 D) X/ q& q. k

& d* r+ `2 A$ O8 u8 H3 s    - Your application will load faster because NX will immediately recognize
0 j6 L! T; k4 p) t1 F- s2 Q      that it has been signed., I1 w( q* Z* a. p1 V
    - The syslog (Help-> Log File) will not be cluttered with the output from: a" e; Q' p. y" T
      the multiple checks that NX will do to determine whether it can load
; q5 H/ S1 D8 y! h% w3 }  x" T7 H      and run the program.
; p6 x& x$ e+ t0 N8 h0 i7 L( Q- I" ~3 w- I" ~* z
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)! ^" ~+ \% c  A& R1 P
# e0 ?: k" A. ]; ]* R
    Add the NXSigningResource to your Visual Studio project
. V4 u0 ^$ n0 b4 N5 i3 u& ~$ [  P
8 A# H# Z/ ~- h    In the Solution Explorer, select the Resource Files folder and0 }* j2 x" k7 H. ^9 k8 R
        <RMB>Add-> Existing Item
5 Q- h- Q: U2 M0 ?/ U* M3 l# S
* d( D$ i1 H$ g( E    C/C++:0 j$ U" k' R+ ]$ p7 }. z5 X7 Y
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
* ]1 ^& N$ @) Y# @    C# or VB .NET:
* h$ s" ]4 a0 p        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
" O' x. C7 g/ X. D7 Z        Select the newly added NXSigningResource.res and in set
0 S# N+ @$ q  Z6 E# k            Properties-> Build Action = Embedded Resource7 [3 V6 x8 B" r3 K2 r2 [2 \
* b  ^9 d% R4 C' b! k/ y
2)  Make sure the build configuration is set to Release then4 l# l6 [4 V# w1 F% J- ]
    Build-> Rebuild Solution
% ?! x; x5 V7 z% H" t7 a: [2 ]. `+ Z3 A0 U8 x# O0 O  \
3)  Sign the executable from an NX Command Prompt window:
# A- d: c; I2 b        You probably already have one open because you started the Visual' Z) W' u4 n9 }$ U, P
        Studio or Eclipse from it.  Otherwise:
3 z# B/ @2 I; _            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
$ Z7 l7 g' N& Q$ k+ x+ \! m
, u; ?+ ^* f' ^  n" Y) F    Java:
4 f8 x. |( \* u1 L        signJar <path to your>.jar
1 F+ i8 C. _1 q
4 y3 U5 t6 [) N' T; I5 g/ g    C/C++:& X  n# ]+ J0 c( Y# V$ l3 G
        NX8.5 and later:
+ V5 q" K2 Q2 \            signCpp <path to your>.dll or .exe
9 B9 f0 x# R" o7 J0 `5 z# r        NX8.0 and earlier:
0 y& Q: |# ?6 q            nxSign <path to your>.dll or .exe# d9 m* j/ y) u
3 m; b9 s* U; f  H( y) E
    C# or VB .NET:/ [  Y8 _- Z% t# X" g
        NX8.5 and later:
) E9 d2 P& I$ s! b- _; j            signDotNet <path to your>.dll or .exe, t' I' ~* x2 ~. g; H( A
        NX8.0 and earlier:$ o- y2 {& `/ m
            signLibrary <path to your>.dll or .exe
$ X4 h7 {3 j5 }. z+ [. T* Z/ h: k/ `, ], N; Z  p
Note:  You do not need to use the path to the signing utilities because the
1 s# E# A1 |0 W! {1 f, GPATH of the NX Command Prompt shell already includes both the UGOpen and UGII: e( `. F$ G' b
folders.
) |. C. F% g$ e( k; V4 i- p) D  N8 e1 ~+ h$ i
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

yejihu 发表于 2017-4-21 08:17:55

yejihu 沙发

2017-4-21 08:17:55

非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了