怡宁塑胶模具设计

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

VS2010  NX8.5

#include <NXOpen/Drawings_DraftingView.hxx>
#include <NXOpen/Drawings_DraftingViewCollection.hxx>

#include <NXOpen/ListingWindow.hxx>

 

theSession->ListingWindow()->Open();

//得到当前图纸页
NXOpen::Drawings::DrawingSheet* WorkSheet = workPart->DrawingSheets()->CurrentDrawingSheet();

 

//遍历图纸页

NXOpen::Drawings::DrawingSheet* theDrawingsSheets;//定义类型
vector<NXOpen::Drawings::DrawingSheet*> AllSheetsVector;//存到vector
NXOpen::Drawings::DrawingSheetCollection *DrawingsSheets=workPart->DrawingSheets();//迭代
NXOpen::Drawings::DrawingSheetCollection::iterator itr = workPart->DrawingSheets()->begin();
for (;itr!=DrawingsSheets->end();++itr) //循环获得所有图纸页
{
theDrawingsSheets=(*itr); //获得图纸页
theSession->ListingWindow()->WriteLine(theDrawingsSheets->Name());
AllSheetsVector.push_back(theDrawingsSheets);
}

 

posted on 2021-04-14 09:49  怡宁塑胶模具设计  阅读(358)  评论(0编辑  收藏  举报