Share

AcDbDatabase::dbIdFromPtr

C++

static ACDBCORE2D_PORT int64_t dbIdFromPtr(
    const AcDbDatabase * pDb
);

Description

Gets the unique runtime identifier for the given database instance.

Parameters

Parameters Description
pDb Input pointer to an AcDbDatabase

Returns

Returns a runtime id which is > 0 on success, else returns an id <= 0 indicating invalid input db pointer.

Remarks

Can be used to validate an AcDbDatabase pointer.

A db address may get re-used if the db is deleted and a new one is created at the same location in memory, but they will have different runtime ids.

Links

AcDbDatabase Class

Was this information helpful?