锁定/解锁图层:
public static void LockLayer(LayerTableRecord layer, Document doc)
{
using (var trans = doc.TransactionManager.StartTransaction())
{
layer.UpgradeOpen();
layer.IsLock = true;
trans.Commit();
}
}
doc.Editor.Regen();
layer.IsOff = layer.IsOff;