Face Collector(面收集器)控件的获取
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_obj.h> 5 6 7 UF_initialize(); 8 9 //面收集器控件 10 PropertyList* FaceSelectProps = face_select0->GetProperties(); 11 std::vector<NXOpen::TaggedObject *> faces = FaceSelectProps->GetTaggedObjectVector("SelectedObjects"); 12 delete FaceSelectProps; 13 FaceSelectProps = NULL; 14 15 //控件为单选 16 //设置颜色 17 //UF_OBJ_set_color(faces[0]->Tag(), 73); 18 19 20 //控件为多选 21 for ( int i = 0; i < faces.size(); ++i) 22 { 23 //设置颜色 24 UF_OBJ_set_color(faces[i]->Tag(), 186); 25 } 26 27 UF_terminate();
原文地址:https://www.cnblogs.com/nxopen2018/p/10976066.html
时间: 2024-10-08 11:44:09