See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: Acaddoc Issues

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    2002-08
    Posts
    27
    Login to Give a bone
    0

    Question Acaddoc Issues

    I am running Autocad 2012 x64 SP1. I have a customized acaddoc.lsp file which loads other routines. I have noticed that when I first open Autocad my preloaded routines work. If I start a new drawing the routines work, but if I open an existing file the routines don't work and I get the unknown command message. This file is suppose to run prior to loading all new or existing files, can anybody help me with why it is not working correctly? Do I have another variable set incorrectly?

  2. #2
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Acaddoc Issues

    It sounds as if there's something in that file which calls a command. Usually when you issue commands in a automatically loaded lisp you should place such command calls inside the S::Startup defun-q, this will then only be called once all other things have completed (i.e. only when the command-line becomes available). Otherwise you could end up with a situation where the command is called before it's fully loaded. You might find that starting a new DWG loads the relevant command before running the acaddoc.lsp, but opening an existing DWG does not. Could you post your acaddoc.lsp file - maybe someone could spot a problem.

    BTW, you might be better served if this thread is moved to the AutoLisp forum.

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Acaddoc Issues

    is it possible that one of the programs that automatically load tries to access a dimstyle or text style that does not exist? if so, in the older drawings, they might not have those styles and that is why it doesnt work, but in you new template it does, so everything is fine in new drawings.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,655
    Login to Give a bone
    0

    Default Re: Acaddoc Issues

    Quote Originally Posted by ccowgill View Post
    is it possible that one of the programs that automatically load tries to access a dimstyle or text style that does not exist? if so, in the older drawings, they might not have those styles and that is why it doesnt work, but in you new template it does, so everything is fine in new drawings.
    Been there, done that! When coding make sure you have layers, linetypes, dimension, and text styles added in the drawing before referencing them in your code.

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Acaddoc Issues

    Quote Originally Posted by timlane View Post
    I am running Autocad 2012 x64 SP1. I have a customized acaddoc.lsp file which loads other routines. I have noticed that when I first open Autocad my preloaded routines work. If I start a new drawing the routines work, but if I open an existing file the routines don't work and I get the unknown command message. This file is suppose to run prior to loading all new or existing files, can anybody help me with why it is not working correctly? Do I have another variable set incorrectly?
    In the "acaddoc.lsp" file, place a line of code at the very bottom like this:

    Code:
    (princ "\n    Acaddoc.lsp loaded.        ")
    If you do not see that printed at the command line when you open _any_ drawing, then the "acaddoc.lsp" file is crashing, not loading fully, whatever you want to call it, before it finishes loading, hence why the commands do not work.
    R.K. McSwain | CAD Panacea |

  6. #6
    Member
    Join Date
    2002-08
    Posts
    27
    Login to Give a bone
    1

    Default Re: Acaddoc Issues

    I finally figured it out. I was setting the value for the navvcubedisplay to 1 and it didn't like it. I have removed that line and it appears to be working correctly. Thanks for all of your assistance.

Similar Threads

  1. where did acaddoc.lsp go?
    By cwjean76 in forum AutoLISP
    Replies: 7
    Last Post: 2010-09-22, 08:28 PM
  2. acaddoc.lsp how do you do it?
    By feargt in forum AutoLISP
    Replies: 41
    Last Post: 2009-01-09, 12:22 PM
  3. ACADDOC.LSP
    By dbrownson in forum AutoLISP
    Replies: 20
    Last Post: 2008-02-06, 04:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •