UG二次开发 隐藏实体(C#)

 1       public void setFitAfterShowOrHide(NXOpen.Body inBody)
 2         {
 3             NXOpen.Session theSession = NXOpen.Session.GetSession();
 4             NXOpen.Part workPart = theSession.Parts.Work;
 5             NXOpen.Part displayPart = theSession.Parts.Display;
 6             NXOpen.DisplayableObject[] objects1 = new NXOpen.DisplayableObject[1];
 7             objects1[0] = inBody;
 8             theSession.DisplayManager.BlankObjects(objects1);
 9             workPart.ModelingViews.WorkView.FitAfterShowOrHide(NXOpen.View.ShowOrHideType.HideOnly);
10         }

 

posted @ 2021-11-29 14:03  刘朋1102  阅读(359)  评论(0)    收藏  举报