Results 1 to 5 of 5

Thread: Writing complete purge program

  1. #1
    Active Member
    Join Date
    2015-11
    Posts
    86
    Login to Give a bone
    0

    Default Writing complete purge program

    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
    Attached Files Attached Files

  2. #2
    Active Member
    Join Date
    2009-08
    Posts
    93
    Login to Give a bone
    0

    Default Re: Writing complete purge program

    Do you have any database explorers
    They help alot on finding certain things

    The attached picture is a free one search throughtheinterface for mgddbg and there is a page with this one and ARXDBG and snoop.

    It also can be found at C:\ObjectARX 2011\samples\database\ARXDBG(or wherever you saved it at) this one if I remeber correctly you have to compile yourself
    Attached Images Attached Images

  3. #3
    Active Member
    Join Date
    2015-11
    Posts
    86
    Login to Give a bone
    0

    Default Re: Writing complete purge program

    Thanks for the info Jeff.

    I am still having trouble writing the proper code to add materials, mlinestyles, etc. to my collection of stuff to be purged. I have written code to read the dictionary, but I'm not sure how to add it to my collection.

    Any thoughts?

    Thanks!

    Jason

  4. #4
    I could stop if I wanted to
    Join Date
    2007-08
    Posts
    202
    Login to Give a bone
    0

    Default Re: Writing complete purge program

    Hi,

    You can have a look here (have to register) :
    http://www.theswamp.org/index.php?topic=33516.0

  5. #5
    Active Member
    Join Date
    2015-11
    Posts
    86
    Login to Give a bone
    0

    Default Re: Writing complete purge program

    I will give it a go. Thanks!

    Jason

Similar Threads

  1. PR33-2L: Writing Your First ObjectARX Program
    By Autodesk University in forum Computer Programming
    Replies: 0
    Last Post: 2012-11-24, 07:38 PM
  2. Purge: The existing purge command misses some stuff that could be purged from a file.
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2010-03-12, 12:28 PM
  3. Replies: 7
    Last Post: 2008-12-22, 07:51 PM
  4. Replies: 6
    Last Post: 2006-08-16, 07:55 AM
  5. Writing a Short program from Large Program
    By avinash00002002 in forum VBA/COM Interop
    Replies: 2
    Last Post: 2006-07-13, 01:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •