<?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: generateusagedata messages in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7984761#M26063</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; Sometimes&amp;nbsp;generateusagedata generates a message that says "A vertex was added to a 2D pline" and the handle of the object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;How is it that that particular method is returning that message? generateusagedata&amp;nbsp;should just generate data for the IsUsed property of the layerTableRecord object - according to the documentation, so presumably (and I could be wrong here - there should not be a message about polylines and vertexes?)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Perhaps post some code so that the issue can be replicated on someone else's PC? Otherwise it makes it harder to solve the problem.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rgds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 13:59:13 GMT</pubDate>
    <dc:creator>BKSpurgeon</dc:creator>
    <dc:date>2018-05-07T13:59:13Z</dc:date>
    <item>
      <title>generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7982359#M26062</link>
      <description>&lt;P&gt;I am using&amp;nbsp;generateusagedata in a batch file scanner with ReadDwgFile.&amp;nbsp; I start an autocad session and netload the dll.&amp;nbsp; Sometimes&amp;nbsp;generateusagedata generates a message that says "A vertex was added to a 2D pline" and the handle of the object.&lt;/P&gt;&lt;P&gt;I want to know the name of the file that was being scanned at that time. I should be able to use an event handler??&amp;nbsp; The editor is not doing anything.&amp;nbsp; The messages are on the screen when I check the batch results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 18:16:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7982359#M26062</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2018-05-05T18:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7984761#M26063</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; Sometimes&amp;nbsp;generateusagedata generates a message that says "A vertex was added to a 2D pline" and the handle of the object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;How is it that that particular method is returning that message? generateusagedata&amp;nbsp;should just generate data for the IsUsed property of the layerTableRecord object - according to the documentation, so presumably (and I could be wrong here - there should not be a message about polylines and vertexes?)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Perhaps post some code so that the issue can be replicated on someone else's PC? Otherwise it makes it harder to solve the problem.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rgds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 13:59:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7984761#M26063</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2018-05-07T13:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7985689#M26064</link>
      <description>&lt;P&gt;There's something different about "GenerateUsageData".&amp;nbsp; I see the progress bar flash by in the bottom right corner.&amp;nbsp; I don't understand why I see anything in the editor.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was working on a dwg sample but I can't replicate it.&amp;nbsp; I found the file using debug.&amp;nbsp; The handles belong to 4 zero length plines.&amp;nbsp; &amp;nbsp; When I strip everything else out of the file I don't get the messages anymore.&amp;nbsp; Unfortunately I can't post it here.&amp;nbsp; Below is all the code required to generate the messages.&amp;nbsp; I'll resurrect this post in the future if I get any more information.&amp;nbsp; Thx&lt;/P&gt;&lt;PRE&gt;[CommandMethod("scanfiles")]
        static public void scanfiles()
        {
            string msg = "scanfiles";
            Document doc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            List&amp;lt;string&amp;gt; dwgfiles = new List&amp;lt;string&amp;gt;();
            dwgfiles.Add("c:\\temp\\bad_plines.dwg");
            dwgfiles.Add("c:\\temp\\bad_plines_ii.dwg");
            foreach (string d in dwgfiles)
            {
                Database scandb = new Database(false, true);
                try
                {
                    scandb.ReadDwgFile(d, System.IO.FileShare.Read, true, null);
                    msg += "\nfile open " + d;
                }
                catch
                {
                    msg += "\nfile not open " + d;
                    continue;
                }
                using (Transaction tr = scandb.TransactionManager.StartTransaction())
                {
                    // layers
                    LayerTable lt = (LayerTable)tr.GetObject(scandb.LayerTableId, OpenMode.ForRead);
                    lt.GenerateUsageData();&lt;BR /&gt;                    tr.Commit();
                }//
            }// foreach
            ed.WriteMessage(msg);
        }// scanfiles - acad command     &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 20:51:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7985689#M26064</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2018-05-07T20:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7985834#M26065</link>
      <description>&lt;P&gt;I have no idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not replicate that problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 23:01:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7985834#M26065</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2018-05-07T23:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7986091#M26066</link>
      <description>&lt;P&gt;Output the name of each file you process to the command line, and turn on console logging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/81963"&gt;@fieldguy&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;I am using&amp;nbsp;generateusagedata in a batch file scanner with ReadDwgFile.&amp;nbsp; I start an autocad session and netload the dll.&amp;nbsp; Sometimes&amp;nbsp;generateusagedata generates a message that says "A vertex was added to a 2D pline" and the handle of the object.&lt;/P&gt;&lt;P&gt;I want to know the name of the file that was being scanned at that time. I should be able to use an event handler??&amp;nbsp; The editor is not doing anything.&amp;nbsp; The messages are on the screen when I check the batch results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 02:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7986091#M26066</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-05-08T02:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: generateusagedata messages</title>
      <link>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7988141#M26067</link>
      <description>&lt;P&gt;That works!&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 18:28:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/generateusagedata-messages/m-p/7988141#M26067</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2018-05-08T18:28:01Z</dc:date>
    </item>
  </channel>
</rss>

