hio_dwg

Fields

bool

bDWGInitialized

Functions

bool

InitRealDWG

void

ShutDownRealDWG

HFileIOResult

FileInputByKey

HFileIOResult

FileInputByKey

HFileIOResult

FileInputByKey

HFileIOResult

DatabaseInputByKey

hio_dwg

~hio_dwg

void

RegisterInputHandlerTypes

char const *

GetInputName

char const *

GetInputTypesString

HInputHandlerStyle

GetInputStyle

Detailed Description

class hio_dwg : public HInputHandler

The hio_dwg is used for reading DWG files. This utility only supports basic geometry nodes from DWG specification. This is not meant to be a DWG import tool, but the main objective is to provide the developers with a sample code.

Public Functions

HFileIOResult FileInputByKey(wchar_t const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method reads the DWG/DXF file ‘filename’ into the segment tree underneath key.

Parameters
  • filename – The name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for operation.

Returns

The #HFileInputResult result of the input operation.

virtual HFileIOResult FileInputByKey(char const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

Parameters
  • filename – The name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for the operation.

Returns

The #HFileInputResult result of the input operation.

virtual HFileIOResult FileInputByKey(unsigned short const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

Parameters
  • filename – The UNICODE name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for the operation.

Returns

The #HFileInputResult result of the input operation.

HFileIOResult DatabaseInputByKey(AcDbDatabase *pAcDbDatabase, HC_KEY key, HInputHandlerOptions *options)

This method reads the AcDbDatabase objects into the segment tree underneath the key.

Parameters
  • pAcDbDatabase – A pointer to the AcDbDatabase which is required to be imported to HOOPS.

  • key – The HOOPS key to the segment for data to load in.

  • options – An options class containing any needed extra information for operation.

Returns

The #HFileInputResult result of the input operation.

hio_dwg()
~hio_dwg()
virtual void RegisterInputHandlerTypes()

This method registers the “dwg” and “dxf” extensions to this handler as an input handler.

virtual char const *GetInputName()
Returns

A character pointer denoting the name of the handler.

virtual char const *GetInputTypesString()
Returns

The input extension type that is handled by hio_dwg which are “dwg” and “dxf”.

virtual HInputHandlerStyle GetInputStyle()
Returns

The type of input style which is HInputHandlerStyleModel.

Public Static Functions

static bool InitRealDWG()

This method initializes the RealDWG SDK. Call this once per application lifetime.

static void ShutDownRealDWG()

This method shuts down the RealDWG SDK and releases the memory. Call this once per application lifetime.

Public Static Attributes

static bool bDWGInitialized