save data into iges
save data into iges
(OP)
hello all
Is there a NXOPen/UF function allows me to save the geometry into igs file format, rather than a part file (using UF_PART)save() fnction)?
many thanks
Gan
Is there a NXOPen/UF function allows me to save the geometry into igs file format, rather than a part file (using UF_PART)save() fnction)?
many thanks
Gan





RE: save data into iges
RE: save data into iges
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: save data into iges
Mike Hyde
www.astonmartin.com
NX8.5 with TC9.1
RE: save data into iges
thanks very much for the reply. I have tried to record a journal file and use that as a reference to write c++ code to covert prt file to igs. Blow is the c++ file I have tried:
//------------------
UF_initialize();
// Initialize the NX Open C++ API environment
NXOpen::Session *theSession = NXOpen::Session::GetSession();
// NXOpen::Part *Part1=(NXOpen::Part*)NXOpen::NXObjectManager::Get(part_tag);
NXOpen::DexManager *DexManager1=NULL;
*DexManager1= NXOpen::DexManager(theSession);
NXOpen::IgesCreator *igesCreator1=DexManager1->CreateIgesCreator();
igesCreator1->SetExportModelData(true);
igesCreator1->SetExportDrawings(true);
igesCreator1->SetMapTabCylToBSurf(true);
igesCreator1->SetBcurveTol(0.0508);
igesCreator1->SetIdenticalPointResolution(0.001);
igesCreator1->SetMaxThreeDMdlSpace(10000.0);
igesCreator1->SetOutputFile(obj->getname()+".igs");
igesCreator1->SetSettingsFile("/igesexport.def");
igesCreator1->SetMaxLineThickness(2.0);
igesCreator1->SetSysDefmaxThreeDMdlSpace(true);
igesCreator1->SetSysDefidenticalPointResolution(true);
igesCreator1->SetInputFile(obj->getname()+".prt");
igesCreator1->SetFileSaveFlag(true);
NXOpen::NXObject *nxObject1= igesCreator1->Commit();
igesCreator1->Destroy();
UF_terminate();
//----------------------------
but it gives me error at the place of :
*DexManager1= NXOpen::DexManager(theSession);
NXOpen::IgesCreator *igesCreator1=DexManager1->CreateIgesCreator();
could anyone please tell me how to correct it? How can I initialize the CreateIgesCreator() method from a nxsession?
thanks
RE: save data into iges
If not, what are the differences between your code and the recorded journal?
www.nxjournaling.com
RE: save data into iges
I don't know. I am not familiar with nx/nxopen, but just trying to call some nx functions in my program.
RE: save data into iges
www.nxjournaling.com
RE: save data into iges
yes, I have tried to save my geometry using:
UF_initialisze();
UF_PART_new();
UF_terminate();
and it works fine which can generate the .prt file directly.
For the program above, the compiler gives no complain, the error(segmentation fault) only comes in when it gets to the line:
*DexManager1= NXOpen::DexManager(theSession);
NXOpen::IgesCreator *igesCreator1=DexManager1->CreateIgesCreator();
so i think the way I instantiate the DexManger and IgesCreator objects are wrong?
RE: save data into iges
CODE
But, then again, my C++ is very rusty, so I make no guarantees...
www.nxjournaling.com
RE: save data into iges
NXOpen::IgesCreator *igesCreator1=theSession->DexManager->CreateIgesCreator();
this was my suspect, but the compiler gives me error message: base operand of '->' is not a pointer.