Results 1 to 7 of 7

Thread: Support Paths/Profile Set via LISP

  1. #1
    I could stop if I wanted to chillme1's Avatar
    Join Date
    2006-05
    Location
    TN
    Posts
    255

    Default Support Paths/Profile Set via LISP

    Does someone have a routine that I could use for learning for the following:

    Code example for setting support paths and/or Profile settings to AutoCAD via LISP

    REASON: Re-installation has wiped out my custom Profile (forgot to make a backup of it out of AutoCAD's default location).
    Last edited by Clinton.Hill; 2007-06-04 at 02:33 PM. Reason: Clarification
    Clint Hill
    Sr. Mechanical Designer/ CAD Operatior
    ------------------
    Chemical Process Plant Design / Machine + Tool & Die Design
    3D Intelligent Modeling & AUGI Fan

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473

    Default Re: Support Paths/Profile Set via LISP

    Quote Originally Posted by Clinton.Hill
    Does someone have a routine that I could use for learning for the following:

    Code example for setting support paths and/or Profile settings to AutoCAD via LISP

    REASON: Re-installation has wiped out my custom Profile (forgot to make a backup of it out of AutoCAD's default location).
    Hi Clinton,

    THIS THREAD may help you get started.
    Tim Creary
    S&D
    DILLIGAF

  3. #3
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,543

    Default Re: Support Paths/Profile Set via LISP

    Quote Originally Posted by Clinton.Hill
    Does someone have a routine that I could use for learning for the following: Code example for setting support paths and/or Profile settings to AutoCAD via LISP
    Yes. See: http://rkmcswain.blogspot.com/2007/0...-via-lisp.html

  4. #4
    Member dood's Avatar
    Join Date
    2007-04
    Location
    Colorado
    Posts
    32

    Default Re: Support Paths/Profile Set via LISP

    Is this something that could be solved by exporting a profile (aqs? file) and changing your shortcut to start cad to point to it.

    ...acad.exe /p c:/...aqs

  5. #5
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,543

    Default Re: Support Paths/Profile Set via LISP

    Quote Originally Posted by sra
    Is this something that could be solved by exporting a profile (aqs? file) and changing your shortcut to start cad to point to it.

    ...acad.exe /p c:/...aqs
    No. Because AutoCAD will ignore the ARG file unless the profile does not exist.

  6. #6
    I could stop if I wanted to chillme1's Avatar
    Join Date
    2006-05
    Location
    TN
    Posts
    255

    Default Re: Support Paths/Profile Set via LISP

    Code! That's always appreciated - as well as sage advice.

    Will study this and other info on your blog.
    Clint Hill
    Sr. Mechanical Designer/ CAD Operatior
    ------------------
    Chemical Process Plant Design / Machine + Tool & Die Design
    3D Intelligent Modeling & AUGI Fan

  7. #7
    Past Vice President peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu Hawaii
    Posts
    575

    Default Re: Support Paths/Profile Set via LISP

    This code will add to the search paths. The two functions below are from my toolbox for parsing lists and strings. the (getenv "ACAD") function is the one you are looking for.

    Peter


    Code:
    
    (defun AppendPath (strPath / lstPath)
     (setq lstPath (csvstringtolist (getenv "ACAD") ";"))
     (while (member "" lstPath)
      (setq lstPath (vl-remove "" lstPath))
     )
     (setq lstPath (append lstPath (list strPath))
           lstPath (append lstPath (list ""))
           strPath (listtocsvstring lstPath ";")
     )
     (setenv "ACAD" strPath)
    )
    
    (defun CSVStringToList  (strText strChar / intPosition lstStrings)
     (while (setq intPosition (vl-string-search strChar strText 0))
      (setq lstStrings  (cons (substr strText 1 intPosition) lstStrings)
            strText     (substr strText (+ intPosition 1 (strlen strChar)))
      )
     )
     (if lstStrings
      (reverse (cons strText lstStrings))
      (list strText)
     )
    )
    
    (defun ListToCSVString (lstSublist strChar / strText strText2)
     (setq strText (nth 0 lstSubList))
     (if (= (type strText) 'INT) (setq strText (itoa strText)))
     (if (= (type strText) 'REAL)(setq strText (rtos strText 2)))
     (if (cdr lstSubList)
      (if (= (type (cdr lstSublist)) 'LIST)
       (foreach strText2 (cdr lstSubList)
        (if (= (type strText2) 'INT) (setq strText2 (itoa strText2)))
        (if (= (type strText2) 'REAL)(setq strText2 (rtos strText2 2)))
        (setq strText (strcat strText strChar strText2))
       )
       (progn
        (setq strText2 (cdr lstSubList))
        (if (= (type strText2) 'INT) (setq strText2 (itoa strText2)))
        (if (= (type strText2) 'REAL)(setq strText2 (rtos strText2 2)))
         (setq strText (strcat strText strChar strText2))
       )
      )
     )
    )
    
    

Similar Threads

  1. Add Support Paths via LISP
    By DoubleD in forum AutoLISP
    Replies: 11
    Last Post: 2012-04-06, 02:26 PM
  2. Code Review: Local Support Paths Set via LISP
    By chillme1 in forum AutoLISP
    Replies: 3
    Last Post: 2008-08-08, 02:12 PM
  3. ACAD Support Paths
    By mikelf in forum AutoLISP
    Replies: 8
    Last Post: 2008-05-22, 08:58 PM
  4. Get the current support paths and add new paths
    By framedNlv in forum AutoLISP
    Replies: 16
    Last Post: 2006-09-27, 04:13 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
  •