PLM之家精品课程培训

PLM之家精品课程培训

联系电话:18301858168   |   QQ咨询:939801026
NX二次开发培训

NX二次开发培训

UFUN/NXOpen C++和实战案例

适合初级入门或想深入了解二次开发的工程师,本培训结合ufun,NXOpen C++,大量的实例及官方内部的开发技术。
公众号二维码

关注公众号

点击扫描二维码免费在线高清教程

课程详情
Catia二次开发培训

Catia二次开发培训

市场需求大,掌握核心技术前景广阔

Catia二次开发的市场需求大,人才稀缺。掌握开发技能潜力巨大,随着经验积累将在汽车、航空等领域有所作为。
B站二维码

在线原创B站视频

点击关注工业软件传道士主页

课程详情
Teamcenter培训

Teamcenter培训

全方位培训,从基础应用到高级开发全覆盖

涵盖用户应用基础培训、管理员基础培训、管理员高级培训及二次开发培训等全方位内容,由多年经验讲师打造。
QQ群二维码

加入同行交流

点击扫描二维码加入QQ群

课程详情
×

PLM之家plmhome公众号

课程涵盖: PLM之家所有原创视频

×

关注B站视频

所有高清视频一览无余,全部在线播放学习

×

加入PLM之家QQ群

同行交流,疑问解答,更多互助

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

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

[复制链接]

2018-6-5 16:10:49 2823 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.
: A- g/ v" P! p' y
; u) s" N; X0 u% `; Q
: g/ x/ a! t1 S! S, O" E) a
If you are only working with one version of NX, the easiest thing to do is:1 s( K7 |2 u" d9 x/ R" l# L6 |! }
: D; O* M" \: `
    1) Use Control Panel-> System-> Advanced system settings-> Environment
6 k! R) z" K, o" g        Variables set a user environment variable named MSVCDir to point to the VC/ p, V& _* R* v3 Y% j, z; l, }( _
        folder under the main folder of your Visual Studio install, e.g.5 x0 l) Q0 c- ?, O" \; s$ I4 |, T9 y

7 Y' ?- p; a7 \

" b9 f. I) D/ t- |            NX12.0:, [, }% h& o' o" r- j9 ^9 }7 W& c
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
3 p, A# e; b: c& t! u            NX11.0:/ R* U, c1 d' c
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC7 Y; |# i- L! |: L5 D6 p# n
            NX10.0:. k' ~* @2 h$ h! _/ U- C7 Y$ B6 c
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
' D+ M8 w! ^6 O' ?- M            NX9.0:
/ d, G9 {8 h0 k1 W; K) x5 h. Z                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
/ u/ ?7 U1 c9 _            NX8.5:
# h; ~0 Y+ |, d9 V                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
4 {5 r. e! A: u$ Q# T            NX7.5:
& y2 {; |/ @) k' e0 E6 r                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC8 K* T- E0 x! ]
            NX6.0:6 b: y9 J! r5 g! f' d" x6 V* b. q
                MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 8\VC
6 y1 I/ h" h$ h5 r) D0 q4 s! j) k3 N$ f9 b

5 ~6 h# n$ V& c2 v$ C    NOTE:  These are typical install folder paths and may not maTCh your set up!6 E3 v6 w2 x1 q1 I: y
. M5 t+ q1 P% f' N8 A6 ~" ]
& J8 ?  F4 A! a

0 U* x2 A9 ^( @8 j5 N8 [/ \8 F1 ?
; \2 d; Z1 S9 X1 m4 H
    2) Start and NX Command Prompt window
# d, X- v2 G& P# ?5 [1 ?) U        Start-> All Programs-> NX#-> NX Tools-> Command Prompt% Q" y- @' \* p5 ~; d5 ^: U! b
& ]- s% h/ z/ q, q) M

