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)

 

What is JT?

JT is the World’s Most Widely Used 3D File Format for PLM

JT is the common language of PLM and is the world’s most widely used 3D format. JT is the first ISO International Standard ( IS 14306-1) for 3D visualization and collaboration. Compact and accurate, JT is used throughout the product development lifecycle in all major industries to communicate the critical design information typically locked up inside a CAD file.

Siemens PLM Software customers rely on JT to be the most robust 3D visualization format available.

JT Open Factsheet
JT Open Member Resources
JT Open Documentation Technology
JT Open File Format Technology
JT Open Toolkit

Downloadable viewers for Windows Desktop, Windows 10 Universal App, Android and iOS.


Download JT2Go for your platform today Download JT2Go Desktop 64 Bit all languages
Download JT2Go Desktop 32 Bit for English
Windows 10 JT2Go Universal App
Android JT2Go
iOS JT2Go