1 NX9 + VS2012 2 3 #include <uf.h> 4 #include <uf_view.h> 5 #include <uf_modl.h> 6 7 8 UF_initialize(); 9 10 //创建块 11 UF_FEATURE_SIGN Sign = UF_NULLSIGN; 12 double CornerPt[3] = { 0.0, 0.0, 0.0 }; 13 char *EdgeLen[3] = { "100", "100", "500" }; 14 tag_t BlkTag = NULL_TAG; 15 UF_MODL_create_block1(Sign, CornerPt, EdgeLen, &BlkTag); 16 17 //特征找体 18 tag_t BodyTag = NULL_TAG; 19 UF_MODL_ask_feat_body(BlkTag, &BodyTag); 20 21 //获得工作视图的tag 22 tag_t work_view = NULL_TAG; 23 UF_VIEW_ask_work_view(&work_view); 24 //适合窗口 25 UF_VIEW_fit_view(work_view , 1.0); 26 27 UF_terminate();