DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > Import / Export > ICADFormat_KC Search Documentation


ICADFormat_KC Interface

GetFormatID
GetVersionCount
GetVersion
GetVersionString
FindVersion
SetDeafultSaveVersionIndex
GetDeafultSaveVersionIndex
GetExtension

IICADFormat_KC interface gives access to information about a CAD format. The interface can be obtained via: IModel > IDataConvert_KC > IDataConvert_KC.GetFormat > ICADFormat_KC

See also: DataFlow sample


HRESULT GetFormatID(ECADFormat* format)

Parameters

format - [in] the format ID to retrieve

Remarks:

The methods returns the value from ECADFormat which identifies the format in DG Kernel


HRESULT GetVersionCount( int* count)

Parameters

count -[out,retval] the returned version count

Remarks:

Some file formats like .dwg and .dxf have multiple versions (normaly identified with an AutoCAD release). This method returns number of versions of the format supported in DG Kernel


HRESULT GetVersion( int index, int* version)

ParamParameters

index - [in] Index of the version in range 0 to version count as returned by the GetVersionCount() method

version -[out,retval] the returned version

Remarks:

Some file formats, like .dwg and .dxf, have multiple versions. Version of a format is an integer (normaly identified with an AutoCAD release). defined by the developer of the format. Supporetd versions are enumerated in Format Versions


HRESULT GetVersionString( int version, BSTR *pbstrDescription )

Parameters

version -[in] format version version as returned by the GetVersion or enumerated in Format Versions

pbstrDescription  - [out, retval] The returned description

Remarks:

Returns description of the version


HRESULT FindVersion( int version, int* index )

Parameters

version -[in] format version as returned by the GetVersion or enumerated in Format Versions

index - [in] Index of the version in range 0 to version count as returned by the GetVersionCount method or -1 if the version was not found

Remarks:

For a value of format version finds its index in the appropriate enumeration


HRESULT SetDeafultSaveVersionIndex(int index )

Parameters

index - [in] Index of the version in range 0 to version count as returned by the GetVersionCount method

Remarks:

DG Kernel components identifies one of versions as the deafult one to be used in cases when version was not specified. This method allows changing it at runtime. This selection is not persisted in the model or otherwise and has to be programmatically set on every program run


HRESULT GetDeafultSaveVersionIndex(int* index )

arameters

<Parameters

index - [out,retval] Index of the default version in range 0 to version count as returned by the GetVersionCount method

Remarks:

Returns index of the default version. See remarks for the SetDeafultSaveVersionIndex() method above


HRESULT GetExtension( bool includeDot, BSTR* extension )

Parameters

includeDot - [in] If true the dot character will be prepended to the returned extension

extension - [out,retval] - the returned file extension

Remarks:

Returns the default file extension for the format