<?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: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567233#M28946</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/521101"&gt;@albarney99&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&amp;lt;...&amp;gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to update this value without saving or again getting the value of (acet-edittime-total).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&amp;lt;....&amp;gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't envision a way to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;and noted in the documentation the data recorded reflects the values at the last save:&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;H2 class="title sectiontitle"&gt;&lt;FONT color="#800080"&gt;AutoLISP Access&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class="p"&gt;&lt;FONT color="#800080"&gt;EDITTIME-related data is stored per drawing in the Named Object Dictionary. The (acet-getvar ...) and (acet-setvar ...) functions, which are available in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM id="GUID-7C2311B0-808D-4605-BE73-0A1500EE28D8__GUID-649C8985-FFCD-450C-AB32-B060435EACFC" class="ph i"&gt;acetutil.fas&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;module, provide access to the BNS_EDITTIME_TOTAL profile variable. If EDITTIME has been enabled in a drawing, you can use (acet-getvar '("BNS_EDITTIME_TOTAL")) to extract the elapsed time (up to the opening of the current editing session) from the current drawing as a Julian time value (a REAL value, containing the number of 24-hour days the drawing has been in active use).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2017 03:59:36 GMT</pubDate>
    <dc:creator>kerry_w_brown</dc:creator>
    <dc:date>2017-11-23T03:59:36Z</dc:date>
    <item>
      <title>Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive result</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7547808#M28941</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The main issue I am having is running an existing LISP routine from VB.net and retrieving the result of that LISP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to move all of my Save LISP function into Dotnet. I need the (acet-edittime-total) value to write to Vault as part of a save routine.&lt;/P&gt;&lt;P&gt;This is loaded from the edittime.arx.&lt;/P&gt;&lt;P&gt;I can run it as a lisp from VB.net ok but it just writes the result to the command line.&lt;/P&gt;&lt;P&gt;I can't find a way to run a lisp function from inside Dotnet and get the result back.&lt;/P&gt;&lt;P&gt;I know I can create a LISP function in VB.net and run that and get results but this is not that scenario. I have to run an external lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried wrapping the ARX but I don't really get how that works and the documentation for Express Tools is pretty much non existant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hve tried this but it just returns 0 and without the my_cmd string the same result. Running the dumpbin on the edittime.arx only gives the acrxEntryPoint result for commands available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Edittime_ARX("(acet-edittime-total)")&lt;BR /&gt; &lt;BR /&gt;&amp;lt;DllImport("C:\Program Files\Autodesk\AutoCAD 2017\Express\edittime.arx", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, EntryPoint:="acrxEntryPoint")&amp;gt;
    Public Function Edittime_ARX(ByVal my_cmd As String) As Decimal
    End Function&lt;/PRE&gt;&lt;P&gt;I can get it using the COPYHIST and Clipboard.GetText() but to me that seems cumbersome. Another optiojn is to write it to a text file and get it from that but again that is cumbersome and potential for locked files etc causing it to fall over.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 22:01:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7547808#M28941</guid>
      <dc:creator>albarney99</dc:creator>
      <dc:date>2017-11-15T22:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7547957#M28942</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/521101"&gt;@albarney99&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The main issue I am having is running an existing LISP routine from VB.net and retrieving the result of that LISP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to move all of my Save LISP function into Dotnet. I need the (acet-edittime-total) value to write to Vault as part of a save routine.&lt;/P&gt;&lt;P&gt;This is loaded from the edittime.arx.&lt;/P&gt;&lt;P&gt;I can run it as a lisp from VB.net ok but it just writes the result to the command line.&lt;/P&gt;&lt;P&gt;I can't find a way to run a lisp function from inside Dotnet and get the result back.&lt;/P&gt;&lt;P&gt;I know I can create a LISP function in VB.net and run that and get results but this is not that scenario. I have to run an external lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried wrapping the ARX but I don't really get how that works and the documentation for Express Tools is pretty much non existant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hve tried this but it just returns 0 and without the my_cmd string the same result. Running the dumpbin on the edittime.arx only gives the acrxEntryPoint result for commands available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Edittime_ARX("(acet-edittime-total)")&lt;BR /&gt; &lt;BR /&gt;&amp;lt;DllImport("C:\Program Files\Autodesk\AutoCAD 2017\Express\edittime.arx", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, EntryPoint:="acrxEntryPoint")&amp;gt;
    Public Function Edittime_ARX(ByVal my_cmd As String) As Decimal
    End Function&lt;/PRE&gt;&lt;P&gt;I can get it using the COPYHIST and Clipboard.GetText() but to me that seems cumbersome. Another optiojn is to write it to a text file and get it from that but again that is cumbersome and potential for locked files etc causing it to fall over.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;From the looks of the functions from edittime.arx, they are not doing very much aside from wrapping a timer that can be started, stopped, paused, resumed, and reset. Or perhaps there's more to it than that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you describe what those functions do and how you use them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 23:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7547957#M28942</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-11-15T23:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7548139#M28943</link>
      <description>&lt;P&gt;edittime.arx is a Standard Express Tools function supplied with AutoCAD.&lt;/P&gt;&lt;P&gt;The DllImport was my attempt to to get access to it (unsuccessfully).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-7C2311B0-808D-4605-BE73-0A1500EE28D8-htm.html" target="_blank"&gt;EDITTIME (Express Tool) Information&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(acet-edittime-total) is one of the available functions from the arx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All it does is return a decimal vaue of the current edittime total to the command line. That is the value I need to get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 277px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/426850iCC913964EC7F4FB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use it to find the time the drawing has been actually editted for (not the time it has been opened for).&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 00:55:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7548139#M28943</guid>
      <dc:creator>albarney99</dc:creator>
      <dc:date>2017-11-16T00:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7548236#M28944</link>
      <description>&lt;P&gt;You don't need to call any LISP functions from your .NET extension to get the value you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value is stored in the DWG file, in an XRecord that's contained in a DBDictionary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is that the stored value is only updated when the file is saved, so assuming that you&amp;nbsp;&lt;/P&gt;&lt;P&gt;either just opened the file, or can save it before accessing it, the value can be gotten using the&lt;/P&gt;&lt;P&gt;code below (visit &lt;A href="http://converter.telerik.com/" target="_blank"&gt;http://converter.telerik.com&lt;/A&gt;&amp;nbsp;to convert it to VB.NET):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static class Class1
{

   [CommandMethod("EDITTIME_TOTAL")]
   public static void GetEditTimeTotal()
   {
      Document doc = Application.DocumentManager.MdiActiveDocument;
      Editor ed = doc.Editor;
      double result = GetAcetEditTimeTotal(doc.Database);
      ed.WriteMessage("\nACET_EDITTIME_TOTAL: {0}", result);
   }

   public static double GetAcetEditTimeTotal(Database db)
   {
      using(var tr = new OpenCloseTransaction())
      {
         try
         {
            DBDictionary nod = (DBDictionary) tr.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForRead);
            if(nod.Contains("BNS_VARIABLES"))
            {
               DBDictionary dict = (DBDictionary) tr.GetObject(nod.GetAt("BNS_VARIABLES"), OpenMode.ForRead);
               if(dict.Contains("BNS_EDITTIME_TOTAL"))
               {
                  Xrecord xrec = (Xrecord) tr.GetObject(dict.GetAt("BNS_EDITTIME_TOTAL"), OpenMode.ForRead);
                  TypedValue tv = xrec.Data.Cast&amp;lt;TypedValue&amp;gt;().FirstOrDefault();
                  if(tv.TypeCode == 40)
                     return (double) tv.Value;
               }
            }
            return 0.0;
         }
         finally
         {
            tr.Commit();
         }
      }
   }

}&lt;/PRE&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/521101"&gt;@albarney99&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;edittime.arx is a Standard Express Tools function supplied with AutoCAD.&lt;/P&gt;&lt;P&gt;The DllImport was my attempt to to get access to it (unsuccessfully).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-7C2311B0-808D-4605-BE73-0A1500EE28D8-htm.html" target="_blank"&gt;EDITTIME (Express Tool) Information&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(acet-edittime-total) is one of the available functions from the arx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All it does is return a decimal vaue of the current edittime total to the command line. That is the value I need to get.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use it to find the time the drawing has been actually editted for (not the time it has been opened for).&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 02:23:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7548236#M28944</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-11-16T02:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567039#M28945</link>
      <description>&lt;P&gt;Only just got back on to this. Thanks for the prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That does work as advertised and can get that value ok&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But.... (there is always a but)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do it to&amp;nbsp;update the drawing Title Block and update the Vault properties BEFORE I save the drawing (ie using the beginsave event). To use this value I have to save the drawing, do the update, then resave. i would prefer to not have to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to update this value without saving or again getting the value of (acet-edittime-total).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the (acet-edittime-total) function before getting the BNS_EDITTIME_TOTAL value but&amp;nbsp;BNS_EDITTIME_TOTAL&amp;nbsp;it is not updated running that lisp.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 00:28:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567039#M28945</guid>
      <dc:creator>albarney99</dc:creator>
      <dc:date>2017-11-23T00:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567233#M28946</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/521101"&gt;@albarney99&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&amp;lt;...&amp;gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to update this value without saving or again getting the value of (acet-edittime-total).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&amp;lt;....&amp;gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't envision a way to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;and noted in the documentation the data recorded reflects the values at the last save:&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;H2 class="title sectiontitle"&gt;&lt;FONT color="#800080"&gt;AutoLISP Access&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class="p"&gt;&lt;FONT color="#800080"&gt;EDITTIME-related data is stored per drawing in the Named Object Dictionary. The (acet-getvar ...) and (acet-setvar ...) functions, which are available in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM id="GUID-7C2311B0-808D-4605-BE73-0A1500EE28D8__GUID-649C8985-FFCD-450C-AB32-B060435EACFC" class="ph i"&gt;acetutil.fas&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;module, provide access to the BNS_EDITTIME_TOTAL profile variable. If EDITTIME has been enabled in a drawing, you can use (acet-getvar '("BNS_EDITTIME_TOTAL")) to extract the elapsed time (up to the opening of the current editing session) from the current drawing as a Julian time value (a REAL value, containing the number of 24-hour days the drawing has been in active use).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 03:59:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567233#M28946</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2017-11-23T03:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567865#M28947</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/521101"&gt;@albarney99&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Only just got back on to this. Thanks for the prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That does work as advertised and can get that value ok&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But.... (there is always a but)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do it to&amp;nbsp;update the drawing Title Block and update the Vault properties BEFORE I save the drawing (ie using the beginsave event). To use this value I have to save the drawing, do the update, then resave. i would prefer to not have to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to update this value without saving or again getting the value of (acet-edittime-total).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the (acet-edittime-total) function before getting the BNS_EDITTIME_TOTAL value but&amp;nbsp;BNS_EDITTIME_TOTAL&amp;nbsp;it is not updated running that lisp.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static class Class1
{

   [CommandMethod("EDITTIME_TOTAL")]
   public static void TestEdTime()
   {
      Document doc = Application.DocumentManager.MdiActiveDocument;
      Editor ed = doc.Editor;
      double result = GetAcetEditTimeTotal();
      ed.WriteMessage("\nACET_EDITTIME_TOTAL: {0}", result);
   }

   public static double GetAcetEditTimeTotal()
   {
      Document doc = Application.DocumentManager.MdiActiveDocument;
      Database db = doc.Database;
      using(doc.LockDocument())
      {
         // In order to coerce EDITTIME.ARX to update the value
         // it stores it the drawing file, we emulate what the
         // AUTOSAVE mechanism does, by saving the database to a 
         // temporary file. Doing that triggers the notification 
         // EDITTIME.ARX uses to update the value it stores in
         // the drawing file. This does not save the database to 
         // the filename of the active document or affect it in 
         // any other way, since it also discards changes to its 
         // DBMOD flags. In order for this to work, EDITTIME.ARX
         // must be loaded. Otherwise, the value returned will be
         // the value that was saved in the DWG file, the last
         // time the file was saved while EDITTIME.ARX was loaded.

         if(Convert.ToInt32(Application.GetSystemVariable("DBMOD")) &amp;gt; 0)
         {
            var tempfilename = System.IO.Path.GetTempFileName();
            doc.PushDbmod();
            db.SaveAs(tempfilename, db.OriginalFileVersion);
            doc.PopDbmod();
            File.Delete(tempfilename);
         }
         using(var tr = new OpenCloseTransaction())
         {
            try
            {
               DBDictionary nod = (DBDictionary) tr.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForRead);
               if(nod.Contains("BNS_VARIABLES"))
               {
                  DBDictionary dict = (DBDictionary) tr.GetObject(nod.GetAt("BNS_VARIABLES"), OpenMode.ForRead);
                  if(dict.Contains("BNS_EDITTIME_TOTAL"))
                  {
                     Xrecord xrec = (Xrecord) tr.GetObject(dict.GetAt("BNS_EDITTIME_TOTAL"), OpenMode.ForRead);
                     TypedValue tv = xrec.Data.Cast&amp;lt;TypedValue&amp;gt;().FirstOrDefault();
                     if(tv.TypeCode == 40)
                        return (double) tv.Value;
                  }
               }
               return 0.0;
            }
            finally
            {
               tr.Commit();
            }
         }
      }
   }

}

&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 10:31:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7567865#M28947</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-11-23T10:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7603349#M28948</link>
      <description>&lt;P&gt;Thanks ActiveInvestor,&lt;/P&gt;
&lt;P&gt;clever fudge &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;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 02:11:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7603349#M28948</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2017-12-07T02:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Run (acet-edittime-total) LISP from edittime.ARX in Dotnet and retreive resu</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7603355#M28949</link>
      <description>&lt;P&gt;Thanks. This did work.&lt;/P&gt;&lt;P&gt;Whilst not ideal I think that is as good as I am going to get. It would be nice if Autodesk opened these functions up to be able to be used outside of the LISP world.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 02:14:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-acet-edittime-total-lisp-from-edittime-arx-in-dotnet-and/m-p/7603355#M28949</guid>
      <dc:creator>albarney99</dc:creator>
      <dc:date>2017-12-07T02:14:36Z</dc:date>
    </item>
  </channel>
</rss>

