See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: Acaddoc Issues

  1. #1
    Member
    Join Date
    2002-08
    Posts
    27
    0 Did you find this post helpful? Yes

    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 irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,493
    0 Did you find this post helpful? Yes

    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.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Hartford, Michigan
    Posts
    3,095
    0 Did you find this post helpful? Yes

    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.
    Christopher T. Cowgill, P.E.
    WIGHTMAN & ASSOCIATES, INC.
    ENGINEERING <> SURVEYING <> ARCHITECTURE
    AutoDesk Infrastructure Design Suite Premium 2014 x64
    Windows 7 Pro x64

  4. #4
    AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    1,558
    0 Did you find this post helpful? Yes

    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.
    Tom Beauford P.S.M. - Civil 2013 on Windows 7 Pro
    Design Analysis - Leon County Public Works/Engineering
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516

  5. #5
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,998
    0 Did you find this post helpful? Yes

    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.

  6. #6
    Member
    Join Date
    2002-08
    Posts
    27
    1 Did you find this post helpful? Yes

    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, 11:22 AM
  3. AcadDoc.lsp
    By Shizzjr in forum AutoCAD General
    Replies: 4
    Last Post: 2008-03-28, 11:19 PM
  4. acaddoc.lsp?
    By Spanky in forum AutoLISP
    Replies: 24
    Last Post: 2008-01-27, 12:30 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
  •