Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Working with OLE Objects

OdDgOle2Frame2d and OdDgOle2Frame3d classes represent OLE entities in an OdDgDatabase instance. They allow for OLE objects to be included in a drawing. Note that .dgn support for OLE is for Windows only.

The API of these classes implement reading, writing, converting (V7 to V8), rendering, editing, and manipulating OLE entities.

OLE objects can be included in a drawing using one of the following methods:

  • Picture
  • Embedded
  • Link

The header file is DgOle2Frame.h, and the operations can be used to:

  • Manipulate the OLE type
  • Manipulate the draw aspect
  • Manipulate the rotation mode
  • Manipulate size and scale of the object being pasted
    Note: to calculate OLE element size in drawing units:
    SizeX = getObjectSizeX()*getXScale();
    SizeY = getObjectSizeY()*getYScale();
  • Manipulate the transparency of background
  • Access and transform OLE binary data
  • Vectorize the OLE object

Vectorization support for OLE objects (Windows OS) in the Drawings SDK can be obtained by including this module: OdDgOleItemHandler.

OLE support is a module, and it can be enabled in static applications by linking in the above library, and registering "OdDgOleItemHandle" using the ODRX_DEFINE_STATIC_APPLICATION macro:

ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdDgOleItemHandlerModuleImpl);
ODRX_BEGIN_STATIC_MODULE_MAP()
ODRX_DEFINE_STATIC_APPMODULE(L"OdDgOleItemHandler",OdDgOleItemHandlerModuleImpl)
ODRX_END_STATIC_MODULE_MAP()

For the DLL version of Drawings SDK libraries, place the OdDgOleItemHandle.tx module in the same directory as the Drawings DLLs (no explicit registration required).

The ExDgnCreate sample application provided with the Drawings SDK provides a sample for working with OLE entities. See the OdExDgnFiller::addOleFrame() method.

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.