图形保存时出错
自己写的dwg文件,在保存时提示出错,建议recover,在执行recover时,查出AcMapBulkFeature(153C) Null Linetype Redirected这样的错误,不知道什么原因经过修改,还是提示保存时出错,但执行recover后并没有发现什么错误,真不知道是什么原因 代码呢?
如果涉及保密内容,那么简化的代码贴上 点对象 using (BlockReference bref = new BlockReference(Ent.pt, idx))
{
bref.Rotation = Ent.Angle;
bref.LayerId = Lay;
bref.Linetype = "CONTINUOUS";
//bref.BlockUnit = UnitsValue.Centimeters;
bref.ScaleFactors = new Scale3d(0.5, 0.5, 1);
//zyGlobal.zyComFun.AddEntityToMap(bref, DocNew);
DrawEntity(bref, DocNew, Lay);
}
注记
Entity Tex = Ent.Clone() as Entity;
Tex.LayerId = Lay;
Tex.Linetype = "CONTINUOUS";
//zyGlobal.zyComFun.AddEntityToMap(Tex, DocNew);
DrawEntity(Tex, DocNew, Lay);
线:Entity line = Ent.Line.Clone() as Entity;
line.LayerId = Lay;
line.Linetype = LineType;
DrawEntity(line, DocNew, Lay); 麻烦版主给看看 bref.Linetype = "CONTINUOUS";
去掉试试
你的图层定义应该有线型定义的吧
估计此处有bug,netapi直接把当前文档的线型Id赋值过来了 定义图层时没定义线型 这个需要定义吗
Database.ContinuousLinetype Property
这个是默认建立的
像这样的符号表记录形式的属性,应该尽量把Id赋值过去 定义图层时定义了线型,把bref.Linetype = "CONTINUOUS"也去掉了,还是出现同样的错误提示 line.Linetype = LineType?
页:
[1]
2