.NET

Reply
Member
sanmak
Posts: 3
Registered: ‎10-19-2005
Message 1 of 1 (163 Views)

how to get all objects in BlockTableRecord,inclluding the erased objects

163 Views, 0 Replies
09-13-2006 07:15 PM
I use these codes to enumerate the objects,but can't get the erased objects.Please help me.
Database db = HostApplicationServices.WorkingDatabase;
Transaction trans = db.TransactionManager.StartTransaction();
try
{
BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);
BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead,true);
bt.Dispose();

BlockTableRecordEnumerator iter = btr.GetEnumerator();

while (iter.MoveNext())
{
Entity ent = trans.GetObject(iter.Current, OpenMode.ForWrite, true) ;
}
catch
{
}
finally
{
trans.Dispose();
}

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community