TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Hangman on September 13, 2010, 02:46:00 PM

Title: Updating / Modifying 'Files' in current Profile ...
Post by: Hangman on September 13, 2010, 02:46:00 PM
Good afternoon everyone,

I have spent the morning perusing and searching for information on how to go about editing / modifying the paths of several elements under the 'Options', 'Files' tab.
I have found the information for modifying the 'Support File Search Path', but I am looking for information regarding the 'Customization Files', more in particular the 'Enterprise Customization File'.
Also, I need info on modifying the 'Template Settings', 'Drawing Template File Location', & 'Default Template File Name for QNEW'.
And for 'Tool Palette File Locations'.

I need to update any new installs of CAD with half a dozen paths across the server, and we are using the Enterprise CUI file and an officewide template and tool palette.

Could all these be updated / modified like the 'Support File Search Path' as Kerry & Jeff did here:
http://www.theswamp.org/index.php?topic=4361.msg52600#msg52600 (http://www.theswamp.org/index.php?topic=4361.msg52600#msg52600)
Or is there different steps for the different sections ?

Thanks.
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: kpblc on September 13, 2010, 02:53:34 PM
Try to do this:
Code: [Select]
(vl-load-com)

(vlax-dump-Object (vla-get-files (vla-get-Preferences (vlax-get-acad-object))))
You'll see anything you want (i hope).
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: Lee Mac on September 13, 2010, 03:13:36 PM
Another way is to use the SetEnv function, modifying the registry values directly:

Code: [Select]
Template File Location        -    (getenv "TemplatePath")
QNew Template                 -    (getenv "QnewTemplate")
Tool Palette File Locations   -    (getenv "ToolPalettePath")
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: dgorsman on September 13, 2010, 04:56:56 PM
As a "new station image" or "WTF recovery", you can set the values using a REG file.  I wouldn't advise doing that while AutoCAD is running, but it makes for easy set up with BAT or other external scripting.
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: Hangman on September 15, 2010, 05:06:17 PM
As a "new station image" or "WTF recovery", you can set the values using a REG file.  I wouldn't advise doing that while AutoCAD is running, but it makes for easy set up with BAT or other external scripting.

A very good suggestion, dgorsman.  Unfortunately, I don't have the luxury of a 'new station image' or other such setup.  I do however, have access to an external scripting option I can run before opening CAD.
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: Hangman on September 15, 2010, 05:08:07 PM
Thank you Lee for the pathing info, it's a great help.
And thank you kpblc for the vlax-dump, I had actually forgotten about that.
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: alanjt on September 15, 2010, 09:30:23 PM
One more:
Code: [Select]
(getvar '*_toolpalettepath)
Title: Re: Updating / Modifying 'Files' in current Profile ...
Post by: Lee Mac on September 16, 2010, 07:58:52 AM
One more:
Code: [Select]
(getvar '*_toolpalettepath)

Ooo! Thats a new one to me - thanks Alan.

Love it when I learn something new in LISP  :-)