DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IDataConvert_KC Interface

Convert
ConvertMultiple
DetectFormat
GetFormat

IDataConvert_KC interface converts between supported formats or their versions directly bypassing the DG Kernel .mdg format and thus preserving more native data and attributes

DetectFormat and GetFormat methods provide general information about supporetd formats

See also: DataFlow sample


HRESULT Convert( char* inFile, char* outFile, int formatVersion )

Parameters:

inFile -[in] full path of the input file

outFile -[in] full path of the output file

formatVersion -[in] Vertion of the format to convert to. See remarks

Remarks:

Reads inFile and writes outFile in the specified format version. Format of the output file is detected from extension of outFile. formatVersion must be one of Format Versions or a value returned from ICADFormat_KC.GetVersion(). Use -1 to save in default version


HRESULT ConvertMultiple( char* wildcard, char* outFolder, ECADFormat formatConvertTo, int formatVersion )

Parameters

wildcard -[in] Path of the input folder or wild card. See remarks

outFolder -[in] Full path of the output folder

formatConvertTo - Format of the output. Value must coinside with one of ECADFormat

formatVersion - Output format version. See remarks

Remarks

Converst  all files in supported formats as identified by wildcard to the specified format and version. wildcard can be full path of a folder or wilcard similar to C:\MyData\*.stl or C:\MyData\*.*. In the later case the input folder can contain multiple formats. Files with unsupported extensions are ignored.

formatVersion must be one of Format Versions or a value returned from ICADFormat_KC.GetVersion(). Use -1 to save in default version


HRESULT DetectFormat( char* file, ECADFormat* format )

Parameters

file -[in] file name of a file path

Remarks:

The method matches extension of the file to a supported format. eCADFormatCount is returned if the format is not supported


HRESULT GetFormat( ECADFormat formatID, ICADFormat_KC- The ** iFormat )

Parameters

formatID -[in] The format to retrieve

iFormat - The returned interface

Remarks:

The method creates an object which implements the ICADFormat_KC interface. Methods of ICADFormat_KC can be used to obtain extended information about the format