Article | 60000447 |
Type | General |
Product | Engine |
Version | 6011 |
Date Added | 3/9/2008 12:00:00 AM |
Fixed | (3/11/2008 12:00:00 AM) |
Submitted by | Sheena Konikkara |
Summary
OnAddItem , OnAfterAddItem of vdDocument and AfterAddEntity , AddEntitity of vdraw.ocx wrapper are not fired during the open command
Solution
Developer must enum between added items and mark them as deleted if he do not want them to be added.
Example of deleted all Xrefs after the Open command.
vdDocument.Open("drawing.xml");
vdPrimariesList
primaries = vdDocument.GetPrimaries(true);foreach( vdPrimary obj in primaries) if(obj is vdInsert && ((vdInsert)obj).Block.IsXref) obj.Deleted = true; // mark all the vdInsert reference Xref blocks as Deleted
foreach(vdBlock blk i n vdDocument.BLocks) if(blk.IsXref) blk.Deleted = true;//Mark all Xref blocks as deleted.
vdDocument.ClearEraseItems();//clear the undohistory , remove the deleted items from the collections