PLM之家精品课程培训,联系电话:18301858168 QQ: 939801026

  • NX二次开培训

    NX二次开培训

    适合初级入门或想深入了解二次开发的工程师,本培训结合ufun,NXOpen C++,大量的实例及官方内部的开发技术对于老鸟也值得借鉴!.

    NX CAM二次开发培训报名 NX二次开发基础培训报名
  • PLM之家Catia CAA二次开发培训

    Catia二次开发培训

    Catia二次开发的市场大,这方面开发人才少,难度大。所以只要你掌握了开发,那么潜力巨大,随着时间的积累,你必将有所用武之地!

  • PLM之Teamcenter最佳学习方案

    Teamcenter培训

    用户应用基础培训,管理员基础培训,管理员高级培训,二次开发培训应有尽有,只要你感兴趣肯学习,专业多年经验大师级打造!

  • PLM之Tecnomatix制造领域培训

    Tecnomatix培训

    想了解制造领域数字化吗?想了解工厂,生产线设计吗?数字化双胞胎,工业4.0吗?我们的课程虚位以待!

PLM之家PLMHome-国产软件践行者

[UG NX高级技巧] 202. NX命令行相关详细配置讲解

[复制链接]

2018-6-5 16:10:49 2553 0

admin 发表于 2018-6-5 16:10:49 |阅读模式

admin 楼主

2018-6-5 16:10:49

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

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

x
When starting the Visual Studio to build and/or debUG NX applications, as well as when using NX utilities such as the signing tools or when running NX journals or applications, it is important that the command shell is set up correctly.  This is especially important when you are working with multiple NX versions.  Q0 B: ?5 z! h3 U4 F
& Y+ x' R; x8 y2 _; U6 L

% m4 {' e+ I; D. L1 t) gIf you are only working with one version of NX, the easiest thing to do is:* M% B9 z9 {- K3 s
! V* m' \' [" V/ T' d" T- l
    1) Use Control Panel-> System-> Advanced system settings-> Environment
7 h/ m0 m6 @% I% N6 _  H        Variables set a user environment variable named MSVCDir to point to the VC: A4 o$ p6 [% X: \
        folder under the main folder of your Visual Studio install, e.g.  S  X" o* @% K7 l1 p

5 K: X  X8 w8 A, Y1 s" n
" z; u' T* m, r) y2 U/ Q
            NX12.0:6 e% k, }! l4 |. I% ~2 m
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC( l, F) h% Z# h& h0 V6 |9 ]/ _
            NX11.0:
2 M* e/ }" [5 r( k- Y( U' @* i                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC! D3 B1 h( ]/ O; r$ c4 D: q+ Y$ H2 s
            NX10.0:
$ q" v' D! \& K$ {! e' I9 [0 ^                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC. g/ }  j! F0 c4 A
            NX9.0:
