Creating a New Database from an Existing Database

The following function is the equivalent of the WBLOCK* command:

Acad::ErrorStatus
AcDbDatabase::wblock(
    AcDbDatabase*& pOutputDb);

This function creates a new database from the invoked database (“this”). Any unreferenced symbols in the input database are omitted in the new database (which makes the new database potentially cleaner and smaller than the original). However, it does not take care of copying application-defined objects whose ownership is rooted in the named object dictionary. You need to transfer application data from the source database to the target database using the AcEditorReactor notification functions.