ObjectId为0,无法删除?
Entity e3 = (Entity)trans.GetObject(resEnt3.ObjectId, OpenMode.ForRead);Polyline pl3 = e3 as Polyline;
Polyline pl3offset = pl3.GetOffsetCurves(5) as Polyline;
pl3offset.Erase();//出错!无法删除
为什么Offset出来的Polyline ,取得不了ObjectId?无法删除?
pl3offset.ObjectId
{(0)}
Database: null
Handle: {0}
IsEffectivelyErased: true
IsErased: true
IsNull: true
IsValid: false
NonForwardedHandle: {0}
ObjectLeftOnDisk: “pl3offset.ObjectId.ObjectLeftOnDisk”引发了“System.AccessViolationException”类型的异常
OldId: 0
OriginalDatabase: null
但是确实有值
pl3offset.StartPoint
{(626.231044874656,874.220857676195,0)}
X: 626.23104487465594
Y: 874.22085767619524
Z: 0.0
pl3offset.EndPoint
{(1537.11628763264,897.429402173179,0)}
X: 1537.1162876326446
Y: 897.429402173179
Z: 0.0
本帖最后由 sieben 于 2011-5-18 17:29 编辑
Polyline pl3offset = pl3.GetOffsetCurves(5) as Polyline;
pl3offset.Erase();//出错!无法删除
--------------------------
pl3offset 根本没提交,怎么删除?
ObjectId 为 0 表示根本没有对应对象,删除什么?
啊~~~~~忘了这茬了。
谢谢提醒!
页:
[1]