Author Topic: acad2008doc , to be or not to be  (Read 2998 times)

0 Members and 1 Guest are viewing this topic.

DEVITG

  • Bull Frog
  • Posts: 448
acad2008doc , to be or not to be
« on: January 30, 2009, 06:30:55 AM »
I have my acad2008doc suited to my need , but as I often send lisp to others user , it report an error  on theirs ACAD , because some of my LISP at acaddoc , of course  are not at the USER acaddoc.

What would be the best way to open my ACAD with the original ACAD2008DOC, so I can test as it is at the user's ACAD.

I have  both the original and the changed at the support folder.

Thanks in advance
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

SomeCallMeDave

  • Guest
Re: acad2008doc , to be or not to be
« Reply #1 on: January 30, 2009, 07:56:51 AM »
If I recall correctly, AutoCAD will load the first ACAD2008DOC file that it finds then not load any others.

So one way to do what you need is to create a new Folder and add it to your Autocad Support File Search Path (Options ->Files ).   Move this new folder to the top of Support File Search Path list.  Then copy one of the ACAD2008DOC files into this folder.  You can replace the file in that folder to test different set ups.

Also note that AutoCAD loads any 'acad.lsp' file that it finds in the Support File Search Path before it loads ACAD208DOC.lsp so that might impact your testing too.

There may be other files that it loads.   I can't remember all the files or the order that it loads them.  I will search and see what I can find.

Hope this helps

sinc

  • Guest
Re: acad2008doc , to be or not to be
« Reply #2 on: January 30, 2009, 08:20:50 AM »
What are you putting in that file?

dustinthiesse

  • Guest
Re: acad2008doc , to be or not to be
« Reply #3 on: January 30, 2009, 08:35:18 AM »
If I recall correctly, AutoCAD will load the first ACAD2008DOC file that it finds then not load any others.

I thought this was how it worked too...(and it was when I was using Autocad2006).
When I moved to a company that was using 2008, however, I discovered something strange.

