Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
OdDbDatabase::insert Method (const OdString&, const OdString&, OdDbDatabase*, bool)
Syntax
C++
OdDbObjectId insert(const OdString& sourceBlockName, const OdString& destinationBlockName, OdDbDatabase* pSource, bool preserveSourceDatabase = true);

Copies the content of a specified database to this database. 

 

Parameters
Description
sourceBlockName
[in] Name of the OdDbBlockTableRecord in pSource.
destinationBlockName
[in] Name for the new OdDbBlockTableRecord.
pSource
[in] Source database.
preserveSourceDatabase
[in] Not used. Objects from the source database are always copied, not moved.

The data that will be copied includes content of the folloowing enities:

  • BlockTable,
  • LayerTable
  • LinetypeTable
  • DimStyleTable
  • RegAppTable
  • TextStyleTable
  • PlotStyleNameDictionary
  • PlotSettingsDictionary
  • MLStyleDictionary
  • ColorDictionary
  • MaterialDictionary
  • TableStyleDictionary
  • MLeaderStyleDictionary
  • ScaleListDictionary
  • VisualStyleDictionary
  • GroupDictionary

 

Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one. 

All entities in the BlockTableRecord specified by sourceBlockName in pSource are copied into the new OdDbBlockTableRecord and offset by the INSBASE value. Contents of layout blocks are copied only if sourceBlockName is a layout block name.

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