Results 1 to 3 of 3

Thread: Map Drive Letter with LISP?

  1. #1
    100 Club vsheehan's Avatar
    Join Date
    2005-05
    Location
    Richmond, Va
    Posts
    162
    Login to Give a bone
    0

    Default Map Drive Letter with LISP?

    I would like to create a button that maps a drive letter to a server. I'm currently using a .bat with the NET USE command to map the drive. Is there also a way to execute a .bat from the command line?

    Thanks,
    Vince

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Map Drive Letter with LISP?

    I've done that before with a batch file as well. Putting the file in the support path makes it easier to find and you don't have to worry about file paths. To load and run leave off the BAT extension. The CUIX macro might look like:
    Code:
     ^C^C^P(or C:ClrTbls (load "ClrTbls"));ClrTbls
    Our G: drive is mapped to \\Pubworks\Sys2\USERS\ENGDESGN. To open the folder I use the following macro in my CUIX:
    Code:
     ^C^C^P(startapp "explorer" (strcat (chr 47) "n," (chr 47) "e, " (chr 47) "root, " (chr 92) (chr 92) "Pubworks" (chr 92) "Sys2" (chr 92) "USERS" (chr 92) "ENGDESGN"))(princ)
    Don't know if that helps, but it avoids the risk that someone who uses it may already be using that drive letter.
    Last edited by Tom Beauford; 2013-10-01 at 01:41 PM. Reason: User error most likely, but only half of last sentance posted

  3. #3
    100 Club vsheehan's Avatar
    Join Date
    2005-05
    Location
    Richmond, Va
    Posts
    162
    Login to Give a bone
    0

    Default Re: Map Drive Letter with LISP?

    Cool. Thanks for the code. I ended up using Shell and path to the batch file.

    Thanks,
    Vince

Similar Threads

  1. extract drive letter from dwgprefix
    By dilek in forum AutoCAD Customization
    Replies: 3
    Last Post: 2013-04-22, 12:46 PM
  2. Font mapping to a drive letter in MTXT
    By jmctamney in forum AutoCAD General
    Replies: 7
    Last Post: 2010-09-30, 07:13 PM
  3. Remove drive letter from dwgprefix using Diesel
    By jrichardson in forum AutoCAD Customization
    Replies: 3
    Last Post: 2006-02-23, 08:12 PM
  4. UNC pathing verus Drive Letter Mapping
    By kenmarcus in forum Revit Architecture - General
    Replies: 6
    Last Post: 2006-02-07, 07:37 PM
  5. Globally changing the drive letter of all xref paths
    By gregb.68838 in forum AutoLISP
    Replies: 7
    Last Post: 2005-06-20, 08:51 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
  •