在制图环境中导入的视图不能删除
本帖最后由 xiao2076 于 2014-10-30 11:27 编辑在制图环境中导入的视图不能删除
Session *mySession=Session::GetSession();
Part *workPart=mySession->Parts()->Work();
//导入俯视图
Drawings::BaseView *nullDrawings_BaseView(NULL);
Drawings::BaseViewBuilder *baseViewBuilder1;
baseViewBuilder1 = workPart->DraftingViews()->CreateBaseViewBuilder(nullDrawings_BaseView);
ModelingView *theModelingView(dynamic_cast<ModelingView *>(workPart->ModelingViews()->FindObject("Top")));
Point3d viewOrigin(200,200,0);
baseViewBuilder1->SelectModelView()->SetSelectedView(theModelingView);
baseViewBuilder1->Style()->ViewStyleBase()->SetPart(workPart);
baseViewBuilder1->Style()->ViewStyleBase()->SetPartName(workPart->FullPath());
baseViewBuilder1->Placement()->Placement()->SetValue(NULL,workPart->ModelingViews()->WorkView(),viewOrigin);
baseViewBuilder1->Commit();
页:
[1]