The other three forms of the AcDbDatabase::wblock() function create a new database whose model space block table record contains the specified entities from the input database. The first form of this function copies the entities from a named block table record. The second and third forms of the function both copy an array of entities, but one includes a parameter specifying how to handle duplicate symbols or dictionary entries in the new database.
The following function is equivalent to invoking the WBLOCK command with the name of a block definition:
Acad::ErrorStatus AcDbDatabase::wblock( AcDbDatabase*& pOutputDb, AcDbObjectId blockId);
The blockId argument represents a block table record in the input database. The entities in this block table record are copied into the new database's model-space block table record. The insert base of the new database is the block table record's origin.
The following function is equivalent to invoking the WBLOCK command and then using the option to select specific objects and specify an insertion base point:
Acad::ErrorStatus AcDbDatabase::wblock( AcDbDatabase*& pOutputDb, const AcDbObjectIdArray& outObjIds, const AcGePoint3d* basePoint);
This function creates a new database that includes the entities specified in the outObjIds argument. The entities, which can be in the model space or paper space block table records of the input database, are placed in the model space of the new database. Also included in the new database are the objects owned by or referred to by those entities, as well as the owners of those objects. The specified point is the origin point, in world coordinates, for the new drawing (that is, it is the insert base point in the model space of the new database).
The final version of the AcDbDatabase::wblock() function also copies an array of entities and specifies an insertion base point, but it has an additional parameter specifying how to handle duplicate symbols or dictionary entries in the new database:
Acad::ErrorStatus AcDbDatabase::wblock( AcDbDatabase*& pOutputDb, const AcDbObjectIdArray& outObjIds, const AcGePoint3d* basePoint, AcDb::DuplicateRecordCloning drc);
For more information about the drc parameter, see the wblock() function documentation in the ObjectARX Reference.