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 2126 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.; ^6 H( w% k3 M! ~8 I# \

% C5 M1 y. N! f0 j" H9 Z& k3 x, y

" g6 C9 V+ A8 V6 o& _( W- ZIf you are only working with one version of NX, the easiest thing to do is:
  `5 P3 Z7 S6 K' m' M
' B7 o( X" l" W: A1 Y: p    1) Use Control Panel-> System-> Advanced system settings-> Environment
8 }' E$ W3 e+ [6 \# b        Variables set a user environment variable named MSVCDir to point to the VC
" B! W. x# Z# ^        folder under the main folder of your Visual Studio install, e.g.
7 F) r' m# z; K3 x9 J( L& q# P$ T# }! f/ G$ [" V5 x) s

& F3 {" G: A0 \% a% u* b6 h) d0 @/ w            NX12.0:0 Y# x0 S3 O! E1 u6 b7 E& l
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC$ O7 w7 ?& r- c9 k: K$ X
            NX11.0:
  A* O, x( ~! W6 U  U                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" i% X# O, g$ p+ W8 m* [% a4 Y% r
            NX10.0:2 q9 ]1 P3 U  T, y) \8 O( J
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC1 K  P1 x* ?: V" @: y' z. W
            NX9.0:
1 f8 U# {( x0 m! w) m                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
; Y- `0 M+ [% B9 m4 ^+ x            NX8.5:
8 r' ]2 w7 z0 l% L                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC9 S4 p: s" i: Y. ~8 c
            NX7.5:. z+ M7 x' j' E/ X4 v7 N; Y
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
8 t. o/ x/ x; s$ l: u  P7 E            NX6.0:9 @& P3 f. K; T! ^( b- ]
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 8\VC: V$ L- u6 F$ z' m( _% q8 M; O3 _% w4 d

+ J+ @. g5 M9 O6 Z6 K

( h- P% w# T+ p- x- i& U    NOTE:  These are typical install folder paths and may not maTCh your set up!
) u( {* f$ T5 s9 g$ m* j3 J8 Y1 `. i. C" s
4 v0 ^! D8 U. f0 g* {

9 p# w% X; Q! E8 G8 [2 N. {
- g8 U" p6 \" ~4 f" N" Y2 i
    2) Start and NX Command Prompt window
2 Q/ _. K% j7 ^! k5 u8 U/ c& h        Start-> All Programs-> NX#-> NX Tools-> Command Prompt
) k- E3 ~+ B, R+ f& N5 t( l6 E/ m& @; R( t7 M5 i
- @% e. i# h8 ?7 o. B: A
        The new window should show that it is setting the environment for using the
7 b( |( y+ p- ^* ~; Q7 D        Microsoft Visual Studio.5 }* o# p1 _' b' G
9 n* w8 ?" z( o3 `" [5 I# V
0 ~1 K+ d6 e2 O
Step 1) only needs to be done once.5 m( ~$ E, Z6 E$ h9 @
) q$ A3 {- j) z% t4 V4 g
2 [7 O4 g1 u6 D$ C* z# ]
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:% T" _/ f7 B( m9 _/ x$ n
    - in the Toolbar <RMB>Customize
; D5 u" D( W  @    - on the Commands tab of the Customize dialog select Categories -> New Item
2 Y$ r4 D7 Q# m    - from Items, drag/drop New User Command onto the toolbar
* Z8 @/ N( `2 ^8 A: x# R    - on the new User Command button <RMB>Edit Action4 O* F, p8 A- z" c" \
    - on the Button Action dialog/ z; l- M4 X& A+ t: b* c- V, K5 {
        Type -> System Commands* O. |2 D9 h; @9 L. M& `  f
        Enter an Action or Browse
6 K' g$ q. L0 |4 ?" X            start "NX" cmd /k
' d  z% ]- h, _- G5 G# m2 W7 l2 h8 ?6 I        Enter Button Message Text
2 Z8 `- }8 D4 A( ^& @+ ~            NX Command Prompt& f* |9 X0 _0 |4 B
        OK* s/ e1 i5 ?7 @2 U; h5 M
    - Close (Customize)' B4 _! d& k+ W& f$ K
" t. L1 |  t! a5 M' P2 _

+ g+ {+ ?" n  g7 j  Y0 Q2 Z5 T. K0 _$ r% U! H; y; z( ]; ~; A4 M
  R- q0 L3 S- m" V1 z* }3 a% {
If 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:
9 {0 t7 Z+ r0 @0 W& \7 ^+ u& L* W: `0 k# Y- S& q
: g% O) O: @5 }$ j' M
    set UGII_BASE_DIR=<as appropriate (see Help-> Log File)>
. B! ]% y9 `, b, H    set MSVCDir=<as appropriate (see above)>
) c) Q8 j7 |$ l, W) n5 ]4 O    call "%UGII_BASE_DIR%\UGII\ugiicmd.bat" "%UGII_BASE_DIR%" AUTO  F! U5 ^# j4 x0 I
    for /F "usebackq delims==" %%i in (`env_print -n`) do set n=%%i# b$ a2 s+ c1 v/ d5 Z
    for /F "usebackq delims=," %%i in (`env_print -m`) do set m=%%i
( Q8 v$ N/ ]1 W: m& i. d" e  K    if "%m%"=="" ( title %n% Command Prompt ) else ( title %m% Command Prompt )9 L/ f2 N1 }  d9 r% Y, y
    cmd: ?* G  f6 v6 Y) t9 q- V$ f7 n

5 c8 y9 j8 d- r% N* W, V$ h. I

/ U* }$ _) V) `3 `) }8 TThe 3 lines starting for/for/if put the NX version in the title bar of the command window.  They can be omitted.9 Y, Q! q1 l0 K

: d& T: l$ C) h# x  H5 s! R8 ^4 ~
8 s! I- j0 x) G7 C
Put the .bat file or a shortcut to it on your desktop.  <Double-click> to run it.
  T( Z& b5 Q! X7 O8 l
7 @8 H- j' j8 K1 y: _7 S

9 e3 B  w/ G& JOnce the shell is set up correctly, you should be able to start NX from the Command Prompt window using the command "ugii".# U) I) q9 D" H2 j$ p

* C% D3 w9 u( ~5 J2 e& m" u

! W, z6 r, R0 o% }7 D7 w3 [To start the Visual Studio to build or debug NXOpen applications, enter the command "devenv".8 w0 {- l0 P; e

: C6 @0 m1 q3 O& h6 d' i
/ |& `' K% |: j0 V" h$ _
To run a journal in batch (background) mode:1 t: A2 C9 p/ @7 j# Z$ F6 ]
  run_journal <path to journal> -args <any journal args here>: G9 x& v% T  z* X3 ^4 |' ~
4 D4 X0 r( @+ q6 o7 h

+ ^6 ~( z' r4 b+ X# f3 e( W
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了