Hello everybody!
I am trying to write a c# program that will purge all of the objects from a drawing. I know that it can be done more efficiently through scripting and LISP, but I want to better my programming skills. I have attached what I have so far, which is based on this post by kean Walmsley.
I am wondering how to include the items such as materials and mleader styles to the list. They don't appear the same. For example, see below:
Code:
LayerTable layt =
(LayerTable)tr.GetObject(
db.LayerTableId,
OpenMode.ForRead
);
foreach (ObjectId layID in layt)
{
if (layID.IsValid)
{
idsToPurge.Add(layID);
}
}
This shows up for layer, but if I try and add shapes for example, there is no shape table ID. Which collection do I need to evaluate for materials, mline styles, multileader styles, plot styles, shapes, table styles, and visual styles. There's also something new in 2011 where you can purge zero length geometry. How do I add that to my list.
I am a newbie when it comes to this, and I now have some more time to play with this. Thanks for all of your help.
JC