怎么将图元图层设置成0图层,c#求教🙏🙏
有没有人教练啊,第一次接触cad完全菜鸟该贴已经同步到 **** Hidden Message ***** 发错地方了吧?
直接用ent.LayerId=0图层ObjectId
// //得到0图层ObjectId
using (Transaction trans = doc.TransactionManager.StartTransaction())
{
LayerTable layerTable = (LayerTable)db.LayerTableId.GetObject(OpenMode.ForRead);
foreach (ObjectId layId in layerTable)
{
if (layerRecord.Name == "0")
{
layerId = layId;
}
} Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable ("clayer" , "0") 这样更方便
页:
[1]