首页 > 其他 > 详细

NX二次开发-NXopen录制:导入X_T

时间:2019-12-26 22:12:04      阅读:109      评论:0      收藏:0      [点我收藏+]
// Created by:  Jet_jiang
// Language:   C++
// Version:   NX 10
// Date:      12-26-2019
// Time:       22:00
  
//头文件
#include <NXOpen/DexBuilder.hxx>
#include <NXOpen/DexManager.hxx>
#include <NXOpen/NXObject.hxx>
#include <NXOpen/ObjectTypeSelector.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/ImportManager.hxx>
#include <NXOpen/Importer.hxx>


void PrtImportX_t(NXString AllPath)
{
	NXOpen::Session *theSession = NXOpen::Session::GetSession();
	NXOpen::Part *workPart(theSession->Parts()->Work());
	NXOpen::Part *displayPart(theSession->Parts()->Display());

	// ----------------------------------------------
	//   Menu: 文件(F)->导入(M)->Parasolid...
	// ----------------------------------------------

	NXOpen::Importer *importer1;
	importer1 = workPart->ImportManager()->CreateParasolidImporter();

	importer1->SetFileName(AllPath);//路径

	NXOpen::NXObject *nXObject1;
	nXObject1 = importer1->Commit();
	importer1->Destroy();

}

  

NX二次开发-NXopen录制:导入X_T

原文:https://www.cnblogs.com/NXString/p/12104522.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!