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);
}