Bet韦德(中国)VIP官方认证·百度百科

技术支持 / 技术论坛 / 二次开发 / 【技术分享】【C#】图纸页添加投影视图
【技术分享】【C#】图纸页添加投影视图
帖子
14
精华
1
积分
154
二次开发 技术分享
        /// 
        /// 添加投影视图
        /// 
        /// 
        /// 
        public  void AddView2(string viewName, Point3d point)
        {
            Part workPart = theSession.Parts.Work;

            BaseViewBuilder baseViewBuilder1 = workPart.DraftingViews.CreateBaseViewBuilder(null);
            baseViewBuilder1.Style.ViewStyleBase.Part = workPart;
            baseViewBuilder1.Style.ViewStyleBase.PartName = workPart.FullPath;
            PartLoadStatus partLoadStatus1 = workPart.LoadFully();
            partLoadStatus1.Dispose();
            ModelingView modelingView = (ModelingView)workPart.ModelingViews.FindObject(viewName);
            baseViewBuilder1.Style.ViewStyleBase.Arrangement.SelectedArrangement = null;
            baseViewBuilder1.SelectModelView.SelectedView = modelingView;
            baseViewBuilder1.Placement.Placement.SetValue(null, workPart.Views.WorkView, point);

            baseViewBuilder1.Commit();
            baseViewBuilder1.Destroy();
            
        }
556 0 2024-01-05 16:30:50
by f3dexpress Nico
暂时还没有回复评论

回复加入讨论

回复
请选择移动至版块:
确认移动
XML 地图