简体   繁体   中英

How to hide Entity from AutoCad draw?

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.

您可以使用Visible属性:

entity.Visible = false;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM