|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1. Using Visual Studio - create a new project using the NX Open AppWizard.! d: B5 X! m6 f( }9 _
This is described in the NX Open for C/C++ -> Open C Reference Guide -> : B7 H; O5 n+ j& g6 B7 `' _
Overview -> setting up your system. The image being created is an external
$ W( K6 V5 [# s; a( `0 ]) J User Function program using C++ and Open C++ calls.
# o: v7 q5 x5 ~ z2 | 2. Make sure configuration type of the project is Dynamic Library (.dll) . Go to : V5 T% h+ a e4 P* a# ?/ p7 g
Project->Properties (Alt + F7), select/expand Configuration Properties->General and set
: u; w* u$ n: t, g$ a/ L+ M# z* s the "Configuration type" to Dynamic Library (.dll).9 L* i7 [ ^* G! m
3. Make sure the output file is generated with extension .dll. Go to
& H7 d8 q; U. H% ]4 R Project->Properties (Alt + F7), select/expand Configuration Properties->Linker and set the
% M% \! O: w, F6 t. Z& d "Output File" with the .dll extension.
1 E% G$ V/ h/ i' w- A5 m 4. Add the OntSelectionBoilerPlate.cpp file by selecting the Project1 Y$ r& K! o( ^7 m3 ^( _+ N
pulldown and select "Add Existing Item...". Select the file using the popup
: q- w+ Q8 H( s3 T window.9 I0 e0 p/ d* N4 b8 a5 w! q
5. Add $(UGII_BASE_DIR)\ugopenpp as one of the include directories. Go to Tools->Options,
2 z Q% R6 F2 [$ ]" e& M9 x select/expand Projects and Solution->VC++ Directories. On right side window select
. `) Y/ m$ K3 A0 h "Include files" option available under "Show Directories for:" pulldown. Add $(UGII_BASE_DIR)\ugopenpp
( g9 e4 B. J2 A. }- t3 ]: S: a# {% H to the existing list., \ B) I* ^# S. w0 {( o, U `& A
6. Add libopenpp.lib and libvmathpp.lib libraries to the project. Go to Project->Properties (Alt + F7), : R1 L; { ^, S, z5 D' F
select/expand Configuration Properties->Linker->Input. Provide libopenpp.lib and libvmathpp.lib% d8 r M9 ] A8 G0 D2 c
in the "Additional Dependencies" row.% K" W2 P. T7 i n; @ Z6 S% F2 P
7. Build the external image by going to the Build menu and selecting either ! r' M0 ^4 c% q8 L# e2 i2 X
"Build Solution" or "Rebuild Solution". h Y4 t3 k5 H$ G, F; I
This will create an Dynamic Library called OntSelectionBoilerPlate.dll in the Debug directory.
1 ^( Z7 m; X6 @8 N( B, a. s0 j
+ B# @0 V& X' P |
|