<?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: Disable the acaddoc.lsp file in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620596#M67428</link>
    <description>Thanks, everyone for your help. And in our situation it sounds like a empty acaddoc.lsp file is the most promising since our acaddoc.lsp file is on a shared server. &lt;BR /&gt;
&lt;BR /&gt;
However, after asking the question I continued to reseach different ways around this problem and I think I am going to use the EnteringQuiescentState for my current application. I was also looking into the IdleEvent; but I could not get that one to work. Is there a difference beween the trigger for an Idle event and InQuiescent state? &lt;BR /&gt;
&lt;BR /&gt;
Here is the code I managed to put together in C#, if anyone is interested&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
public void AddAcadIdleEvent()&lt;BR /&gt;
{&lt;BR /&gt;
&lt;BR /&gt;
        Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.EnteringQuiescentState += Application_Idle;&lt;BR /&gt;
      &lt;BR /&gt;
}&lt;BR /&gt;
public void RemoveAcadIdleEvent()&lt;BR /&gt;
{&lt;BR /&gt;
        Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.EnteringQuiescentState -= Application_Idle;&lt;BR /&gt;
}&lt;BR /&gt;
        &lt;BR /&gt;
void Application_Idle( object sender, System.EventArgs e )&lt;BR /&gt;
{&lt;BR /&gt;
        try&lt;BR /&gt;
        {&lt;BR /&gt;
                &lt;BR /&gt;
            RemoveAcadIdleEvent();&lt;BR /&gt;
            \\ You Code here                 &lt;BR /&gt;
        }&lt;BR /&gt;
        catch&lt;BR /&gt;
        {&lt;BR /&gt;
            \\ You error trapping code here&lt;BR /&gt;
        }&lt;BR /&gt;
            &lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
Note: My "Application" gets conflicted with various using statments that also use "Application", so I have to show the whole line. &lt;BR /&gt;
&lt;BR /&gt;
Thanks again for your input.</description>
    <pubDate>Mon, 25 Jan 2010 14:11:36 GMT</pubDate>
    <dc:creator>hanchris</dc:creator>
    <dc:date>2010-01-25T14:11:36Z</dc:date>
    <item>
      <title>Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620591#M67423</link>
      <description>I could go into more detail if you want; but right now I am just interested if it is possible to disable the acaddoc.lsp, only while a .NET program is running? &lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Fri, 22 Jan 2010 13:34:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620591#M67423</guid>
      <dc:creator>hanchris</dc:creator>
      <dc:date>2010-01-22T13:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620592#M67424</link>
      <description>Hi hanchris,&lt;BR /&gt;
&lt;BR /&gt;
The contents of the Acaddoc.lsp file are loaded into memory every time a &lt;BR /&gt;
drawing opens.  If you don't want it because you are opening drawings &lt;BR /&gt;
with your .NET code and obvious possibility to to use the following &lt;BR /&gt;
pseudo code.&lt;BR /&gt;
&lt;BR /&gt;
Rename acaddoc.lsp acaddoc_not_needed_now.lsp&lt;BR /&gt;
....  content of your program&lt;BR /&gt;
Rename  acaddoc_not_needed_now.lsp acaddoc.lsp&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Laurie Comerford&lt;BR /&gt;
hanchris wrote:&lt;BR /&gt;
&amp;gt; I could go into more detail if you want; but right now I am just interested if it is possible to disable the acaddoc.lsp, only while a .NET program is running? &lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks.&lt;BR /&gt;
&amp;gt;</description>
      <pubDate>Fri, 22 Jan 2010 20:19:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620592#M67424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-22T20:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620593#M67425</link>
      <description>Acaddoc.lsp is loaded when a drawing file is opened.&lt;BR /&gt;
&lt;BR /&gt;
If your code is opening drawing files in AutoCAD, then&lt;BR /&gt;
you have to find the applicable acaddoc.lsp file (which&lt;BR /&gt;
can be complicated if there are more than one), and&lt;BR /&gt;
rename it.&lt;BR /&gt;
&lt;BR /&gt;
As soon as the file is opened you can rename it back&lt;BR /&gt;
to acaddoc.lsp.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;HANCHRIS&gt; wrote in message news:6322877@discussion.autodesk.com...&lt;BR /&gt;
I could go into more detail if you want; but right now I am just interested if &lt;BR /&gt;
it is possible to disable the acaddoc.lsp, only while a .NET program is running?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;/HANCHRIS&gt;</description>
      <pubDate>Fri, 22 Jan 2010 23:15:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620593#M67425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-22T23:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620594#M67426</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Just an idea.&lt;BR /&gt;
When opening a drawing, AutoCAD searches for an acaddoc.lsp file and loads the first he finds.&lt;BR /&gt;
The first location AutoCAD looks for an acaddoc.lsp file is the folder which contains the opening drawing.&lt;BR /&gt;
So, if you create an empty acaddoc.lsp file in the same folder as the drawing you want open, only this empty acaddoc.lsp file should be loaded.</description>
      <pubDate>Sat, 23 Jan 2010 12:32:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620594#M67426</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2010-01-23T12:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620595#M67427</link>
      <description>What happens if the drawing hasn't been saved yet? A new drawing, so to say.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&amp;lt;_gile&amp;gt; wrote in message news:6323357@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
Just an idea.&lt;BR /&gt;
When opening a drawing, AutoCAD searches for an acaddoc.lsp file and loads &lt;BR /&gt;
the first he finds.&lt;BR /&gt;
The first location AutoCAD looks for an acaddoc.lsp file is the folder which &lt;BR /&gt;
contains the opening drawing.&lt;BR /&gt;
So, if you create an empty acaddoc.lsp file in the same folder as the &lt;BR /&gt;
drawing you want open, only this empty acaddoc.lsp file should be loaded.</description>
      <pubDate>Sun, 24 Jan 2010 10:50:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620595#M67427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-24T10:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620596#M67428</link>
      <description>Thanks, everyone for your help. And in our situation it sounds like a empty acaddoc.lsp file is the most promising since our acaddoc.lsp file is on a shared server. &lt;BR /&gt;
&lt;BR /&gt;
However, after asking the question I continued to reseach different ways around this problem and I think I am going to use the EnteringQuiescentState for my current application. I was also looking into the IdleEvent; but I could not get that one to work. Is there a difference beween the trigger for an Idle event and InQuiescent state? &lt;BR /&gt;
&lt;BR /&gt;
Here is the code I managed to put together in C#, if anyone is interested&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
public void AddAcadIdleEvent()&lt;BR /&gt;
{&lt;BR /&gt;
&lt;BR /&gt;
        Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.EnteringQuiescentState += Application_Idle;&lt;BR /&gt;
      &lt;BR /&gt;
}&lt;BR /&gt;
public void RemoveAcadIdleEvent()&lt;BR /&gt;
{&lt;BR /&gt;
        Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.EnteringQuiescentState -= Application_Idle;&lt;BR /&gt;
}&lt;BR /&gt;
        &lt;BR /&gt;
void Application_Idle( object sender, System.EventArgs e )&lt;BR /&gt;
{&lt;BR /&gt;
        try&lt;BR /&gt;
        {&lt;BR /&gt;
                &lt;BR /&gt;
            RemoveAcadIdleEvent();&lt;BR /&gt;
            \\ You Code here                 &lt;BR /&gt;
        }&lt;BR /&gt;
        catch&lt;BR /&gt;
        {&lt;BR /&gt;
            \\ You error trapping code here&lt;BR /&gt;
        }&lt;BR /&gt;
            &lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
Note: My "Application" gets conflicted with various using statments that also use "Application", so I have to show the whole line. &lt;BR /&gt;
&lt;BR /&gt;
Thanks again for your input.</description>
      <pubDate>Mon, 25 Jan 2010 14:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/2620596#M67428</guid>
      <dc:creator>hanchris</dc:creator>
      <dc:date>2010-01-25T14:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811025#M67429</link>
      <description>&lt;P&gt;I had the seme problem with vba. We also use a network acaddoc.lsp. Do no make the netwok acaddoc.lsp empty, instead make a local one&lt;/P&gt;&lt;P&gt;C:\Program Files\&lt;EM&gt;AutoCAD program folder&lt;/EM&gt;\Support. AutoCAD read hear first and will ignore the network copy. I you have a local acaddoc.lsp just rename it bfore you create the blank one.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 15:15:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811025#M67429</guid>
      <dc:creator>Jedimaster</dc:creator>
      <dc:date>2014-02-12T15:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811423#M67430</link>
      <description>&lt;P&gt;&amp;lt;QUOTE&amp;gt;"...make a local one C:\Program Files\&lt;EM&gt;AutoCAD program folder&lt;/EM&gt;\Support. AutoCAD read hear[here] first..."&amp;lt;/QUOTE&amp;gt; is&amp;nbsp;NOT a correct statement. AutoCAD does not automatically load acaddoc.lsp FIRST from [Acad Install]/Support folder, not to mention that AutoCAD could be installed in location other than "C:\Program files\...". If any other support path that has acaddoc.lsp&amp;nbsp;in the "Options-&amp;gt;File" is ordered before that folder (one can user button "Move Up/Down" to change the order), then your claim is wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One&amp;nbsp;should really look into gile's suggestion, or do the renaming by search all the support paths.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 17:13:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811423#M67430</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2014-02-12T17:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the acaddoc.lsp file</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811523#M67431</link>
      <description>&lt;P&gt;AutoCAD will load the first acaddoc.lsp it sees. I am not using the latest AutoCAD so I do not know if AutoDesk has changed the startup order. It&amp;nbsp;use to be on startup&amp;nbsp;AutoCAD looked it the program folders then the search path (It may have changed). I know this because that is where I test out the acaddoc.lsp before I unleash it on to the network. You can place it the ROAMABLEROOTPREFIX or LOCALROOTPREFIX anywhere AutoCAD is going to find it before it reaches the network path.Granted I know that I am on a .NET forum and have a limited knowledge of .NET and C, here is how I did it in VBA (the concept is the same).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Before the batch routine&lt;/P&gt;&lt;P&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;LocalLsp = AcadApplication.Path &amp;amp; "\Support\acaddoc.lsp"&lt;BR /&gt;Set objFile = objFSO.CreateTextFile(LocalLsp)&lt;BR /&gt;objFile.Close&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'After the batch routine&lt;/P&gt;&lt;P&gt;If objFSO.FileExists(LocalLsp) Then&lt;BR /&gt;objFSO.DeleteFile (LocalLsp)&lt;BR /&gt;End If&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 17:45:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-the-acaddoc-lsp-file/m-p/4811523#M67431</guid>
      <dc:creator>Jedimaster</dc:creator>
      <dc:date>2014-02-12T17:45:59Z</dc:date>
    </item>
  </channel>
</rss>

