Body Collector(体收集器)控件的获取
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_obj.h> 5 6 UF_initialize(); 7 8 //获取体收集器控件 9 PropertyList* BodySelectProps = bodySelect0->GetProperties(); 10 std::vector<NXOpen::TaggedObject *> Bodys = BodySelectProps->GetTaggedObjectVector("SelectedObjects"); 11 delete BodySelectProps; 12 BodySelectProps = NULL; 13 14 //控件为单选 15 //设置颜色 16 //UF_OBJ_set_color(Bodys[0]->Tag(), 186); 17 18 //控件为多选 19 for (int i = 0; i < Bodys.size(); ++i) 20 { 21 //设置颜色 22 UF_OBJ_set_color(Bodys[i]->Tag(), 186); 23 } 24 25 UF_terminate();