See the top rated post in this thread. Click here

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: This is driving me MAD

  1. #11
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,142
    Login to Give a bone
    1

    Default Re: This is driving me MAD

    Quote Originally Posted by aaronic_abacus View Post
    look again now it's the acaddoc.lsp file now
    You put code in the acaddoc.lsp file to modify the acad<release>.lsp file.
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  2. #12
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,620
    Login to Give a bone
    1

    Default Re: This is driving me MAD

    Quote Originally Posted by Tom Beauford View Post
    You put code in the acaddoc.lsp file to modify the acad<release>.lsp file.
    Why @aaronic_abacus ??
    R.K. McSwain | CAD Panacea |

  3. #13
    100 Club matt.worland's Avatar
    Join Date
    2015-12
    Location
    Denver, CO USA
    Posts
    173
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    Now that you are trying to modify the acaddoc.lsp file, are you sure that it exists?
    After you get the path for acaddoc.lsp, you should check to see if the file exists and if not create it.
    matt worland

  4. #14
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,142
    Login to Give a bone
    1

    Default Re: This is driving me MAD

    All you should need to add to acaddoc.lsp is
    Code:
    (load "Wat.lsp")
    .
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  5. #15
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    398
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    Matt,

    When OPEN is called with "a"(append) the file is created if it doesn't exist.

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.

  6. #16
    100 Club matt.worland's Avatar
    Join Date
    2015-12
    Location
    Denver, CO USA
    Posts
    173
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    It should yes, but Program Files\ is locked down on many computers. Testing on my system, it would not create the file using Open "a", that's why its recommended to test if it exists.
    After I manually created the file and it found it with the lisp, I was able to append your text. You may need to look for another directory to create the file, then copy it to Program Files\ or just use a different location altogether.
    matt worland

  7. #17
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,620
    Login to Give a bone
    2

    Default Re: This is driving me MAD

    Quote Originally Posted by matt.worland View Post
    It should yes, but Program Files\ is locked down on many computers.
    Why is anyone writing files to \Program Files\ ?
    R.K. McSwain | CAD Panacea |

  8. #18
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    398
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    no luck

    Code:
    (PRINC)
    (PROMPT "\n*AUTOLOAD WATSON SETUP* ")
    (SETQ PGPF NIL)
    (SETQ PGPLN "(LOAD \"Wat.lsp\")" )
    (SETQ PGPFN (FINDFILE "ACAD2020.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "ACADDOC.LSP"))
      (SETQ PGPFN2T (FINDFILE PGPFN2))
      (IF (= PGPFN2T NIL)
       (PROGN
        (SETQ PGPFN3 (OPEN PGPFN2 "w"))
        (CLOSE PGPFN3)
      ));END PRGN IF PGPFN2T
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (PROMPT "\nWat.lsp added to ")
      (PRINC PGPFN2)
      (CLOSE PGPF)
    ));END PROGN/IF PGPFN
    Last edited by aaronic_abacus; 2019-06-18 at 07:26 PM.

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.

  9. #19
    I could stop if I wanted to
    Join Date
    2003-07
    Posts
    330
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    Your load wat will not work

    try a strcat to create the parts with "

    (setq pgpln (strcat "load " (chr 34) "wat.lsp" (chr 34) ))

  10. #20
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    398
    Login to Give a bone
    0

    Default Re: This is driving me MAD

    works fine in 2000, not a coding error

    vl huh?
    still no luck.
    if I can't write to the files how will programs load automatically, i'm just trying to AUTOLOAD a string


    Code:
    (SETQ PGPLN "(vl-load-com) (vl-load-all \"wat.lsp\")" )
    
    
    (SETQ PGPFN (FINDFILE "ACAD2000.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acad.lsp"))
      (SETQ PGPFN2T (FINDFILE PGPFN2))
      (IF (= PGPFN2T NIL)
       (PROGN
        (SETQ PGPFN3 (OPEN PGPFN2 "w"))
        (CLOSE PGPFN3)
      ));END PROGN IF PGPFN2T
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (PROMPT "\nWat.lsp added to ")
      (PRINC PGPFN2)
      (CLOSE PGPF)
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2020.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acad.lsp"))
      (SETQ PGPFN2T (FINDFILE PGPFN2))
      (IF (= PGPFN2T NIL)
       (PROGN
        (SETQ PGPFN3 (OPEN PGPFN2 "w"))
        (CLOSE PGPFN3)
      ));END PRGN IF PGPFN2T
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (PROMPT "\nWat.lsp added to ")
      (PRINC PGPFN2)
      (CLOSE PGPF)
    ));END PROGN/IF PGPFN
    
    ;(IF (= PGPFN NIL) (SETQ PGPFN (GETFILED "LOCATE ACAD2000.LSP ACAD2020.LSP FILE" "" "LSP" 2)))
    Last edited by aaronic_abacus; 2019-06-20 at 09:01 AM.

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Insulation Detail Component Causes Snaps To Go Mad!
    By gdaniels in forum ACA General
    Replies: 3
    Last Post: 2005-11-15, 01:01 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
  •