<?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: Regen entity in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696049#M65139</link>
    <description>&lt;P&gt;Hello &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish you many thanks&amp;nbsp;for this invaluable assistance!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours knowledge of&amp;nbsp;autocad api is amazing for me &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In attachment is class, litle modified and convertet to vb.net from&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098" target="_blank" rel="nofollow"&gt;http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports Autodesk.AutoCAD.DatabaseServices
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput

Public Class EntUpdate

    ' ARX signature:
    ' int acdbEntUpd( const ads_name ent);
    &amp;lt;DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, EntryPoint:="acdbEntUpd")&amp;gt; _
    Public Shared Function acdbEntUpd(ByVal ent As Long()) As Integer
    End Function

    ' ARX signature:
    ' Acad::ErrorStatus acdbGetAdsName(ads_name&amp;amp; objName, AcDbObjectId objId);
    &amp;lt;DllImport("acdb18.dll", CallingConvention:=CallingConvention.Cdecl, EntryPoint:="?acdbGetAdsName@@YA?AW4ErrorStatus@Acad@@AAY01JVAcDbObjectId@@@Z")&amp;gt; _
    Public Shared Function acdbGetAdsName(ByVal objName As Long(), ByVal objId As ObjectId) As Integer
    End Function

    &amp;lt;CommandMethod("TEST1")&amp;gt; _
    Public Shared Sub CmdTest()
        Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
        Dim ed As Editor = doc.Editor

        Dim per As PromptEntityResult = ed.GetEntity(vbLf &amp;amp; "Select object: ")
        If per.Status &amp;lt;&amp;gt; PromptStatus.OK Then
            Return
        End If
        Dim objName As Long() = New Long() {0, 0}
        acdbGetAdsName(objName, per.ObjectId)
        acdbEntUpd(objName)
    End Sub

    Public Shared Sub CmdTest(ByVal objID As ObjectId)
        Dim objName As Long() = New Long() {0, 0}
        acdbGetAdsName(objName, objID)
        acdbEntUpd(objName)
    End Sub


End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098" target="_blank" rel="nofollow"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Danijel&lt;/P&gt;</description>
    <pubDate>Sun, 13 Jun 2010 08:59:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-06-13T08:59:26Z</dc:date>
    <item>
      <title>Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695949#M65133</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one problem with regen entity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to apply regen only for one entity, I unfortunately&lt;/P&gt;&lt;P&gt;did'n find any method for this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Danijel&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2010 06:10:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695949#M65133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-12T06:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695955#M65134</link>
      <description>&lt;P&gt;As far as I recall there is none.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;You can use &lt;SPAN&gt;QueueForGraphicsFlush() to have the graphic display prior to calling Comit&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="2"&gt;.. not sure if that will help you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2010 07:29:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695955#M65134</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-06-12T07:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695956#M65135</link>
      <description>&lt;P&gt;Hello KerryBrown :-)!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need regent entity because, I have on specific entity xdata.&lt;/P&gt;&lt;P&gt;When user copy entity, I need to regen it, because depending on it&lt;/P&gt;&lt;P&gt;function worlddraw (for custom entity).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found on objectarx function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;acdbEntUpd() //regen object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, but don't know is there in .net api something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Danijel&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2010 07:41:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2695956#M65135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-12T07:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696015#M65136</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Danijel,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I've tried to pInvoke&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#010001" size="3"&gt;&lt;FONT face="Consolas" color="#010001" size="3"&gt;&lt;FONT face="Consolas" color="#010001" size="3"&gt;acdbEntUpd()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#010001"&gt;&lt;FONT face="Consolas" color="#010001"&gt;&lt;FONT face="Consolas" color="#010001" size="2"&gt;but have hit a wall. I'm obviously doing something wrong ...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#010001" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;[assembly: CommandClass(typeof(KdubTesting.TestCommands))]

namespace KdubTesting
{
    // CodeHimBelongaKdub Jun 2008 
    public partial class Kdub_API
    {
        //==================================================================================

        [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl)]
        public static extern int acdbEntUpd(long adsName);
        /*
       * If acdbEntUpd() succeeds, it returns RTNORM  ( 5100 )
       * otherwise,                it returns RTERROR.(-5001 )
       * When acdbEntUpd() fails, it sets the system variable ERRNO to a value
       * that indicates the reason for the failure. 
       */ 
        //==================================================================================

        [DllImport("acdb18.dll", CallingConvention = CallingConvention.Cdecl,
        EntryPoint = "?acdbGetAdsName@@YA?AW4ErrorStatus@Acad@@AAY01JVAcDbObjectId@@@Z")]
        public extern static ErrorStatus acdbGetAdsName(out long objName, ObjectId objId );