3 R7 N  f( E+ T$ i7 r5 a                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC! E6 R4 b7 _% M4 y2 \
            NX8.5:
- `1 g7 O' _  M+ b/ n                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
/ v" y4 o. z5 I% }/ a1 q( w            NX7.5:" \# A* B1 @4 _
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC5 i1 B9 v/ d5 g! g0 u
            NX6.0:
8 K2 Y8 ]/ h9 w$ D( n. X4 z$ z                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 8\VC
. Q/ v6 r& q8 E" x8 f6 @1 }( i& H
8 x- M+ s' M2 a
* Z& \* w4 b8 t# p
    NOTE:  These are typical install folder paths and may not maTCh your set up!: v2 V* o" k: E" e9 H: G3 V

& ]* M9 j. S5 W) h/ E: D
2 [3 e: c& R, C$ C( a" Y

% @4 P" }& i7 l9 X
2 G4 z' L$ e: [$ P# i
    2) Start and NX Command Prompt window
" i" Y! q# [9 K        Start-> All Programs-> NX#-> NX Tools-> Command Prompt
- h. s5 @, Q+ U: w
5 z( V/ Z; T; J6 c5 h9 A6 i; g

3 R( B$ V1 }0 {, ]        The new window should show that it is setting the environment for using the. }; a: g% l: {$ F4 M& s1 P
        Microsoft Visual Studio.! o  S+ w$ |9 k1 O  b# ]: P
& [) ?& q$ X5 z; A+ l
2 w( F8 l$ X  y. O1 B+ H
Step 1) only needs to be done once.
- g$ N$ p7 j2 w  c1 n7 A) W. B: A! O; n% \0 Y
- s; b& d! {# n; R' a
Another way to get a shell environment which is exactly the same as NX's is to start a shell from within interactive NX using a custom button added to the toolbar using these steps:
# g, k. ?$ w+ n4 ?: p- F1 U0 E    - in the Toolbar <RMB>Customize
: D, C, i6 A5 I7 p; j% P    - on the Commands tab of the Customize dialog select Categories -> New Item
! j& M/ G0 E- w+ {% F% M    - from Items, drag/drop New User Command onto the toolbar) T, b/ P: S9 f+ z) k% V3 ?
    - on the new User Command button <RMB>Edit Action5 ]8 {. s4 g& j4 C! H, o5 q
    - on the Button Action dialog! w$ @$ V8 U' I  b) t/ K
        Type -> System Commands
6 M/ q/ U9 r6 V        Enter an Action or Browse
6 F. J3 T8 X) I$ P  h            start "NX" cmd /k$ v( a& _1 I0 n, K+ R3 q
        Enter Button Message Text
- j# d* i6 @! g% U* P; n; i2 O$ o            NX Command Prompt! E$ C: y8 H* l/ X1 N1 r% G
        OK5 i0 }. b9 b8 a% y  G9 i( B& J
    - Close (Customize)8 G9 q2 i6 I7 X% v- O* m* J: [( u1 x

- r8 X5 c6 a+ u7 s

3 m* I/ Q' Z. Q/ `3 x, c
2 ]7 z( A8 H* s% a( p

) r, K7 y/ r1 P. NIf you are working with multiple NX and their corresponding Visual Studio versions, then you might want to make a .bat file to start the NX Command Prompt for each one.  The contents would look like this:
2 r4 i9 \/ S3 u6 @+ @
' M+ |  w" J6 K" _" }( N1 |
. M) V0 H. B) O9 V: ]7 R7 V# L( Y  Z
    set UGII_BASE_DIR=<as appropriate (see Help-> Log File)>& W; a8 X# R$ U  t) r0 n" }
    set MSVCDir=<as appropriate (see above)>
( j$ c2 ?, N0 d& Q    call "%UGII_BASE_DIR%\UGII\ugiicmd.bat" "%UGII_BASE_DIR%" AUTO
. H' e" l9 s( r% e    for /F "usebackq delims==" %%i in (`env_print -n`) do set n=%%i6 F/ }( H% R( w2 s* V) F
    for /F "usebackq delims=," %%i in (`env_print -m`) do set m=%%i7 v, |. H; \8 j% j3 f4 g8 e: u. J
    if "%m%"=="" ( title %n% Command Prompt ) else ( title %m% Command Prompt )8 {3 X6 @6 R: `, G
    cmd4 P$ Z- f$ W, O! E( a, K4 I

6 q: w/ e, o( G, {

/ R) W% ^- b+ n8 x2 }) ?* Y. zThe 3 lines starting for/for/if put the NX version in the title bar of the command window.  They can be omitted.& ?+ l" U0 U1 J. K; d7 w( @' E; C
5 t' H# R4 z$ u& p1 I, ]
$ B4 T$ d6 i, W4 a3 n
Put the .bat file or a shortcut to it on your desktop.  <Double-click> to run it.
5 G% x3 P$ S8 g6 V! ^& F2 q0 {% q: h: o# Z6 t1 [3 o' y9 R3 d
1 @6 V2 n: d$ Y% g/ C
Once the shell is set up correctly, you should be able to start NX from the Command Prompt window using the command "ugii".: Q  d% m, }" @: @/ z0 U6 I+ f
0 t1 n/ h5 t3 ~! u

; `; y7 [/ [$ yTo start the Visual Studio to build or debug NXOpen applications, enter the command "devenv".
8 a7 ?. s' {3 e
. a/ l1 m$ l2 D0 F

, l& Y. j/ @$ w% ~! C# k0 ZTo run a journal in batch (background) mode:
0 p$ {8 E& f7 w. ?$ _6 E/ }  run_journal <path to journal> -args <any journal args here>' M7 ]& r/ J1 O
9 b6 N* [* L, }1 ~

5 M# Y" y, m1 X- }, k
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了