1 //選擇對象控件設置過濾 2 Selection::SelectionAction action = Selection::SelectionActionClearAndEnableSpecific; 3 std::vector<Selection::MaskTriple> maskArray(1); 4 maskArray[0] = Selection::MaskTriple(UF_solid_type, UF_solid_body_subtype, UF_UI_SEL_FEATURE_SOLID_BODY); // Bodies 5 selection0->GetProperties()->SetSelectionFilter("SelectionFilter", action, maskArray); 6 /* 7 maskArray[0] = Selection::MaskTriple( UF_solid_type, UF_all_subtype, UF_UI_SEL_FEATURE_ANY_FACE); // Faces 8 maskArray[0] = Selection::MaskTriple( UF_solid_type, UF_all_subtype, UF_UI_SEL_FEATURE_ANY_EDGE); // Edges 9 maskArray[0] = Selection::MaskTriple( UF_component_type, 0, 0 ); // Components 10 maskArray[0] = Selection::MaskTriple( UF_line_type, 0, 0 ); // Lines 11 maskArray[0] = Selection::MaskTriple( UF_drafting_entity_type, 0, 0 ); // Drafting objects 12 maskArray[0] = Selection::MaskTriple(UF_solid_type, UF_solid_edge_subtype, UF_UI_SEL_FEATURE_CIRCULAR_EDGE); // 選擇圓邊 13 maskArray[0] = Selection::MaskTriple(UF_solid_type, UF_solid_face_subtype, UF_UI_SEL_FEATURE_CYLINDRICAL_FACE); // 選擇圓面 14 */ 15 16 17 //設置多選還是單選,Multiple=多選,Single=單選 18 selection0->SetSelectModeAsString("Multiple"); 19 20 //設置選擇范圍:3-整個裝配 10-僅工作部件 11-裝配和工作 21 selection0->GetProperties()->SetEnum("MaximumScope", 10); 22 23 Caesar盧尚宇 24 202年2月13日
2020年6月1日補充
selection_Track->Focus();//設置選擇對象控件停在當前,不自動跳到下一個選擇控件