( d3 y/ o9 N  W        The new window should show that it is setting the environment for using the, H# q7 q" h- z; |
        Microsoft Visual Studio.: F  S, Q! E% O% t

8 {! s0 S, S' `7 v
; |, l% K1 `0 w+ N$ I
Step 1) only needs to be done once.
( M: _: w; f; x
4 D( g: b7 G3 S7 }2 x

% U3 q- T5 T* sAnother 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:
1 L, b5 E* G' g( W  o2 D' U9 N4 Z4 ~    - in the Toolbar <RMB>Customize" m# l0 i7 O1 m6 y, m; ^
    - on the Commands tab of the Customize dialog select Categories -> New Item
; Q+ u$ O3 u- p% q    - from Items, drag/drop New User Command onto the toolbar
; Q# Z- x3 a' q5 X  @    - on the new User Command button <RMB>Edit Action
* e( ^( k+ |- S7 g    - on the Button Action dialog/ h' B- A! h1 T+ A
        Type -> System Commands* B) i9 T* L/ M4 Z- y8 d
        Enter an Action or Browse& s& L$ h# Z4 i  T5 Q- Q' _4 U
            start "NX" cmd /k' L6 t8 [/ @3 D" e
        Enter Button Message Text! q" E+ X/ J2 d3 B5 X
            NX Command Prompt
7 R( o6 ?& S8 d; \: H        OK. z. k; w* Y! u+ R6 ?
    - Close (Customize)3 b1 `) o! B* |8 o8 {: L

9 J) Z! a# a+ z  f" a2 q( i

' j2 y0 h0 {/ q4 h0 `- c. L, p4 H. Q. l" ~
: d$ {: Q' e* q; D( _. {
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:5 ~8 U9 ~+ c* D& G% T
" `( L5 e" @7 f. `) G' e; Q

2 ]. g# L! x7 Q1 g; S2 J    set UGII_BASE_DIR=<as appropriate (see Help-> Log File)>* |% y* j1 C, y! l" u0 `8 B! D
    set MSVCDir=<as appropriate (see above)>
2 l6 s7 O. R3 E* `1 b0 p    call "%UGII_BASE_DIR%\UGII\ugiicmd.bat" "%UGII_BASE_DIR%" AUTO- F- p7 P; N0 @" n
    for /F "usebackq delims==" %%i in (`env_print -n`) do set n=%%i- x5 c+ L9 o8 P: F; x/ `$ t4 f
    for /F "usebackq delims=," %%i in (`env_print -m`) do set m=%%i2 D5 g+ \6 H  h+ l9 ]* [
    if "%m%"=="" ( title %n% Command Prompt ) else ( title %m% Command Prompt )
+ u9 w9 g# l* w0 s% V) z6 m    cmd# m) t1 L) b) T+ f8 W% @
; m; T) O# H3 F1 P

: {% u* J5 _* x6 W+ K7 hThe 3 lines starting for/for/if put the NX version in the title bar of the command window.  They can be omitted.
4 o7 I! B6 q! Z, p) f& [, A9 J  P% J9 L1 @* |

, I. H; k5 z/ F% x! {Put the .bat file or a shortcut to it on your desktop.  <Double-click> to run it.- H8 |! X0 }  ^: m6 \! d2 a5 Z

3 P* x# L7 `% M/ ~6 Z2 q* z
8 b7 n$ r1 M, i* i5 f
Once the shell is set up correctly, you should be able to start NX from the Command Prompt window using the command "ugii".
2 |) L- a! _7 Y7 K% \3 c/ v3 t8 S' S6 m% Q7 u4 {
; `) ~4 \2 s! {! W! k
To start the Visual Studio to build or debug NXOpen applications, enter the command "devenv".
" X. E+ d8 u  p8 `& W6 {$ J* U5 a3 e: ]# P+ b$ D
* u2 W/ k$ l/ x$ Q+ L+ Q  U! V* \4 }
To run a journal in batch (background) mode:
1 e+ G: R, ^- q# ?  run_journal <path to journal> -args <any journal args here>
& m3 l- k  ?( M" k! F7 W  U( ?" }" t2 B) u% b; ?

1 T; f3 I( p7 R/ A5 u
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了