不知道,这串代码是什么意思
https://adndevblog.typepad.com/autocad/2012/06/locking-the-lay ... nt-6a0167607c2431970b0263e99da56b200b
程序代码: |
[CommandMethod("Layerlack")]
static public void Layerlack()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
LayerTable table = tr.GetObject(db.LayerTableId,
OpenMode.ForRead) as LayerTable;
if (table.Has("Test"))
{
LayerTableRecord record = tr.GetObject(table["Test"],
OpenMode.ForWrite) as LayerTableRecord;
record.IsLocked = true;
//rset the line weight Just make layer dirty..
record.LineWeight = record.LineWeight;
}
tr.Commit();
}
ed.Regen();
}
但是可以设置系统变量“laylockfadectl” 来调整锁定图层的淡显程度
|
叶广孝 于 2021-07-01 06:05 PM 发表评论:
程序代码不是淡显吧,好像就一个锁定图层功能
发表评论 - 不要忘了输入验证码哦! |