Share

AcDbObject::swapIdWith

C++

Acad::ErrorStatus swapIdWith(
    AcDbObjectId otherId, 
    Adesk::Boolean swapXdata = false, 
    Adesk::Boolean swapExtDict = false
);

Description

This function swaps objectIds and handles between the object specified by otherId and the object invoking this function. Both objects must currently be database-resident and must reside in the same database. If swapXdata == Adesk::kTrue, then the objects swap extended entity data as well. If swapExtDict == Adesk::kTrue, then the objects swap extension dictionaries also.

If the object specified by otherId or the object invoking this function are not database-resident, then Acad::eNoDatabase is returned. If both objects involved are not in the same database, then Acad::eWrongDatabase is returned.

Parameters

Parameters Description
otherId Input objectId of object to swap with
swapXdata Input Boolean indicating whether to swap extended entity data
swapExtDict Input Boolean indicating whether to swap extension dictionaries

Links

AcDbObject

Was this information helpful?