Author Topic: Save and Load support paths.  (Read 2914 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Save and Load support paths.
« on: December 08, 2004, 07:17:32 AM »
Found this whilst on a net trawl and thought someone might find it usefull.

Code: [Select]
;;; Copyright (C) 1997-2003 JTB World, All Rights Reserved
;;; Website: www.jtbworld.com / http://jtbworld.vze.com
;;; E-mail: info@jtbworld.com / jtbworld@hotmail.com
;;;
;;; Save and loads support paths to a text file
;;;
;;; Change the path as wished

(defun C:saveSupportPaths (/ files paths f)
  (vl-load-com)
  (setq files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
  (setq paths (vla-get-supportpath files))
  (setq f (open "c:\\paths.txt" "w"))
  (write-line paths f)
  (close f)
  (princ)
)

(defun C:loadSupportPaths (/ files paths f)
  (vl-load-com)
  (setq files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
  (setq f (open "c:\\paths.txt" "r"))
  (setq paths (read-line f))
  (close f)
  (vla-put-supportpath files paths)
  (princ)
)
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Save and Load support paths.
« Reply #1 on: December 08, 2004, 09:47:39 AM »
Thanks Hudster.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ELOQUINTET

  • Guest
Save and Load support paths.
« Reply #2 on: December 08, 2004, 12:24:02 PM »
that's pretty sweet thanks hudster

t-bear

  • Guest
Save and Load support paths.
« Reply #3 on: December 08, 2004, 08:18:44 PM »
Looks like I'm gonna have to bust one of our stations down to brain-dead this weekend and start over.  This and some other "goodies" from here will make this onerous task much simpler.  Thanks to all you gurus out there.  Life is much sweeter with your input......

dubb

  • Swamp Rat
  • Posts: 1105
Save and Load support paths.
« Reply #4 on: December 09, 2004, 04:42:33 PM »
i can use this....thanks!

SPDCad

  • Bull Frog
  • Posts: 453
Save and Load support paths.
« Reply #5 on: December 09, 2004, 07:09:14 PM »
Warning to all those of you who may use this little programme.
There is a limit to the number of paths you can put into your support path file.  I can't recall the limit but one day I did try to find out the limit just as an experimentation and I did find that it not that big.  I was thinking of adding all my block directory search paths to the list. Unfortunately I was unable to do so. To many directories :(
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

dubb

  • Swamp Rat
  • Posts: 1105
Save and Load support paths.
« Reply #6 on: December 09, 2004, 07:54:00 PM »
yea....does it matter whether or not the workstations have to have the same operating systems,and autocad release to share this command?