DatabaseInsert Method (String, String, Database, Boolean)

Copies the content of a specified database to this database.
Namespace:  Teigha.DatabaseServices
Assembly:  TD_Mgd (in TD_Mgd.dll) Version: 21.4.0.0
Syntax
public ObjectId Insert(
        string sourceBlockName,
        string destinationBlockName,
        Database dataBase,
        bool preserveSourceDatabase
)

Parameters

sourceBlockName
Type: SystemString
[in] Name of the block table record in the source database.
destinationBlockName
Type: SystemString
[in] Name for the newly created block table record.
dataBase
Type: Teigha.DatabaseServicesDatabase
[in] Source database to copy data from.
preserveSourceDatabase
Type: SystemBoolean
[in] Flag that specifies whether the source database is left unchanged.

Return Value

Type: ObjectId
Returns the object ID for the new block table record created by this method.
Remarks
Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names are ignored; a destination object that has the same name as the source object is rewritten by the source one. All entities in the block table record specified by sourceBlockName in the source database are copied into the new destinationBlockName. Contents of layout blocks are copied only if sourceBlockName is a layout block name. You should delete the source database either immediately or at least before the destination database is deleted.
See Also

©  Bricsys NV. All rights reserved.