Question About Tool Palette Paths

Discussion in 'AutoCAD' started by Chris Chiles, Feb 15, 2005.

  1. Chris Chiles

    Chris Chiles Guest

    I have a lisp run at startup to set some file search paths for my users.

    For the tool palette paths I use the following code to do this and it works
    great except that it overwrites the existing "C:\Documents and
    Settings\<USERNAME>\Application Data\Autodesk\AutoCAD
    2005\R16.1\enu\Support\ToolPalette" path replacing it with the new one.

    (vl-load-com)
    (VLA-PUT-ToolPalettePath (vla-get-Files (vla-get-Preferences
    (vlax-get-acad-object))) "S:\\_AutoCad 2005 Settings\\ToolPalette")

    Any ideas about how to get it to ADD the S: path without overwritting the
    default path?

    Thanks,
    Chris
     
    Chris Chiles, Feb 15, 2005
    #1
  2. Chris Chiles

    BillZ Guest

    Chris,
    Work the same as the other search paths. Just separate the strings with a semicolon.

    (VLA-PUT-ToolPalettePath (vla-get-Files (vla-get-Preferences
    (vlax-get-acad-object))) "S:\\_AutoCad 2005 Settings\\ToolPalette;C:\Documents and
    Settings\<USERNAME>\Application Data\Autodesk\AutoCAD
    2005\R16.1\enu\Support\ToolPalette")

    You'll get them both this way.

    Bill
     
    BillZ, Feb 16, 2005
    #2
  3. Chris Chiles

    Chris Chiles Guest

    OK - With that said - How do I code it so that the <USERNAME> is replaced on
    each machine with the actual users login folder?

    Thanks so much BillZ

    Chris
     
    Chris Chiles, Feb 16, 2005
    #3
  4. Chris Chiles

    BillZ Guest

    I would think you could concantate the string returned from:

    Command: (setq oldpath (vla-get-ToolPalettePath (vla-get-Files (vla-get-Preferences (vlax-get-acad-object)))))

    To your file path using (setq path (stcat yourpath ";" oldpath))

    The do the vla-put thingy.



    Bill
     
    BillZ, Feb 16, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.