1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 6 UF_initialize(); 7 8 //创建块 9 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 10 double Corner_pt[3] = {0.0, 0.0, 0.0};//设置原点 11 char *Edge_Len[3] = {"100", "100", "100"};//设置长宽高 12 tag_t BlkTag = NULL_TAG; 13 UF_MODL_create_block1(Sign, Corner_pt, Edge_Len, &BlkTag); 14 15 //输入特征TAG,获取特征所有表达式TAG和个数 16 int NumberOfExps; 17 tag_t* ExpsTag = NULL_TAG; 18 UF_MODL_ask_exps_of_feature(BlkTag, &NumberOfExps, &ExpsTag); 19 20 //打印 21 lw->Open(); 22 char msg[256]; 23 sprintf(msg, "表达式数量为:%d\n", NumberOfExps); 24 lw->WriteLine(msg); 25 26 //获取链表里的所有TAG 27 for (int i = 0; i < NumberOfExps; i++) 28 { 29 sprintf(msg, "表达式的所有TAG为:%d", ExpsTag[i]); 30 lw->WriteLine(msg); 31 } 32 33 //释放内存 34 UF_free(ExpsTag); 35 36 UF_terminate();