AcDbDatabase::wblock Function
Acad::ErrorStatus wblock( AcDbDatabase* pOutputDb, const AcDbObjectIdArray& outObjIds, const AcGePoint3d& basePoint, AcDb::DuplicateRecordCloning drc); pOutputDb | Input pointer to an existing AcDbDatabase | outObjIds | Input array of object IDs of all objects to be wblocked out | basePoint | Input base point (in WCS coordinates for pOutputDb) to be used in pOutputDb | drc | Input desired DuplicateRecordCloning type | This method uses the wblockClone() mechanism to write the array of objects specified by outObjIds to the model space block table record of the database pointed to by pOutputDb, using basePoint as the base point value for pOutputDb.
The AcDbDatabase pointed to by pOutputDb must contain a header and symbol tables. Thus, if it was created with the AcDbDatabase constructor's buildDefaultDrawing argument set to false, a drawing must have already been read into it in order to populate it with a header and symbol tables.
The drc value determines what happens if symbols or dictionary entries are cloned when one or more duplicates already exist in the destination database. drc must keep the same setting in multiple calls, and can be only one of the following:
AcDb::kDrcIgnore | If a duplicate is found, ignore the clone, and continue to use the existing record in the destination database. This is how the INSERT command and the AcDbDatabase::insert() function operate. | AcDb::kDrcReplace | If a duplicate is found, replace it with the cloned record. | AcDb::kDrcMangleName | Mangle all the incoming record names. The mangling ensures unique names. This is how the REFEDIT command works. | AcDb::kDrcUnmangleName | Primarily used by REFEDIT when it checks the records back into the origin database. Any mangling done by kDrcMangleName is undone, and then it defaults to kDrcIgnore. In other words, if a duplicate is found after removing the manging, AutoCAD continues to use the existing record, and ignores the cloned one. | Returns Acad::eOk if operation is successful.
Returns Acad::eInvalidInput if drc is not one of the four valid types.
See the BASE command documentation in the AutoCAD online help for more information on base point.
Acad::ErrorStatus wblock( AcDbDatabase*& pOutputDb, const AcDbObjectIdArray& outObjIds, const AcGePoint3d& basePoint); pOutputDb | Returns pointer to the database that was written to | outObjIds | Input array of objectId entities of all objects to be wblocked out | basePoint | Input base point (in WCS coordinates for pOutputDb) to be used in pOutputDb | Creates a new AcDbDatabase object, sets pOutputDb to point to it, and then uses the wblockClone mechanism to write the array of objects specified by outObjId entities out to the Model Space block table record of the database pointed to by pOutputDb, using basePoint as the base point value for pOutputDb.
The calling application is responsible for deallocating (via the C++ delete operator) the AcDbDatabase object that pOutputDb is set to point to.
Returns Acad::eOk if operation is successful.
See the BASE command documentation in the AutoCAD online help for more information on base point.
|