View Full Version : Routine to set search paths, file names, and file locations
Enough to be dangerous... looking for help with this lisp routine that will set these specific search paths, file names, and file locations:
Thanks to rkmcswain for getting me started!
(setq paths
(apply 'strcat
(list
"\\\\Carla\\Autodesk\\Support;"
"\\\\Carla\\Autodesk\\Fonts;"
(getvar "ROAMABLEROOTPREFIX")
"C:\\Program Files\\Autodesk Land Desktop 2007\\support;"
(getvar "LOCALROOTPREFIX")
"C:\\Program Files\\Autodesk Land Desktop 2007\\help;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\express;"
"\\\\Carla\\autodesk\\Support\\Color;"
"\\\\Carla\\Autodesk\\LDD 2007;"
"\\\\Carla\\Autodesk\\LDD 2007\\Land;"
"C:\\Program Files\\Common Files\\Autodesk Shared\\AxUi;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\civil;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\FDO\\bin;"
"C:\\Program Files\\Autodesk Civil 3D 2007\\FDO\\bin;"
"C:\\Program Files\\Raster Design 2007;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\Support\\Lisp\\Startup;"
"\\\\Carla\\autodesk\ARD 2007\Help;"
)
)
)
(vla-put-SupportPath
; Device Driver File Search Path
(vla-put-driverspath "\\Carla\\autodesk\\Drv")
;
; Customization Files
;
; Text Editor, Dictionary, and Font File Names
(setvar "dctcust" "\\carla\\autodesk\\support\\sample.cus")
(setvar "fontalt" "simplex.shx")
(setvar "fontmap" "\\carla\\autodesk\\support\\acad.fmp")
;
; Print Support File Path
(vla-put-PrinterConfigPath "\\Carla\\Autodesk\\Plotters\\PMP Files")
(vla-put-PrinterDescPath "\\Carla\\Autodesk\\Plotters")
(vla-put-PrinterStyleSheetPath "\\Carla\\Autodesk\\Plot Styles")
;
; Color Book Locations
(vla-put-ColorBookPath "\\Carla\\autodesk\\Support\\Color")
;
; Template Settings
(vla-put-TemplateDwgPath "\\Carla\\Autodesk\\Templates")
; Missing Sheet Set Template File (vla-put-???????????????????? "xxx")
(vla-put-QNewTemplateFile "\\Carla\\Autodesk\\Templates")
(vla-put-PageSetupOverridesTemplateFile "\\Carla\\Autodesk\\Templates\\Sheet Sets\\PageOverride.dwt")
;
; Tool Palettes File Locations
(getvar "TOOLPALETTEPATH")
paths
)
Enough to be dangerous... looking for help with this lisp routine that will set these specific search paths, file names, and file locations:
Thanks to rkmcswain for getting me started!
I haven't tested this, but maybe it will lead you down the path a ways on your journey:
(setq pref_files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(setq paths
(apply 'strcat
(list
"\\\\Carla\\Autodesk\\Support;"
"\\\\Carla\\Autodesk\\Fonts;"
(getvar "ROAMABLEROOTPREFIX") ";";<--Note semicolon in red
"C:\\Program Files\\Autodesk Land Desktop 2007\\support;"
(getvar "LOCALROOTPREFIX") ";";<--Note semicolon in red
"C:\\Program Files\\Autodesk Land Desktop 2007\\help;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\express;"
"\\\\Carla\\autodesk\\Support\\Color;"
"\\\\Carla\\Autodesk\\LDD 2007;"
"\\\\Carla\\Autodesk\\LDD 2007\\Land;"
"C:\\Program Files\\Common Files\\Autodesk Shared\\AxUi;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\civil;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\FDO\\bin;"
"C:\\Program Files\\Autodesk Civil 3D 2007\\FDO\\bin;"
"C:\\Program Files\\Raster Design 2007;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\Support\\Lisp\\Startup;"
"\\\\Carla\\autodesk\ARD 2007\Help;"
)))
(vla-put-SupportPath pref_files path)
; Device Driver File Search Path
(vla-put-driverspath pref_files "\\Carla\\autodesk\\Drv")
; Customization Files
;
; Text Editor, Dictionary, and Font File Names
(setvar "dctcust" "\\carla\\autodesk\\support\\sample.cus")
(setvar "fontalt" "simplex.shx")
(setvar "fontmap" "\\carla\\autodesk\\support\\acad.fmp")
; Print Support File Path
(vla-put-PrinterConfigPath pref_files "\\Carla\\Autodesk\\Plotters\\PMP Files")
(vla-put-PrinterDescPath pref_files "\\Carla\\Autodesk\\Plotters")
(vla-put-PrinterStyleSheetPath pref_files "\\Carla\\Autodesk\\Plot Styles")
; Color Book Locations
(vla-put-ColorBookPath pref_files "\\Carla\\autodesk\\Support\\Color")
; Template Settings
(vla-put-TemplateDwgPath pref_files "\\Carla\\Autodesk\\Templates")
; Missing Sheet Set Template File (vla-put-???????????????????? "xxx")
(vla-put-QNewTemplateFile pref_files "\\Carla\\Autodesk\\Templates")
(vla-put-PageSetupOverridesTemplateFile pref_files "\\Carla\\Autodesk\\Templates\\Sheet Sets\\PageOverride.dwt")
; Tool Palettes File Locations
;(getvar "TOOLPALETTEPATH"); I'm not sure where you are going here...but maybe:
(vla-put-toolpalettepath pref_files "\\Carla\\Autodesk\\Tool Palettes")
HTH
I appreciate the help! I just tested the lisp and received the following error:
(LOAD "//carla/autodesk/Support/acad2007test4a.lsp") ; error: ActiveX
Server returned an error: Parameter not optional
I appreciate the help! I just tested the lisp and received the following error:
(LOAD "//carla/autodesk/Support/acad2007test4a.lsp") ; error: ActiveX
Server returned an error: Parameter not optional
Try adding (vl-load-com) to the beginning of the routine.
That didn't work either, same problem:
Command: (LOAD "//Carla/autodesk/Support/acad2007test4a.lsp") ; error: ActiveX
Server returned an error: Parameter not optional
That didn't work either, same problem:
Command: (LOAD "//Carla/autodesk/Support/acad2007test4a.lsp") ; error: ActiveX
Server returned an error: Parameter not optional
Oops, typo: :Oops:
(vla-put-SupportPath pref_files path)
should be:
(vla-put-SupportPath pref_files paths)
There may be more; we'll just have to work through it...
And yes, add (vl-load-com) as the first line as Opie suggested.
Well that took me to the next step, unfortunately it was another error:
Command: (LOAD "//Carla/autodesk/Support/acad2007test4a.lsp") ; error: AutoCAD
variable setting rejected: "fontmap" "carlaautodesksupportacad.fmp"
...yes acad.fmp does exist in the support folder
Well that took me to the next step, unfortunately it was another error:
Command: (LOAD "//Carla/autodesk/Support/acad2007test4a.lsp") ; error: AutoCAD
variable setting rejected: "fontmap" "carlaautodesksupportacad.fmp"
...yes acad.fmp does exist in the support folder
Can you open this file in the VLIDE? You can then set a break point and step through the routine one step at a time to find out what is not working.
kennet.sjoberg
2007-03-06, 06:17 PM
. . ."carlaautodesksupportacad.fmp". . .
...hmmm something strange is going on here.
Are AutoCAD not treating \\ in the same way anymore ?
try single / or add drivename X: C: or . . .
: ) Happy Computing !
kennet
...hmmm something strange is going on here.
Are AutoCAD not treating \\ in the same way anymore ?
try single / or add driver name X: C: or . . .
: ) Happy Computing !
kennet
kennet, that looks more like the forum's spell checker messing with the slashes.
kennet.sjoberg
2007-03-06, 06:39 PM
kennet, that looks more like the forum's spell checker messing with the slashes.OK, sorry for that.
but maybe something else is strange inside acad2007test4a.lsp ?
: ) Happy Computing !
kennet
kennet, that looks more like the forum's spell checker messing with the slashes.
Oh shoot, allowing for the UNC would be
(setvar "fontmap" "\\\\carla\\autodesk\\support\\acad.fmp")
Make sure to check the others.
Let's see if this one will run:
(vl-load-com)
(setq pref_files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(setq paths
(apply 'strcat
(list
"\\\\Carla\\Autodesk\\Support;"
"\\\\Carla\\Autodesk\\Fonts;"
(getvar "ROAMABLEROOTPREFIX") ";"
"C:\\Program Files\\Autodesk Land Desktop 2007\\support;"
(getvar "LOCALROOTPREFIX") ";"
"C:\\Program Files\\Autodesk Land Desktop 2007\\help;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\express;"
"\\\\Carla\\autodesk\\Support\\Color;"
"\\\\Carla\\Autodesk\\LDD 2007;"
"\\\\Carla\\Autodesk\\LDD 2007\\Land;"
"C:\\Program Files\\Common Files\\Autodesk Shared\\AxUi;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\civil;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\FDO\\bin;"
"C:\\Program Files\\Autodesk Civil 3D 2007\\FDO\\bin;"
"C:\\Program Files\\Raster Design 2007;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\Support\\Lisp\\Startup;"
"\\\\Carla\\autodesk\ARD 2007\Help;"
))
)
(vla-put-SupportPath pref_files paths)
; Device Driver File Search Path
(vla-put-driverspath pref_files "\\\\Carla\\autodesk\\Drv")
; Customization Files
; Text Editor, Dictionary, and Font File Names
(setvar "dctcust" "\\\\carla\\autodesk\\support\\sample.cus")
(setvar "fontalt" "simplex.shx")
(setvar "fontmap" "\\\\carla\\autodesk\\support\\acad.fmp")
; Print Support File Path
(vla-put-PrinterConfigPath pref_files "\\\\Carla\\Autodesk\\Plotters\\PMP Files")
(vla-put-PrinterDescPath pref_files "\\\\Carla\\Autodesk\\Plotters")
(vla-put-PrinterStyleSheetPath pref_files "\\\\Carla\\Autodesk\\Plot Styles")
; Color Book Locations
(vla-put-ColorBookPath pref_files "\\\\Carla\\autodesk\\Support\\Color")
; Template Settings
(vla-put-TemplateDwgPath pref_files "\\\\Carla\\Autodesk\\Templates")
; Missing Sheet Set Template File (vla-put-???????????????????? "xxx");;;;;;;;;me too
(vla-put-QNewTemplateFile pref_files "\\\\Carla\\Autodesk\\Templates")
(vla-put-PageSetupOverridesTemplateFile pref_files "\\\\Carla\\Autodesk\\Templates\\Sheet Sets\\PageOverride.dwt")
; Tool Palettes File Locations
;(getvar "TOOLPALETTEPATH"); I'm not sure where you are going here...but maybe:
(vla-put-toolpalettepath pref_files "\\\\Carla\\Autodesk\\Tool Palettes")
I'm not sure if this one will work as it is looking for a file.
(vla-put-QNewTemplateFile pref_files "\\\\Carla\\Autodesk\\Templates")
I'm not sure if this one will work as it is looking for a file.
(vla-put-QNewTemplateFile pref_files "\\\\Carla\\Autodesk\\Templates")
Yeah, your right. I guess we'll have to wait for a file name.
This is it! What a way to end the day, thank you guys!
If anyone knows how to obtain the Missing Sheet Set Template File, that would be the last step!
(vl-load-com)
(setq pref_files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(setq paths
(apply 'strcat
(list
"\\\\Carla\\Autodesk\\Support;"
"\\\\Carla\\Autodesk\\Fonts;"
(getvar "ROAMABLEROOTPREFIX") ";"
"C:\\Program Files\\Autodesk Land Desktop 2007\\support;"
(getvar "LOCALROOTPREFIX") ";"
"C:\\Program Files\\Autodesk Land Desktop 2007\\help;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\express;"
"\\\\Carla\\autodesk\\Support\\Color;"
"\\\\Carla\\Autodesk\\LDD 2007;"
"\\\\Carla\\Autodesk\\LDD 2007\\Land;"
"C:\\Program Files\\Common Files\\Autodesk Shared\\AxUi;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\civil;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\FDO\\bin;"
"C:\\Program Files\\Autodesk Civil 3D 2007\\FDO\\bin;"
"C:\\Program Files\\Raster Design 2007;"
"C:\\Program Files\\Autodesk Land Desktop 2007\\Support\\Lisp\\Startup;"
"\\\\Carla\\autodesk\ARD 2007\Help;"
))
)
(vla-put-SupportPath pref_files paths)
; Device Driver File Search Path
(vla-put-driverspath pref_files "\\\\Carla\\autodesk\\Drv")
; Customization Files
; Text Editor, Dictionary, and Font File Names
(setvar "dctcust" "\\\\carla\\autodesk\\support\\sample.cus")
(setvar "fontalt" "simplex.shx")
(setvar "fontmap" "\\\\carla\\autodesk\\support\\acad.fmp")
; Print Support File Path
(vla-put-PrinterConfigPath pref_files "\\\\Carla\\Autodesk\\Plotters\\PMP Files")
(vla-put-PrinterDescPath pref_files "\\\\Carla\\Autodesk\\Plotters")
(vla-put-PrinterStyleSheetPath pref_files "\\\\Carla\\Autodesk\\Plot Styles")
; Color Book Locations
(vla-put-ColorBookPath pref_files "\\\\Carla\\autodesk\\Support\\Color")
; Template Settings
(vla-put-TemplateDwgPath pref_files "\\\\Carla\\Autodesk\\Templates")
; Missing Sheet Set Template File
(vla-put-QNewTemplateFile pref_files "\\\\Carla\\Autodesk\\Support\\design.dwt")
(vla-put-PageSetupOverridesTemplateFile pref_files "\\\\Carla\\Autodesk\\Templates\\Sheet Sets\\PageOverride.dwt")
; Tool Palettes File Locations
(vla-put-toolpalettepath pref_files "\\\\Carla\\Autodesk\\Tool Palettes")
Hi Kirk,
I'm glad its working so far. Let me do a little research tonight to see if I can find where/how that is stored.
Until then, :beer:
Hi again,
Sorry, but I can't get there from here; this one's over my head. According to THIS (http://discussion.autodesk.com/thread.jspa?messageID=5239548) from the Autodesk Forums, it's not exposed. There is a way to do it changing the registry, but even after that, you still need to restart AutoCAD. Maybe this will change in the future? ~fingers crossed~
Kirk, you might want to keep an eye on THIS THREAD (http://forums.augi.com/showthread.php?t=53264). It may help you out.
jpaulsen
2007-10-17, 03:11 PM
You can set the Sheet Set Template File Location using (setenv).
(setenv "SheetSetTemplatePath" "<your path here> ")
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.