How to hide DBEntity from being drawn? If I mark some object as erased with ent.erase() call in transaction, it can be removed from drawing, when I, for example, save the file. So is any way to safely hide some object without changing it's ObjectId and Handle?
It depends on what your constranits are. The easiest way is probably to create a new layer and set the .IsOff
property to true. You can then assign any object you want to hide onto that layer:
entity.Layer = myHiddenLayerName;
When you want to unhide it you simply reassign it to one of the visible layers.