FLCL
FLCL

Reputation: 2514

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?

Upvotes: 0

Views: 2616

Answers (2)

Maxence
Maxence

Reputation: 13306

You can use the Visible property:

entity.Visible = false;

Upvotes: 0

JayP
JayP

Reputation: 809

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.

Upvotes: 1

Related Questions