UG二次开发 隐藏对象(C#)
1 NXOpen.Session theSession = NXOpen.Session.GetSession(); 2 NXOpen.Part workPart = theSession.Parts.Work; 3 NXOpen.Part displayPart = theSession.Parts.Display; 4 //以直线为例,数组中自己添加,可以是Body等 5 NXOpen.Line[] lines = new Line[0]; 6 7 theSession.DisplayManager.BlankObjects(lines ); 8 displayPart.ModelingViews.WorkView.FitAfterShowOrHide(NXOpen.View.ShowOrHideType.HideOnly);