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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
  R; z% g4 ^; N5 u- j
9 ^. l9 q* J) {+ z* U+ X6 x
; E8 O  T0 ~7 J$ |/ q0 Y% q$ K6 {$ x% R
Once you have fully tested your NXOpen API application, you should "sign" it
! Z+ w3 _8 f/ g+ f. Jbefore distributing it to your end users.  Even if your end users also have
9 ?3 n. _% n$ O7 B- Laccess to the Author license which is required to load and run an NXOpen
# }& N0 C# z! v4 f; ~application, signing it has its benefits.
% p9 M3 V' s" ?  \/ Z( u# L, ?( m' t2 e- o) A
    - Your application will load faster because NX will immediately recognize' t. s; ]  T* \: e
      that it has been signed.. x& `, r1 N: t: g! D. A: [- ^7 k
    - The syslog (Help-> Log File) will not be cluttered with the output from
# u, H% o2 W# X6 a. O      the multiple checks that NX will do to determine whether it can load
7 C, h1 E9 D$ m# S      and run the program.
& u6 _+ a, \4 Z
2 q: ]. N8 Q/ K1)  C/C++, C# or VB only (Java: Proceed directly to step 3)/ E3 F$ c5 A5 i" O# D* v! l& M  b
" C. j8 d$ d- G( l
    Add the NXSigningResource to your Visual Studio project
0 i* n( t2 [' H: R% ], \4 h! P' o1 |/ ]$ f% w
    In the Solution Explorer, select the Resource Files folder and
3 b9 _" L& }6 i6 Y6 Q        <RMB>Add-> Existing Item
  N9 ?# q- M5 _4 t/ Q, r0 ]1 N5 h
" a4 u: N. [/ N: w! Q6 ^5 ^    C/C++:$ u" T" ]5 N% J7 v- l
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- Y: a0 V6 ]* T, ~    C# or VB .NET:: f' F9 ?. ~1 i# s
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
* e7 z5 b0 j6 ^( @/ }        Select the newly added NXSigningResource.res and in set3 y; V  _7 A9 `1 }
            Properties-> Build Action = Embedded Resource% D8 {1 h' F5 }. w4 }- i
8 O& A3 b7 H) B' L5 ?
2)  Make sure the build configuration is set to Release then
. q9 B2 U9 y2 q    Build-> Rebuild Solution! b6 I( l( @9 Q! ?+ C2 Q
: k/ w" Y. b# M% ?/ l8 L
3)  Sign the executable from an NX Command Prompt window:
  o$ j' q7 w5 h1 V2 {, S  U        You probably already have one open because you started the Visual6 I1 i8 M3 L& U# w
        Studio or Eclipse from it.  Otherwise:0 ]% M7 N, T/ M' K! x: O
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt+ T1 G4 }7 v, \9 Y5 s
9 L) r- d$ b" {8 y( s& M# ]
    Java:
/ ^: M) I( Y$ v7 R" J& |: ]        signJar <path to your>.jar
0 V/ _: ^$ R) ?
+ j9 y  U- f2 w" f' z    C/C++:
3 C9 Y) B. s3 L3 T0 z* \: p2 D        NX8.5 and later:
+ |7 F% M0 N" u; T            signCpp <path to your>.dll or .exe  @& ~) g3 V  \* T1 T, B
        NX8.0 and earlier:) N0 G* N' c& i+ G$ C) ?3 |( k* B5 G
            nxSign <path to your>.dll or .exe: g3 O( k9 Y+ t4 o: A) E/ ]
; q/ R0 E3 @( s, U& `
    C# or VB .NET:2 w" n) i" c7 W0 K/ r' [
        NX8.5 and later:4 k9 H1 a3 g. E
            signDotNet <path to your>.dll or .exe6 U+ w/ z" C0 C
        NX8.0 and earlier:
( P) L  f5 i1 e  q* i; `. p( U( C            signLibrary <path to your>.dll or .exe6 b( \0 e( E0 U2 w
/ R, k- D8 a2 J% d& C
Note:  You do not need to use the path to the signing utilities because the
3 i  I, E2 w/ l' z2 a) q+ R( oPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
* y* u' j- C$ p! bfolders.
1 Z+ p2 R' @0 {7 D, }* T8 y! V/ J
8 ^1 P3 p* s, w* [
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了