RemoveSupportPath

Discussion in 'AutoCAD' started by BobBuilder, Jan 26, 2004.

  1. BobBuilder

    BobBuilder Guest

    Hi,

    i have dowloaded the removeSupportPath.lsp and StrParse.lsp from acadx.com but i am having a few problems.

    in my acad.lsp i have added:-

    (load "strparse.lsp")
    (load "removeSupportPath.lsp")
    (removeSupportPath "\\\\Server\\cad\\support")

    but all i get is:-

    ; error: malformed list on input

    Any ideas?
     
    BobBuilder, Jan 26, 2004
    #1
  2. Sounds like a bad cut/paste. Make sure you didn't
    leave out any ( ).
     
    Jason Piercey, Jan 26, 2004
    #2
  3. BobBuilder

    BillZ Guest

    Bob,

    Wrong way: (load "removeSupportPath.lsp")

    Right way: (load "removeSupportPath")

    :)

    Bill
     
    BillZ, Jan 26, 2004
    #3
  4. BobBuilder

    BillZ Guest

    Sorry:
    I was wrong on that. :(

    Bill
     
    BillZ, Jan 26, 2004
    #4
  5. BobBuilder

    BobBuilder Guest

    Hi,

    i have re-created the file and still have the same problem.

    This is the file attached
     
    BobBuilder, Jan 26, 2004
    #5
  6. BobBuilder

    BobBuilder Guest

    im now getting an error saying ; error: too few arguments

    Any ideas?
     
    BobBuilder, Jan 26, 2004
    #6
  7. BobBuilder

    rdi Guest

    This is from the StrParse description:
    (StrParse Str Delimiter)

    This is from the removeSupportPath's definition:
    (StrParse (getenv "ACAD"))

    It's missing the delimiter. Try changing it to (StrParse(getenv "ACAD")
    "/")
     
    rdi, Jan 26, 2004
    #7
  8. BobBuilder

    rdi Guest

    Or (StrParse(getenv "ACAD") "\\")
     
    rdi, Jan 26, 2004
    #8
  9. BobBuilder

    rdi Guest

    DUH!

    That should have read (StrParse(getenv "ACAD") ";")
     
    rdi, Jan 26, 2004
    #9
  10. BobBuilder

    rdi Guest

    Well--I guess that was a real DUH! moment.
     
    rdi, Jan 26, 2004
    #10
  11. The website has been updated. Sorry for the confusion.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | DUH!
    |
    | That should have read (StrParse(getenv "ACAD") ";")
    |
    | --
    |
    | RDI
    |
    | (remove the exclamation from the email address)
    |
    | > This is from the StrParse description:
    | > (StrParse Str Delimiter)
    | >
    | > This is from the removeSupportPath's definition:
    | > (StrParse (getenv "ACAD"))
    | >
    | > It's missing the delimiter. Try changing it to (StrParse(getenv "ACAD")
    | > "/")
    | >
    | >
    | >
    | > --
    | >
    | > RDI
    | >
    | > (remove the exclamation from the email address)
    | >
    | > | > > im now getting an error saying ; error: too few arguments
    | > >
    | > > Any ideas?
    | >
    | >
    |
    |
     
    R. Robert Bell, Jan 26, 2004
    #11
  12. BobBuilder

    ECCAD Guest

    In function removeSupportPath, add a ' before the (StrParse (getenv "ACAD")) - Like so:

    (defun removeSupportPath (dir / tmp)
    (setq tmp "")
    (mapcar '(lambda (x)
    (if (/= (strcase x) (strcase dir))
    (setq tmp (strcat tmp x ";"))
    )
    )
    '(StrParse (getenv "ACAD"))
    )
    (setenv "ACAD" (substr tmp 1 (1- (strlen tmp))))
    (princ)
    )

    That should clear up the problem.
    Bob
     
    ECCAD, Jan 26, 2004
    #12
  13. BobBuilder

    ECCAD Guest

    Sorry, like this:

    '(StrParse(getenv "ACAD") ";")

    DUH!

    Bob
     
    ECCAD, Jan 26, 2004
    #13
  14. BobBuilder

    BobBuilder Guest

    Working Now, Thank you all.

    What a website full of useful stuff "www.acadx.com"

    Cheers

    Chris
     
    BobBuilder, Jan 26, 2004
    #14
  15. The missing delimiter argument.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | So, what was the problem ?
    | Bob
     
    R. Robert Bell, Jan 26, 2004
    #15
  16. BobBuilder

    ECCAD Guest

    Ah,
    Good.
    Bob
     
    ECCAD, Jan 26, 2004
    #16
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.
Similar Threads
There are no similar threads yet.
Loading...