标签:rip size class show 过滤 tag auto specific cto
单选模式
selection0->GetProperties()->SetEnum("SelectMode",0);
自动推进到下一个
selection0->GetProperties()->SetLogical("AutomaticProgression",true);
对象选择过滤 只能选表面
1 std::vector< NXOpen::Selection::MaskTriple > maskTriple; 2 Selection::MaskTriple mask1(UF_face_type,0,0); 3 maskTriple.push_back(mask1); 4 selection0->GetProperties()->SetSelectionFilter("SelectionFilter", Selection::SelectionAction::SelectionActionEnableSpecific ,maskTriple);
获取控件选择的对象转为tag_t类型
1 tag_t tagUnderFace=0; 2 std::vector<TaggedObject*>objects=this->selection0->GetProperties()->GetTaggedObjectVector("SelectedObjects"); 3 for ( int i=0;i<objects.size();i++) 4 { 5 tagUnderFace=objects[i]->Tag(); 6 }
设置控件选择的对象。清空选择
1 vector< NXOpen::TaggedObject * > objectVector; 2 objectVector.clear(); 3 this->selection0->SetSelectedObjects(objectVector);
设置控件隐藏
this->selection0->SetShow(false);
selection0->AddFilter(UF_component_type,0,0);
标签:rip size class show 过滤 tag auto specific cto
原文地址:https://www.cnblogs.com/KMould/p/13354195.html