【技术分享】【C#】图纸页添加投影视图
![](http://fileserver.f3dexpress.com/HeaderFile/20231228101603_header.jpg)
琛
帖子
14
14
精华
1
1
积分
154
154
二次开发
技术分享
/// <summary>
/// 添加投影视图
/// </summary>
/// <param name="viewName"></param>
/// <param name="point"></param>
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();
}
登录论坛用户后可查看全部内容
255
0
2024-01-05 16:30:50
by f3dexpress Nico
请选择移动至版块:
确认移动
回复加入讨论