TheSwamp

CAD Forums => CAD General => Topic started by: Bryco on November 20, 2012, 12:25:28 PM

Title: Support File Search Paths being deleted.
Post by: Bryco on November 20, 2012, 12:25:28 PM

We have paths pointing to servers on 2 different drives,
When the server goes down some seats lose all the paths pointing to the now non available server drives.
Sometimes the Cuis are taken as well.  Even more annoying
Any one else have this?
Acad 2013 mechanical.
Title: Re: Support File Search Paths being deleted.
Post by: Rob... on November 20, 2012, 12:32:21 PM
That happens here all the time. The profile is getting fried when the server goes down. Fix it by importing the saved profile. Prevent it by shutting down AutoCAD before server goes down.
Title: Re: Support File Search Paths being deleted.
Post by: Bryco on November 20, 2012, 12:46:02 PM
Thanks Rob,  have you reported this to cad?
Title: Re: Support File Search Paths being deleted.
Post by: Rob... on November 20, 2012, 12:50:32 PM
LOL, nope.
Title: Re: Support File Search Paths being deleted.
Post by: BlackBox on November 20, 2012, 03:45:03 PM
While this will do nothing to restore server paths that are not accessible, I manage the SFSP (and other parts of the Profile) via Acad.lsp:

Code - Auto/Visual Lisp: [Select]
  1. ;;;--------------------------------------------------------------------;
  2. (defun c:AcadLsp (/ *error*)
  3.  
  4.   (defun *error* (msg)
  5.     (and oldCmdecho (setvar 'cmdecho oldCmdecho))
  6.     (cond ((not msg))                                                   ; Normal exit
  7.           ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
  8.           ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
  9.     )
  10.     (princ)
  11.   )
  12.  
  13.   ((lambda
  14.      (user oldCmdecho arxList arxFiles netFiles / oFiles acadLoc)
  15.       (setvar 'cmdecho 0)
  16.       (terpri)
  17.  
  18.       ;; Load arx utilities
  19.       (acad-push-dbmod)
  20.       (foreach x arxFiles
  21.         (if (and (findfile x)
  22.                  (not (vl-position (vl-filename-base x) arxList))
  23.             )
  24.           (vl-catch-all-apply 'arxload (list x))
  25.         )
  26.       )
  27.       (acad-pop-dbmod)
  28.  
  29.       ;; Load net utilities
  30.       (foreach dll netFiles
  31.         (if (findfile dll)
  32.           (progn
  33.             (terpri)
  34.             (command "netload" dll)
  35.           )
  36.         )
  37.       )
  38.  
  39.       ;; Profile information
  40.       (setq oFiles (vla-get-files
  41.                      (vla-get-preferences (vlax-get-acad-object))
  42.                    )
  43.       )
  44.  
  45.       (setq acadloc
  46.              (vl-registry-read
  47.                (strcat "HKEY_LOCAL_MACHINE\\"
  48.                        (if vlax-user-product-key                        ; If 2013
  49.                          (vlax-user-product-key)                        ; Use 2013 function
  50.                          (vlax-product-key)                             ; Use legacy function
  51.                        )
  52.                )
  53.                "ACADLOCATION"
  54.              )
  55.       )
  56.  
  57.         oFiles
  58.           ";"
  59.           (apply
  60.             'strcat
  61.             (mapcar
  62.               '(lambda (x) (strcat x ";"))
  63.               (list
  64.                 ;; <- Your custom paths
  65.  
  66.                 (strcat (getvar 'roamablerootprefix) "support;")
  67.                 (strcat acadloc "\\civil")
  68.                 (strcat acadloc "\\express")
  69.                 (strcat acadloc "\\fdo\\bin")
  70.                 (strcat acadloc "\\fonts")
  71.                 (strcat acadloc "\\help")
  72.                 (strcat acadloc "\\support")
  73.                 (strcat acadloc "\\support\\color")
  74.                 "C:\\programdata\\autodesk\\<SomeApp>\\enu\\data\\symbols\\mvblocks"
  75.                 "C:\\program files\\autodesk\\raster design 20XX oe"
  76.                 "C:\\program files\\common files\\autodesk shared"
  77.                 "C:\\program files\\adsk_raster_design_20XX"
  78.                 "C:\\program files\\adsk_raster_design_20XX\\help"
  79.                 (strcat
  80.                  "C:\\users\\"
  81.                  user
  82.                  "\\appdata\\roaming\\autodesk\\ard20XX\\r1X.X\\enu\\support"
  83.                 )
  84.                )
  85.             )
  86.           )
  87.         )
  88.       )
  89.  
  90.       (*error* nil)
  91.    )
  92.     (getvar 'loginname)                                                 ; User
  93.     (getvar 'cmdecho)
  94.     (arx)                                                               ; arxList
  95.     '(                                                                  ; arxFiles
  96.       "SomeFolder\\SomeArxName.arx"
  97.       ;; <- others
  98.      )
  99.     '(                                                                  ; netFiles
  100.       "SomeFolder\\SomeAssemblyName.dll"
  101.       ;; <- others
  102.      )
  103.   )
  104. )
  105. ;;;--------------------------------------------------------------------;
  106. (c:AcadLsp)
  107. (prompt "\n... Acad.lsp loaded. ")
  108.  
Title: Re: Support File Search Paths being deleted.
Post by: Bryco on November 20, 2012, 07:01:45 PM
Thanks Renderman.
I wrote a bit of net to readd the paths and cunningly put it in a menu, that also disappeared.
Perhaps I need to set a different profile, then  check the drives for availability then set the correct profile.
For me it is a bug that cad should have fixed big time.  Anyway it is a case at autocad now.
Title: Re: Support File Search Paths being deleted.
Post by: rkmcswain on November 21, 2012, 08:32:22 AM
...... I manage the SFSP (and other parts of the Profile) via Acad.lsp:

LIKE ^^^^^^^^  :)
Title: Re: Support File Search Paths being deleted.
Post by: BlackBox on November 21, 2012, 08:35:37 AM
Thanks Renderman.

You're welcome; hope it helps.



...... I manage the SFSP (and other parts of the Profile) via Acad.lsp:

LIKE ^^^^^^^^  :)

While I've tried to make some thoughtful enhancements, what spawned my usage of this methodology was a very wise man who was kind enough to make this post (http://cadpanacea.com/node/52) over at CAD Panacea. (http://www.cadtutor.net/forum/images/smilies/beer.gif)