怡宁塑胶模具设计

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

VS2010 NX8.5

Drawings::DrawingSheet *drawingSheet1(dynamic_cast<Drawings::DrawingSheet *>(workPart->DrawingSheets()->FindObject("SHT2")));//当前页面
drawingSheet1->Open();

Drawings::BaseView *nullDrawings_BaseView(NULL);
Drawings::BaseViewBuilder *baseViewBuilder1;
baseViewBuilder1 = workPart->DraftingViews()->CreateBaseViewBuilder(nullDrawings_BaseView);

ModelingView *modelingView1(dynamic_cast<ModelingView *>(workPart->ModelingViews()->FindObject("Top")));//顶视图
baseViewBuilder1->SelectModelView()->SetSelectedView(modelingView1);

baseViewBuilder1->Style()->ViewStyleBase()->SetPart(workPart);

baseViewBuilder1->Style()->ViewStyleBase()->SetPartName("D:\\Alan-work\\YN35678-2-001_dwg1.prt");

Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);
baseViewBuilder1->Style()->ViewStyleBase()->Arrangement()->SetSelectedArrangement(nullAssemblies_Arrangement);
baseViewBuilder1->Scale()->SetDenominator(2.0); //设置视图比例
Point3d point1(100, 130, 0.0);//定义点
baseViewBuilder1->Placement()->Placement()->SetValue(NULL, workPart->Views()->WorkView(), point1);//视图位置

NXObject *nXObject1;
nXObject1 = baseViewBuilder1->Commit();

baseViewBuilder1->Destroy();

 

posted on 2021-03-28 10:28  怡宁塑胶模具设计  阅读(336)  评论(0编辑  收藏  举报