【UG\NX二次开发】快速单独显示实体组,并调整视图(theSession->DisplayManager()->HideByType)
2026/7/23 8:52:41 网站建设 项目流程
//【单独显示实体组】并调整视图 void onlyShowSelObj(std::vector<tag_t> body_list, bool bFitView = true) { if (body_list.empty())return; Session* theSession = Session::GetSession(); try { theSession->DisplayManager()->HideByType(NXOpen::DisplayManager::ShowHideType::ShowHideTypeAll, NXOpen::DisplayManager::ShowHideScope::ShowHideScopeWorkPartAndOccurrence); for (inti = 0; i < body_list.size(); i++) { if (UF_OBJ_ask_status(body_list[i]) == UF_OBJ_ALIVE) UF_CALL(UF_OBJ_set_blank_status(body_list[i], UF_OBJ_NOT_BLANKED)); } if (bFitView) { UF_CALL(UF_VIEW_fit_view(NULL_TAG, 0.8)); } } catch (exception& ex) { //---- Enter your exception handling code here ----- uc1601((char*)ex.what(), 1); } }

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询