没有什么可以看的,NXOPEN直接录制一下导出CAD就可以了。
录制出来自己挑需要的代码拿过来改一下。
NX9+VS2012 #include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/DxfdwgCreator.hxx>
#include <NXOpen/DexManager.hxx> DxfdwgCreator *dxfdwgCreator1;
dxfdwgCreator1 = theSession->DexManager()->CreateDxfdwgCreator(); dxfdwgCreator1->SetExportData(DxfdwgCreator::ExportDataOptionDrawing); dxfdwgCreator1->SetAutoCADRevision(DxfdwgCreator::AutoCADRevisionOptionsR2004); dxfdwgCreator1->SetViewEditMode(true); dxfdwgCreator1->SetFlattenAssembly(true); dxfdwgCreator1->SetExportScaleValue("1:1"); //dxfdwgCreator1->SetOutputFileType(DxfdwgCreator::OutputFileTypeOptionDxf);//导出DXF
dxfdwgCreator1->SetOutputFileType(DxfdwgCreator::OutputFileTypeOptionDwg);//导出DWG dxfdwgCreator1->SetOutputFile("D:\\test5.dwg"); dxfdwgCreator1->ObjectTypes()->SetCurves(true); dxfdwgCreator1->ObjectTypes()->SetAnnotations(true); dxfdwgCreator1->ObjectTypes()->SetStructures(true); dxfdwgCreator1->SetInputFile("D:\\test5.prt"); NXObject *nXObject1;
nXObject1 = dxfdwgCreator1->Commit(); dxfdwgCreator1->Destroy();