Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Routine to set search paths, file names, and file locations

  1. #1
    Member
    Join Date
    2005-06
    Location
    45°03'55.69"N 93°27'12.21"W
    Posts
    28
    Login to Give a bone
    0

    Default 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!

    Code:
    (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
    )
    Last edited by Opie; 2007-03-06 at 02:43 AM. Reason: [code] tags added

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kirkm.89518
    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:

    Code:
    (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
    Last edited by .T.; 2007-03-06 at 06:19 AM.

  3. #3
    Member
    Join Date
    2005-06
    Location
    45°03'55.69"N 93°27'12.21"W
    Posts
    28
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    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

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,908
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kirkm.89518
    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.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Member
    Join Date
    2005-06
    Location
    45°03'55.69"N 93°27'12.21"W
    Posts
    28
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    That didn't work either, same problem:

    Command: (LOAD "//Carla/autodesk/Support/acad2007test4a.lsp") ; error: ActiveX
    Server returned an error: Parameter not optional

  6. #6
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kirkm.89518
    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:

    Code:
    (vla-put-SupportPath pref_files path)
    should be:

    Code:
    (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.

  7. #7
    Member
    Join Date
    2005-06
    Location
    45°03'55.69"N 93°27'12.21"W
    Posts
    28
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    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

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,908
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kirkm.89518
    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.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #9
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kirkm.89518
    . . ."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
    Last edited by kennet.sjoberg; 2007-03-06 at 06:22 PM.

  10. #10
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,908
    Login to Give a bone
    0

    Default Re: Routine to set search paths, file names, and file locations

    Quote Originally Posted by kennet.sjoberg
    ...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.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 1 of 2 12 LastLast

Similar Threads

  1. Trouble with Support File Search Paths
    By JGARZA0422 in forum AutoLISP
    Replies: 1
    Last Post: 2013-07-21, 03:45 PM
  2. 2012: Disappearing Support File Search Paths
    By Darren Allen in forum AutoCAD Customization
    Replies: 30
    Last Post: 2013-04-03, 04:11 PM
  3. Options and file search paths
    By KGC in forum AutoCAD Customization
    Replies: 6
    Last Post: 2008-01-08, 04:18 PM
  4. Easy way to set-up Support File Search Paths
    By joeswantek in forum AutoCAD Customization
    Replies: 3
    Last Post: 2006-07-11, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •