See the top rated post in this thread. Click here

Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: This is driving me MAD

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

    Default Re: This is driving me MAD

    Quote Originally Posted by aaronic_abacus View Post
    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
    Just to be clear there has never been a time when it was OK to modify the acad<release>.lsp file. Acad.lsp, acaddoc.lsp, and acad.rx have been the user created files set up for this purpose by AutoCAD you should have been using in 2000 as well. Now that AutoCAD and most organizations IT policies have blocked you completely it's time to do this the way you should have been doing it all these years. If
    Code:
    (findfile "acaddoc.lsp")
    returns nil create one in the
    Code:
    (getenv "userprofile")
    folder where permissions shouldn't be a problem. Appending your code after the last line will display whatever your code sends last as well as any errors it may generate.
    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. #22
    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

    so there's no automatically loading file I can write to?

    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.

  3. #23
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,454
    Login to Give a bone
    1

    Default Re: This is driving me MAD

    <Comment removed, NSFW... Link an image that conveys same>

    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

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

    Default Re: This is driving me MAD

    Quote Originally Posted by aaronic_abacus View Post
    so there's no automatically loading file I can write to?
    Is there an issue with using the acaddoc.lsp file designed to be created and modified by us just for this purpose?

    Are we missing something?
    Last edited by Tom Beauford; 2019-06-21 at 04:46 PM.
    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. #25
    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

    could someone test this for autocad2011 or down?
    please confirm if it is writing to acaddoc.lsp

    Code:
    (DEFUN C:AUTOLOAD ()
    
    (PRINC)
    (PROMPT "\n*AUTOLOAD WATSON SETUP* ")
    
    (SETQ PGPF NIL)
    
    (SETQ PGPFF NIL)
    
    (SETQ PGPLN "(LOAD \"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 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN /IF PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2001.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "acad2002.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2003.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2004.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2005.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2006.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2007.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2008.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2009.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2010.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    (SETQ PGPFN (FINDFILE "ACAD2011.lsp" ))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPFNL (STRLEN PGPFN))
      (SETQ PGPFN2 (SUBSTR PGPFN 1 (- PGPFNL 12)))
      (SETQ PGPFN2 (STRCAT PGPFN2 "acaddoc.lsp"))
      (SETQ PGPF (OPEN PGPFN2 "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN2)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN2)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    
    
    (IF (= PGPFF NIL) (SETQ PGPFN (GETFILED "FIND AN AUTOMATICALLY LOADING LISP FILE" "" "LSP" 2)))
    (IF (/= PGPFN NIL)
     (PROGN
      (SETQ PGPF (OPEN PGPFN "a"))
      (WRITE-LINE " " PGPF)
      (WRITE-LINE PGPLN PGPF)
      (IF (/= PGPF NIL) 
       (PROGN
        (CLOSE PGPF)
        (PROMPT "\nWat.lsp added to ")
        (PROMPT PGPFN)
        (SETQ PGPFF 1)
       ); END PROGN PGPF   
       (PROGN
        (PROMPT "\n CANNOT WRITE TO ")
        (PROMPT PGPFN)
      ));END PROGN PGPF
    ));END PROGN/IF PGPFN
    
    
    
    (PRINC)
    ); END AUTOLOAD
    Attached Files Attached Files
    Last edited by aaronic_abacus; 2019-07-10 at 12:45 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 3 of 3 FirstFirst 123

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
  •