KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Data > Import / Export > ICADFormat_KC
ICADFormat_KC Interface

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 KernelCAD


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 KernelCAD


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:

KernelCAD 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

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