NX二次开发源码分享:更新所有图纸的视图到最新
NX二次开发源码分享:更新所有图纸的视图到最新
// TODO: add your code here
DrawingSheetCollection* dcol = displayPart->DrawingSheets();
for (DrawingSheetCollection::iterator it = dcol->begin(); it != dcol->end(); it++)
{
DrawingSheet* sheet = (*it);
print("\nSheet Name: " + sheet->Name() );
std::vector<NXOpen::Drawings::DraftingView *> dw = (*it)->GetDraftingViews();
for (unsigned int ii=0; ii<dw.size(); ii++)
{
print( "" + dw->Name() );
}
print("Updating all drafting views through DraftingViewCollection...\n");
DraftingViewCollection* dvcol = displayPart->DraftingViews();
dvcol->UpdateViews(DraftingViewCollection::ViewUpdateOptionAll, sheet);
}
谢谢大神分享!!!!
页:
[1]