Cancel
Showing results for 
Search instead for 
Did you mean: 

JtkCADExporter: set filename for exported file

Experimenter
Experimenter

Hello together,

 

I am new to JT Toolkit and need some help with my use case. I am using JT Toolkit 9.0

Well, I am trying to open a JT-file, mirror it at the XZ-plane and save it in a different filename. everything is working fine, but the filename for the new file.

Is it possible to specify a filename when using the CADExporter? In the documentation i did not find anything.

 

My code is like the following:

JtkEntityPtr<JtkCADImporter> cadImp = JtkEntityFactory::createCADImporter();
if( cadImp )
{        
	cadImp->setBrepLoadOption(JtkCADImporter::JtkTESS_ONLY);
	cadImp->setAssemblyOption(JtkCADImporter::JtkINSTANCE_ASSEMBLY);
	cadImp->setShapeLoadOption(JtkCADImporter::JtkHIGH_LOD);

	JtkEntityList* pFaults = NULL;
	JtkEntityPtr<JtkHierarchy> root = cadImp->import( argv[1], pFaults );

	JtkEntityPtr<JtkCADExporter> cadExp = JtkEntityFactory::createCADExporter();
	cadExp->setExportPath("c:/users/myuser/desktop/");	
	cadExp->setFileFormat( JtkCADExporter::JtkMONOLITHIC );
	
	//specify new filename here 
	
	cadExp->exportJt(root);
	
	cadExp = NULL;
	cadImp = NULL;
}

 

Thank you for your support.

RodgerWilco

1 REPLY

Re: JtkCADExporter: set filename for exported file

Experimenter
Experimenter

An output filename is the same as the name of the JTKHierarchy root.
Use the setName method of the root to change filename. 

int 
setName(const JtkString &Name)