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日
来源:https://www.cnblogs.com/nxopen2018/p/12305959.html