NXOpen过滤

selection0->SetSelectModeAsString("Multiple");//控件设置为多选

//过滤面
Selection::SelectionAction action = Selection::SelectionActionClearAndEnableSpecific;
std::vector<Selection::MaskTriple> maskArray(1);  
maskArray[0] = Selection::MaskTriple(UF_face_type, 0, 0); 
selection0->GetProperties()->SetSelectionFilter("SelectionFilter", action, maskArray);
//过滤注释
Selection::SelectionAction action = Selection::SelectionActionClearAndEnableSpecific;
vector<Selection::MaskTriple> markArray(1);
markArray[0] = Selection::MaskTriple(UF_drafting_entity_type,UF_draft_note_subtype,0);
selection0->GetProperties()->SetSelectionFilter("SelectionFilter", action, markArray);
//过滤-组件
Selection::SelectionAction action = Selection::SelectionActionClearAndEnableSpecific;
std::vector<Selection::MaskTriple> maskArray(1);
maskArray[0] = Selection::MaskTriple(UF_component_type, 0, 0); 
selection0->GetProperties()->SetSelectionFilter("SelectionFilter", action, maskArray);
//装配或者建模的实体  
Selection::SelectionScope scope = Selection::SelectionScopeUseDefault;
Selection::SelectionAction action = Selection::SelectionActionClearAndEnableSpecific;
std::vector<Selection::MaskTriple> maskArray(3);
maskArray[0] = Selection::MaskTriple(UF_solid_type, UF_solid_body_subtype, 0);
maskArray[1] = Selection::MaskTriple(UF_component_type, UF_component_subtype, 0);
maskArray[2] = Selection::MaskTriple(UF_solid_type, UF_solid_body_subtype, UF_UI_SEL_FEATURE_SOLID_BODY);
selection0->GetProperties()->SetSelectionFilter("SelectionFilter", action, maskArray);

selection0->SetSelectModeAsString("Multiple");//多选
selection0->GetProperties()->SetEnum("MaximumScope", 11);   //11-工作部件和组件内

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值