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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
" v, e+ T7 ^) I( B" H# \1 [

7 J& P7 h; }8 p/ y$ \! H
8 h: v/ J% L  C3 Q! x3 r) W' x0 OOnce you have fully tested your NXOpen API application, you should "sign" it  Y* J0 u6 u! O5 C
before distributing it to your end users.  Even if your end users also have. J/ Z! @1 ^6 J: [& U- t+ I
access to the Author license which is required to load and run an NXOpen! {8 i' d& {# n2 K
application, signing it has its benefits.1 Y. X- m/ a. P( c9 ]
2 G- l" g8 y& V' X0 F8 U% i
    - Your application will load faster because NX will immediately recognize, a% s* U0 S( L0 m1 S3 a* O
      that it has been signed.
6 R8 g0 A( N9 }+ G* A, n& G0 u    - The syslog (Help-> Log File) will not be cluttered with the output from
, v. F* b7 [) {4 ?; {6 j3 Y      the multiple checks that NX will do to determine whether it can load
5 s( k2 }$ s+ h; D* O  d3 Y4 }      and run the program.
5 u+ e4 T+ ?1 y
  j% \  ?4 P! Q/ l  h; \1)  C/C++, C# or VB only (Java: Proceed directly to step 3), g8 w# J9 Y3 F0 L9 |
/ p# @3 M6 g  b+ E# W5 H  G
    Add the NXSigningResource to your Visual Studio project
+ e, @/ \5 |3 s5 d1 _9 r) g
* E0 f' ]1 M- k* H6 ~: o9 i    In the Solution Explorer, select the Resource Files folder and
& ~& |* c3 U5 i- h& I. \        <RMB>Add-> Existing Item
' z9 h; Q# h& b# Y! o$ b/ z: k/ A1 @& |  z  o) B. H+ V
    C/C++:9 k# R/ \: A8 {0 V- i: f* v& C
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
( `) Y. X3 B2 ]1 s    C# or VB .NET:
1 S; b: M+ x3 `3 q        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; _  I& ^+ z. G0 A, _        Select the newly added NXSigningResource.res and in set
9 `* V) j" E2 N5 [5 M" \0 p            Properties-> Build Action = Embedded Resource0 a# L( a7 v# w+ v- b

5 g! C4 B; s% j3 [. w2)  Make sure the build configuration is set to Release then/ D1 a9 F2 {: g# v* W( Q! T3 q) c
    Build-> Rebuild Solution, U2 ^% [' N+ \8 d* ]7 s/ O, m" q/ {

; E) v/ A5 p7 y, _3 ^; K1 j3)  Sign the executable from an NX Command Prompt window:) J7 J" l! u' g
        You probably already have one open because you started the Visual* b3 b' y2 f. d9 `8 a5 X3 g6 [# E
        Studio or Eclipse from it.  Otherwise:; |8 a3 y3 a, ?6 s
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt  S, A; K/ N0 \( Z. `3 O" M5 i
5 r  \0 X3 {6 w) a9 p
    Java:
4 C" q$ ~1 c2 f+ N/ q+ ?0 M        signJar <path to your>.jar
7 x) G2 e: D1 h  e: U
3 i: v# {4 p! C- p0 ^$ t4 o+ h    C/C++:5 u7 T& r0 c9 {0 Q5 k) v
        NX8.5 and later:
9 x8 ]. b6 q6 l% e) ]- J4 H            signCpp <path to your>.dll or .exe- j1 l& ]/ C5 s+ K" N7 O4 N
        NX8.0 and earlier:  |* a8 y) G1 t( g, L
            nxSign <path to your>.dll or .exe
  ~  N$ I3 J$ ]2 D1 q$ O9 `2 ^: X2 }) W, ?" N  \3 n0 ?
    C# or VB .NET:# z6 |" v5 h/ w. E, n
        NX8.5 and later:& X6 m) s5 v6 j4 T0 O
            signDotNet <path to your>.dll or .exe" ]6 P+ E6 K% q# z
        NX8.0 and earlier:% [0 u( ~$ p6 t/ }
            signLibrary <path to your>.dll or .exe# K! P# T! e# M
# j: k/ T% T+ H! E/ y
Note:  You do not need to use the path to the signing utilities because the. y$ N5 F2 E( B" N" ^3 L/ j& W
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
4 ~: A7 d) Q0 a: H3 tfolders.
8 C) }# f7 A, M2 T! S" x6 z1 s' F
. a: v% }3 y: W0 `2 K; h% ~
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了