|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1. Using Visual Studio - create a new project using the NX Open AppWizard.
7 F6 w3 m" @; Y X1 a5 H This is described in the NX Open for C/C++ -> Open C Reference Guide ->
+ x6 K6 R' e) d0 x+ J3 R* c Overview -> setting up your system. The image being created is an external
+ `9 u" J+ j* X User Function program using C++ and Open C++ calls.
" g) _ G L1 M( u) l* e 2. Make sure configuration type of the project is Dynamic Library (.dll) . Go to
4 Y; R& m: M* F- `6 M$ @' J. t Project->Properties (Alt + F7), select/expand Configuration Properties->General and set! D1 F" L& x$ }2 e9 ~$ h3 A7 z: U# x
the "Configuration type" to Dynamic Library (.dll).
& c+ Y3 b/ ?: S: e8 }8 [# x& R4 M- O 3. Make sure the output file is generated with extension .dll. Go to ]3 m R2 D6 J0 g2 ?
Project->Properties (Alt + F7), select/expand Configuration Properties->Linker and set the3 l$ }; w5 d* b R1 o' H: U$ w
"Output File" with the .dll extension.
& h3 z* F# P3 S1 W 4. Add the OntSelectionBoilerPlate.cpp file by selecting the Project
4 W: \0 j. H1 |! L* g pulldown and select "Add Existing Item...". Select the file using the popup! Z1 g r9 n7 C
window.
/ \5 e: |1 ?- M# Q; B! t 5. Add $(UGII_BASE_DIR)\ugopenpp as one of the include directories. Go to Tools->Options, 7 s) c: ?; h) I0 h. ^6 q
select/expand Projects and Solution->VC++ Directories. On right side window select
7 C& q- A$ s3 T) d2 R "Include files" option available under "Show Directories for:" pulldown. Add $(UGII_BASE_DIR)\ugopenpp 4 U8 y* e9 m6 t! ~! }! P) h
to the existing list.
8 a* i, p5 j9 ]1 M/ `# x! D 6. Add libopenpp.lib and libvmathpp.lib libraries to the project. Go to Project->Properties (Alt + F7),
5 A) s, r8 J# h& w8 @$ Z. T select/expand Configuration Properties->Linker->Input. Provide libopenpp.lib and libvmathpp.lib4 ^3 u8 n! X$ B3 Q4 O$ G. H
in the "Additional Dependencies" row.
% e% Q W. ~3 d! P' k) ^9 f- Q 7. Build the external image by going to the Build menu and selecting either & M1 C8 k6 C( C& K* i) C. I$ k
"Build Solution" or "Rebuild Solution".
7 h5 a- ^$ T6 l4 S* ? This will create an Dynamic Library called OntSelectionBoilerPlate.dll in the Debug directory.# E" _, ~) S# w* w/ j
* Y/ u/ \& U/ ^1 W7 O |
|