C++
void assertReadEnabled() const;
Description
This function is used only inside of member functions of classes derived from AcDbObject. It should only be used inside of member functions that access the object's data in a read-only fashion (for example, dxfOutFields()). When used, it should be the first function called inside the member function. Its purpose is to make sure that the object is open AcDb::kForRead.
If this function is called while the object is not open, AutoCAD terminates (allowing the user to save changes).