A little background...All the users here have local copies of 2008 on each of their machines (we aren't running cad off a network using licenses).  So each user has a "acad2008doc.lsp" located on their C: drive in the support folder.  In addition to this, I have an "acaddoc.lsp" located on a network drive that the users put ABOVE the support folder in the search paths list (and actually on my own computer I often move this path to the bottom of my list and it still works equally well).

With this setup, BOTH the acad2008doc on the C: drive AND the acaddoc on the network drive are loaded each time a drawing is opened.
I have tested this by adding (princ"\nacad2008doc") etc. to the files.  Seems to work great for me.

DEVITG

  • Bull Frog
  • Posts: 448
Re: acad2008doc , to be or not to be
« Reply #4 on: January 30, 2009, 11:41:50 AM »
What are you putting in that file?



I have my customs  lisp on it.

So when I make a LISP to send outside my enviroment,  the lisp I send could need a defun that is just load by the  my  ACAD2008DOC , and i can not test it on my own ACAD.



Location @ Córdoba Argentina Using ACAD 2019  at Window 10

rkmcswain

  • Swamp Rat
  • Posts: 958
Re: acad2008doc , to be or not to be
« Reply #5 on: January 30, 2009, 01:12:48 PM »
First off you should not modify acad20xxdoc.lsp. This file is controlled by AutoCAD and is subject to being overwritten during a repair, reinstall, or application of a service pack/update.

Create and use the user controlled file named "acaddoc.lsp" to accomplish the same thing.

Having said that, AutoCAD will load the first support file of any type that it finds. In other words, if you have two files with the same name (like "acaddoc.lsp"), AutoCAD will load the first one it finds, by searching the support file search path in order, from top to bottom.

deegeecees

  • Guest
Re: acad2008doc , to be or not to be
« Reply #6 on: January 30, 2009, 01:13:41 PM »
I'd suggest putting your acad2008doc.lsp on a network drive that is accessible to all users, but not modifiable by anyone but you, then point all users support path to that directory and make it the first in the list. That would remedy your situation.

fixo

  • Guest
Re: acad2008doc , to be or not to be
« Reply #7 on: January 30, 2009, 01:47:30 PM »
What are you putting in that file?



I have my customs  lisp on it.

So when I make a LISP to send outside my enviroment,  the lisp I send could need a defun that is just load by the  my  ACAD2008DOC , and i can not test it on my own ACAD.
FYI
ObjectARX 2008\docs\arxiop ->Proper Use of Support Files->Follow Guidelines for Modifying Support Files
The same like said rkmcswain :

XML-based files (i.e., .atc, .aws)
 Do not modify directly. Modification of these files, or other XML-based files in AutoCAD, is not recommended because they are based upon an XML schema that can change at any time. Modification and/or customization should be performed through use of the documented APIs related to the feature the files represent.
 
.dst (sheet set files)
 Do not modify directly. Modification and/or customization should be performed through use of the documented APIs.
 
acad.mnl
 Do not modify.
 
acad.cui
 Do not replace. Modify only using the CUI APIs. Add your UI components using partial CUI files whenever possible. This makes it easy to remove your UI elements if your application is uninstalled. Modifications to the user's main CUI file is allowed using the CUI APIs but should only be used to add a partial file to the list of CUI files to be loaded.
 
acad2008.lsp and acad2008doc.lsp
 Do not modify.
 
template (.dwt) files
 Do not overwrite any template file, such as acad.dwt. If necessary, use a drawing template file to establish your application's drawing environment.
 
help files (.chm)
 Do not replace. Implement your own help files instead.
 
acad.lin and acadiso.lin
 Do not modify or replace. Supplying additional LINETYPE files is fine.
 

etc. etc.

~'J'~

deegeecees

  • Guest
Re: acad2008doc , to be or not to be
« Reply #8 on: January 30, 2009, 02:00:52 PM »
I guess I brokeded the rules.

I have been taking a copy of the acadXXXXdoc.lsp and appending custon setup routines to the end of it, and setting it up on a shared network drive so all changes are effective at the next "open" for users for quite a few years now, and have never had any problems whatsoever. By placing a COPY of said lsp file to a directory that won't be touched by an Acad install keeps the modified file intact. I use this along with a saved profile, so when a reinstall is performed, set the profile, and everything is back up to speed with a click.

DEVITG

  • Bull Frog
  • Posts: 448
Re: acad2008doc , to be or not to be
« Reply #9 on: January 30, 2009, 05:22:09 PM »
I will change as stated
Thanks for your help.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

FengK

  • Guest
Re: acad2008doc , to be or not to be
« Reply #10 on: January 31, 2009, 01:34:06 AM »
I have my acad2008doc suited to my need , but as I often send lisp to others user , it report an error  on theirs ACAD , because some of my LISP at acaddoc , of course  are not at the USER acaddoc.

What would be the best way to open my ACAD with the original ACAD2008DOC, so I can test as it is at the user's ACAD.

I have  both the original and the changed at the support folder.

Thanks in advance

Like others said, AutoCAD will load the first found acad####doc.lsp, which should be the one returned from (findfile "acad####doc.lsp") at the command line. You can use two different profiles in which the order of these two folders are switched. If you know a little about lisping, you don't need to create profiles.

FengK

  • Guest
Re: acad2008doc , to be or not to be
« Reply #11 on: January 31, 2009, 01:42:21 AM »
First off you should not modify acad20xxdoc.lsp. This file is controlled by AutoCAD and is subject to being overwritten during a repair, reinstall, or application of a service pack/update.

Create and use the user controlled file named "acaddoc.lsp" to accomplish the same thing.


i could be wrong, but i remember reading it somewhere that users are recommended to modify the acad20##doc.lsp file, but not the acad20##.lsp file.

as far as the file acaddoc.lsp, if you place it in any folder with drawings, it will be loaded when you open those drawings. i use it this way every now and then, if there is some code very specific, only useful to a particular project. this way i don't need to pollute the network environment, yet anyone else working on these drawings will have access to those functions/commands defined in this acaddoc.lsp file. in addition, my experience is that acaddoc.lsp is not always loaded, even if it is in a support folder. at least it was the case when i was using EaglePoint.

rkmcswain

  • Swamp Rat
  • Posts: 958
Re: acad2008doc , to be or not to be
« Reply #12 on: February 01, 2009, 04:21:11 PM »
i could be wrong, but i remember reading it somewhere that users are recommended to modify the acad20##doc.lsp file, but not the acad20##.lsp file.
Yes, that is wrong. Both of these files are supplied with AutoCAD and can be overwritten by any Autodesk activity (repair, reinstall, update/Service pack). There is just no reason to modify these files, when the same functionality is provided by the "acad.lsp" and "acaddoc.lsp" files which are user controlled.

Quote from: xycadd
my experience is that acaddoc.lsp is not always loaded, even if it is in a support folder. at least it was the case when i was using EaglePoint.
AutoCAD always loads the first "acad.lsp" and "acaddoc.lsp" it finds. This is the same for all support files, including "acad.pgp", "acad20xx.lsp", "acad20xxdoc.lsp", "acad.fmp", etc. You control which one it loads by the order that you setup the support file search path. Of course the current drawing directory is always at the top of the list.

rkmcswain

  • Swamp Rat
  • Posts: 958
Re: acad2008doc , to be or not to be
« Reply #13 on: February 01, 2009, 04:23:22 PM »

By placing a COPY of said lsp file to a directory that won't be touched by an Acad install keeps the modified file intact. I use this along with a saved profile, so when a reinstall is performed, set the profile, and everything is back up to speed with a click.

But by using this "copy" of the Autodesk supplied file, you will be missing out on any additions or subtractions made to this file by Autodesk.

Best practice is to leave these files alone and use the files that are user controlled ("acad.lsp" and "acaddoc.lsp"). When you upgrade, or apply a SP, or whatever, you don't have to worry about them getting changed, and any changes made to the Autodesk files will get applied also.