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
C:\Program Files\AutoCAD program folder\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.
<QUOTE>"...make a local one C:\Program Files\AutoCAD program folder\Support. AutoCAD read hear[here] first..."</QUOTE> is 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 in the "Options->File" is ordered before that folder (one can user button "Move Up/Down" to change the order), then your claim is wrong.
One should really look into gile's suggestion, or do the renaming by search all the support paths.
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 use to be on startup 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).
'Before the batch routine
Set objFSO = CreateObject("Scripting.FileSystemObject")
LocalLsp = AcadApplication.Path & "\Support\acaddoc.lsp"
Set objFile = objFSO.CreateTextFile(LocalLsp)
'After the batch routine
If objFSO.FileExists(LocalLsp) Then
Access a broad range of knowledge to help get the most out of your products and services.