        /*
         * Acad::ErrorStatus acdbGetAdsName(
         *      ads_name&amp;amp; objName, 
         *      AcDbObjectId obj
         * );
         * This function fills in objName with the ads_name that corresponds to the objId object ID.
         * Returns Acad::eOk if successful. 
         * If objId is 0, then Acad::eNullObjectId is returned.
      */ 
        //==================================================================================

    }
    // CodeHimBelongaKdub Jun 2008 
    public partial class TestCommands
    {
        [CommandMethod("EntUpd")]
        static public void TestacdbEntUpd()
        {
            Document doc = AcadApp.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Database db = doc.Database;

            PromptEntityResult res = ed.GetEntity("\nSelect an entity to Regen:");
            ObjectId id = res.ObjectId;
            long adsName;
            ErrorStatus es;

            AcadApp.SetSystemVariable("ERRNO", 0);

            using(Transaction tr = db.TransactionManager.StartTransaction())
            {
                es = Kdub_API.acdbGetAdsName(out adsName, id);

                ed.WriteMessage("\n adsName is {0} ", adsName);
                ed.WriteMessage("\n ErrorStatus is {0} ", es);

                int apiReturn = Kdub_API.acdbEntUpd(adsName); 

                ed.WriteMessage("\n api acdbEntUpd_Return is {0} ", apiReturn);
                ed.WriteMessage("\n System variable ERRNO  is {0} ", AcadApp.GetSystemVariable("ERRNO"));

                tr.Commit();
            }
            ed.WriteMessage("\n Complete: System variable ERRNO  is {0} ", AcadApp.GetSystemVariable("ERRNO"));
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;This is the result I'm getting :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Command: errno&lt;BR /&gt;Enter new value for ERRNO &amp;lt;0&amp;gt;:&lt;BR /&gt;&lt;BR /&gt;Command: entupd&lt;BR /&gt;&lt;BR /&gt;Select an entity to Regen:&lt;BR /&gt;&amp;nbsp;adsName is 9158139860942894088&lt;BR /&gt;&amp;nbsp;ErrorStatus is OK&lt;BR /&gt;&amp;nbsp;api acdbEntUpd_Return is -5001&lt;BR /&gt;&amp;nbsp;System variable ERRNO &amp;nbsp;is 5&lt;BR /&gt;&amp;nbsp;Complete: System variable ERRNO &amp;nbsp;is 5&lt;BR /&gt;&lt;BR /&gt;Command: errno&lt;BR /&gt;Enter new value for ERRNO &amp;lt;2&amp;gt;:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#010001" size="2"&gt;The acdbEntUpd generates an ERRNO of 5&lt;BR /&gt;When the routine returns to AutoCAD, the ERRNO command from the commandLine reports 2.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#010001" size="2"&gt;The 'Scrambled' name for acdbGetAdsName is the same in acdb17.dll 32bit &amp;nbsp;and acdb18.dll 32bit ... so my DllImports should be suitable for AC 2007-AC2011 ( once I get the bug sorted. )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2010 23:29:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696015#M65136</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-06-12T23:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696019#M65137</link>
      <description>&lt;P&gt;Ignoring the platform-specific entrypoint issue,&lt;/P&gt;&lt;P&gt;I think you need to declare any ads_name parameter&lt;/P&gt;&lt;P&gt;as an out parameter. Or you can use double[]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your declaration for acdbEntUpd() should have&lt;/P&gt;&lt;P&gt;an 'out' parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also open the entity for write, and just&lt;/P&gt;&lt;P&gt;assign its LayerId property to the same value it&lt;/P&gt;&lt;P&gt;currently has, and that should also cause it to&lt;/P&gt;&lt;P&gt;update.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2010 23:46:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696019#M65137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-12T23:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696025#M65138</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Thanks Tony,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Weve been discussing this at theSwamp &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098" target="_blank" rel="nofollow"&gt;&lt;FONT size="2"&gt;http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I missed that ads_name needed to be an array of longs not a long.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Interesting procedure with the&amp;nbsp;&amp;nbsp;LayerId property !!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I'll do some more testing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2010 01:39:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696025#M65138</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-06-13T01:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696049#M65139</link>
      <description>&lt;P&gt;Hello &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish you many thanks&amp;nbsp;for this invaluable assistance!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours knowledge of&amp;nbsp;autocad api is amazing for me &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In attachment is class, litle modified and convertet to vb.net from&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098" target="_blank" rel="nofollow"&gt;http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports Autodesk.AutoCAD.DatabaseServices
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput

Public Class EntUpdate

    ' ARX signature:
    ' int acdbEntUpd( const ads_name ent);
    &amp;lt;DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, EntryPoint:="acdbEntUpd")&amp;gt; _
    Public Shared Function acdbEntUpd(ByVal ent As Long()) As Integer
    End Function

    ' ARX signature:
    ' Acad::ErrorStatus acdbGetAdsName(ads_name&amp;amp; objName, AcDbObjectId objId);
    &amp;lt;DllImport("acdb18.dll", CallingConvention:=CallingConvention.Cdecl, EntryPoint:="?acdbGetAdsName@@YA?AW4ErrorStatus@Acad@@AAY01JVAcDbObjectId@@@Z")&amp;gt; _
    Public Shared Function acdbGetAdsName(ByVal objName As Long(), ByVal objId As ObjectId) As Integer
    End Function

    &amp;lt;CommandMethod("TEST1")&amp;gt; _
    Public Shared Sub CmdTest()
        Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
        Dim ed As Editor = doc.Editor

        Dim per As PromptEntityResult = ed.GetEntity(vbLf &amp;amp; "Select object: ")
        If per.Status &amp;lt;&amp;gt; PromptStatus.OK Then
            Return
        End If
        Dim objName As Long() = New Long() {0, 0}
        acdbGetAdsName(objName, per.ObjectId)
        acdbEntUpd(objName)
    End Sub

    Public Shared Sub CmdTest(ByVal objID As ObjectId)
        Dim objName As Long() = New Long() {0, 0}
        acdbGetAdsName(objName, objID)
        acdbEntUpd(objName)
    End Sub


End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33741.msg391098#msg391098" target="_blank" rel="nofollow"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Danijel&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2010 08:59:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696049#M65139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-13T08:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696050#M65140</link>
      <description>&lt;P&gt;Oops.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, did I say 'double[]' ? &lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://forums.autodesk.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I meant&amp;nbsp;long[], not double[].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this is what you would use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;static extern int acdbEntUpd( out Int64 ename );

&lt;/PRE&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>Sun, 13 Jun 2010 08:53:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696050#M65140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-13T08:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696054#M65141</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, did I say 'double[]' ? &lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://forums.autodesk.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I meant&amp;nbsp;long[], not double[].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="2"&gt;Yep, I knew what you meant&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; Thanks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I still need to find time to fully test the 'out' for myself.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2010 09:42:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696054#M65141</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-06-13T09:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regen entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696138#M65142</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Tony,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The 'out' option worked fine { but you knew that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Thanks for the help.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Danijel ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I've updated theSwamp files with a new test routine;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;... however, something like this may be a little more practical.&lt;BR /&gt;I'd be happy to have someone seriously test it.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;

[assembly: CommandClass(typeof(KdubTesting.TestCommands))]

namespace KdubTesting
{
    // CodeHimBelongaKdub Jun 2008 
    public partial class TestCommands
    {
        const string ACAD_EXE = "Acad.exe";
        const short RTNORM = 5100;
        const short RTERROR = -5001;
        //===================================================================================
        // ARX signature:
        // Acad::ErrorStatus acdbGetAdsName(ads_name&amp;amp; objName, AcDbObjectId objId);
        [DllImport("acdb18.dll", CallingConvention = CallingConvention.Cdecl,
            EntryPoint = "?acdbGetAdsName@@YA?AW4ErrorStatus@Acad@@AAY01JVAcDbObjectId@@@Z")]
        public static extern ErrorStatus acdbGetAdsName(out long adsName, ObjectId id);
        /*
        * Parameters
        *  ads_name&amp;amp; objName    Output ads_name  
        *  AcDbObjectId objId   Input object ID  
        *
        * This function fills in objName with the ads_name that 
        * corresponds to the objId object ID.
        * Returns Acad::eOk if successful. 
        * If objId is 0, then Acad::eNullObjectId is returned.
        */
        //===================================================================================
        // ARX signature:
        // int acdbEntUpd( const ads_name ent);
        [DllImport(ACAD_EXE, CallingConvention = CallingConvention.Cdecl,
            EntryPoint = "acdbEntUpd")]
        public static extern int acdbEntUpd(out long adsName);
        /*
        * If acdbEntUpd() succeeds, it returns RTNORM  ( 5100 )
        * otherwise,                it returns RTERROR.(-5001 )
        * When acdbEntUpd() fails, it sets the system variable ERRNO to a value
        * that indicates the reason for the failure. 
        */
        //===================================================================================
        //===================================================================================
        [CommandMethod("Test0614b")]
        static public void Test0614b_acdbEntUpd_withBoolTestMethod()
        {
            Document doc = AcadApp.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;

            PromptEntityResult per = ed.GetEntity("\nSelect object: ");
            if(per.Status != PromptStatus.OK)
            {
                ed.WriteMessage("\n Nothing Selected");
                return;
            }
            ObjectId id = per.ObjectId;
            if( EntityUpdate(id))
                System.Windows.Forms.MessageBox.Show( "Entity Updates sucessfully", "Test0614b");
            else
                System.Windows.Forms.MessageBox.Show( "It hit the fan", "Test0614b");
        }
        //===================================================================================
        public static bool EntityUpdate(ObjectId id)
        {
            long adsName;
            if(acdbGetAdsName(out adsName, id) != ErrorStatus.OK)
                return false;
            return (acdbEntUpd(out adsName) == RTNORM);
        }
        //===================================================================================
     }
}&lt;/PRE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2010 03:26:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/regen-entity/m-p/2696138#M65142</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-06-14T03:26:40Z</dc:date>
    </item>
  </channel>
</rss>

