<?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: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9657092#M18904</link>
    <description>&lt;P&gt;You did not show the code related to the polyline. the polyline have to be opened for write.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 10:50:55 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2020-07-27T10:50:55Z</dc:date>
    <item>
      <title>Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656626#M18899</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am trying to attached XData to polyline but getting error&amp;nbsp;Message = "eRegappIdNotFound" and please see the below code which i have written.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private void addXdataToPolyline(Polyline pline)&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;ResultBuffer plineXData = new ResultBuffer();&lt;BR /&gt;plineXData.Add(BaseXData.ApplicationName());&lt;BR /&gt;plineXData.Add(new TypedValue((int)DxfCode.ExtendedDataInteger16, 1002));&lt;BR /&gt;plineXData.Add(new TypedValue((int)DxfCode.ExtendedDataAsciiString, "MyLayerName"));&lt;BR /&gt;using (Transaction tran = pline.ObjectId.Database.TransactionManager.StartTransaction())&lt;BR /&gt;{&lt;BR /&gt;Entity ent = (Entity)tran.GetObject(pline.ObjectId, OpenMode.ForWrite);&lt;BR /&gt;ent.XData = plineXData;&lt;BR /&gt;tran.Commit();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (System.Exception ex)&lt;BR /&gt;{&lt;BR /&gt;var ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;ed.WriteMessage($"{ex.Message}\n{ex.StackTrace}");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BaseXData.ApplicationName() is the function which will return [0]|{1001,ABC)} and&amp;nbsp;plineXdata object contains below values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[0]|{(1001,ABC}&lt;BR /&gt;[1]|{(1070,1002}&lt;BR /&gt;[2]|{(1002,MyLayerName}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me where i did mistake then i will learn and proceed my work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 05:02:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656626#M18899</guid>
      <dc:creator>manohar2375</dc:creator>
      <dc:date>2020-07-27T05:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656648#M18900</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to check if the regap already exists and, if not, create it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;private void AddXdataToPolyline(Polyline pline)
{
    var db = pline.Database;
    using (var tr = db.TransactionManager.StartTransaction())
    {
        var regAppTable = (RegAppTable)tr.GetObject(db.RegAppTableId, OpenMode.ForRead);
        if (!regAppTable.Has("ABC"))
        {
            var regApp = new RegAppTableRecord();
            regApp.Name = "ABC";
            tr.GetObject(db.RegAppTableId, OpenMode.ForWrite);
            regAppTable.Add(regApp);
        }
        var xdata = new ResultBuffer(
            new TypedValue(1001, "ABC"),
            new TypedValue(1017, 1002),
            new TypedValue(1002, YourLayerName));
        pline.XData = xdata;
        tr.Commit();
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Jul 2020 05:29:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656648#M18900</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-07-27T05:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656732#M18901</link>
      <description>&lt;P&gt;Hello gile,&lt;/P&gt;&lt;P&gt;Good morning.&lt;/P&gt;&lt;P&gt;Thanks for your support and i have used above source code but i am getting error message ex.Message = "eInvalidResBuf".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please suggest on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 06:50:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656732#M18901</guid>
      <dc:creator>manohar2375</dc:creator>
      <dc:date>2020-07-27T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656870#M18902</link>
      <description>&lt;P&gt;Oops!... A typo.&lt;/P&gt;
&lt;P&gt;replace; new TypedValue(1017, 1002) with: new TypedValue(1070, 1002)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 08:28:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656870#M18902</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-07-27T08:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656902#M18903</link>
      <description>&lt;P&gt;Hello gile,&lt;/P&gt;&lt;P&gt;I have done this '&lt;SPAN&gt;new TypedValue(1070, 1002)' then tried but it was hang at pline.XData = xdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly help on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 08:43:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9656902#M18903</guid>
      <dc:creator>manohar2375</dc:creator>
      <dc:date>2020-07-27T08:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9657092#M18904</link>
      <description>&lt;P&gt;You did not show the code related to the polyline. the polyline have to be opened for write.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 10:50:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9657092#M18904</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-07-27T10:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error eRegappIdNotFound is getting when i am submitting resultbuffer to Xdata</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9681668#M18905</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;Sorry for delay response and thanks for your support.&lt;/P&gt;&lt;P&gt;And i found my mistake and i am good to move further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thanks for your valuable support.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 04:08:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-eregappidnotfound-is-getting-when-i-am-submitting/m-p/9681668#M18905</guid>
      <dc:creator>manohar2375</dc:creator>
      <dc:date>2020-08-10T04:08:24Z</dc:date>
    </item>
  </channel>
</rss>

