NX二次开发-NXOPEN获取所有工程图和所有视图DrawingSheet,DrawingSheetCollection,DraftingView
NX11+VS2013
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/ListingWindow.hxx>
#include <NXOpen/NXMessageBox.hxx>
#include <NXOpen/Drawings_DrawingSheet.hxx>
#include <NXOpen/Drawings_DrawingSheetBuilder.hxx>
#include <NXOpen/Drawings_DrawingSheetCollection.hxx>
#include <NXOpen/Drawings_DrawingView.hxx>
#include <NXOpen/Drawings_DrawingViewBuilder.hxx>
#include <NXOpen/NXString.hxx>
Session *theSession = NXOpen::Session::GetSession();
Part *workPart(theSession->Parts()->Work());
//迭代器遍历所有图纸页
vector<NXOpen::Drawings::DrawingSheet*> AllSheet;
NXOpen::Drawings::DrawingSheet* MySheet;
NXOpen::Drawings::DrawingSheetCollection::iterator Ite;//定义迭代器
for (Ite = workPart->DrawingSheets()->begin(); Ite != workPart->DrawingSheets()->e