<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Deleting Wipeouts in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795192#M50747</link>
    <description>&lt;P&gt;No,&lt;/P&gt;&lt;P&gt;Wipeout is nothing but closed lwpolyline&lt;/P&gt;&lt;P&gt;with number of verices more than 3 items,&lt;/P&gt;&lt;P&gt;with every bulged segments,&lt;/P&gt;&lt;P&gt;so you can check all these properties to make&lt;/P&gt;&lt;P&gt;sure if you select wipeout&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2013 13:24:56 GMT</pubDate>
    <dc:creator>Hallex</dc:creator>
    <dc:date>2013-03-04T13:24:56Z</dc:date>
    <item>
      <title>Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795111#M50746</link>
      <description>&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;namespace BCCDELWIPOUT
{
    public class DraftingTools
    {

        [CommandMethod("BCC:WOUT")]

        public static void BCCDELETEWIPOUT()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Transaction tr = db.TransactionManager.StartTransaction();

            using (tr)
            {
                BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
                foreach (ObjectId objId in bt)
                {
                    BlockTableRecord btr = objId.GetObject(OpenMode.ForRead) as BlockTableRecord;

                    foreach (ObjectId btrObjId in btr)
                    {
                        Entity ent = btrObjId.GetObject(OpenMode.ForRead) as Entity;
                        if (ent is Wipeout)
                        {
                            ent.UpgradeOpen();
                            {
                                ent.Erase();
                            }
                        }
                    }
                }
            }
            tr.Commit();
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 11:44:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795111#M50746</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2013-03-04T11:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795192#M50747</link>
      <description>&lt;P&gt;No,&lt;/P&gt;&lt;P&gt;Wipeout is nothing but closed lwpolyline&lt;/P&gt;&lt;P&gt;with number of verices more than 3 items,&lt;/P&gt;&lt;P&gt;with every bulged segments,&lt;/P&gt;&lt;P&gt;so you can check all these properties to make&lt;/P&gt;&lt;P&gt;sure if you select wipeout&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 13:24:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795192#M50747</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-03-04T13:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795251#M50748</link>
      <description>&lt;P&gt;Thanks again buddy!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 14:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795251#M50748</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2013-03-04T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795318#M50749</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/523211"&gt;@Hallex&lt;/a&gt; wrote:&lt;BR /&gt;Wipeout is nothing but closed lwpolyline
&lt;P&gt;with number of verices more than 3 items,&lt;/P&gt;
&lt;P&gt;with every bulged segments,&lt;/P&gt;
&lt;P&gt;so you can check all these properties to make&lt;/P&gt;
&lt;P&gt;sure if you select wipeout&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Oleg! Are you sure??? Wipeout is Wipeout:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/48125i08311EB2C6ECF2E7/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="04-03-2013 17-14-55.png" title="04-03-2013 17-14-55.png" align="middle" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795318#M50749</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-04T15:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795326#M50750</link>
      <description>&lt;P&gt;Thanks Alexander.&amp;nbsp; Don't think this was always exposed to the API, correct? Might be why the suggestion.&amp;nbsp; I'm using 2012 Civil 3D... think it will work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just don't know the right way to collect the Wipeouts... as you can see in my code...&amp;nbsp; I'm doing something wrong but not sure what.&amp;nbsp; One thing is I don't think I have to ent.UpgradeOpen, I think I can just ent.erase but I'm crashing so there must be something else wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:22:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795326#M50750</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2013-03-04T15:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795337#M50751</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@bcinnv wrote:&lt;BR /&gt;
&lt;P&gt;...Don't think this was always exposed to the API, correct?...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;IMHO class Wipeout is exposed with AutoCAD .NET API since AutoCAD 2008.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;bcinnv wrote: &lt;BR /&gt;
&lt;P&gt;I just don't know the right way to collect the Wipeouts... as you can see in my code...&amp;nbsp; I'm doing something wrong but not sure what.&amp;nbsp; One thing is I don't think I have to ent.UpgradeOpen, I think I can just ent.erase but I'm crashing so there must be something else wrong.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try replace code:&lt;/P&gt;
&lt;PRE&gt;using (tr)
{
     //.......
}
tr.Commit();&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;using (tr)
{
     //.......
     tr.Commit();
}
&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:36:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795337#M50751</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-04T15:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795664#M50753</link>
      <description>&lt;P&gt;I knew that thanks&lt;/P&gt;&lt;P&gt;But why this way it's not working this way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(ssget "_X" '(( 0 . "wipeout")))&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:13:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795664#M50753</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-03-04T20:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795669#M50754</link>
      <description>&lt;P&gt;Thanks Alexander you were correct! The placement of the TR was the problem.&amp;nbsp; Updated code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// delete wipeouts

namespace BCCDELWIPOUT
{
    public class DraftingTools
    {

        [CommandMethod("BCC:WOUT")]

        public static void BCCDELETEWIPOUT()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Transaction tr = db.TransactionManager.StartTransaction();

            using (tr)
            {
                BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
                foreach (ObjectId objId in bt)
                {
                    BlockTableRecord btr = objId.GetObject(OpenMode.ForWrite) as BlockTableRecord;

                    foreach (ObjectId btrObjId in btr)
                    {
                        Entity ent = btrObjId.GetObject(OpenMode.ForWrite) as Entity;
                        if (ent is Wipeout)
                        {
                            ent.Erase();
                            
                        }
                    }
                } tr.Commit();
            }
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:17:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795669#M50754</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2013-03-04T20:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795694#M50755</link>
      <description>&lt;P&gt;Thanks! That was the way I did it in Lisp. I have decided to convert 10 years of lisp routines I've collected / created into C#, somewhat to learn, but also because I like the better performance with .net.&amp;nbsp; There is such little material about C# out there than there was .lsp it's considerably harder, but always enjoy a challenge &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help Hallex! Always appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:37:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/3795694#M50755</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2013-03-04T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Wipeouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/4869608#M50756</link>
      <description>now i am doing the same work , convert 10-years of lisp to c#.</description>
      <pubDate>Fri, 07 Mar 2014 01:41:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/deleting-wipeouts/m-p/4869608#M50756</guid>
      <dc:creator>swaywood</dc:creator>
      <dc:date>2014-03-07T01:41:14Z</dc:date>
    </item>
  </channel>
</rss>

