designerstuart Posted October 27, 2011 Share Posted October 27, 2011 (edited) acad2010doc.lsp - which is in the folder at the top of support path i have loads of other gumph in there so i know it's the right file. all i've added is SLW's: (setvar "HPNAME" "ANSI31") (setvar "HPSCALE" 10) after rebooting autocad the default HPNAME is still ANGLE and HPSCALE is still 1 - the defaults i am trying to reset. i assume i am missing some clever (or obvious) piece of information..... was wondering if as autocad opens up its template after i reboot could this reset it back to default? i can't alter the template if it helps! thanks remark, much appreciated. Edited October 27, 2011 by SLW210 Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 (edited) I was always under the impression that AutoDesk recommended NOT adding to the acad2010doc.lsp file and instead suggested using/creating acaddoc.lsp as the file of choice for loading custom lisp routines and altering system variables. Probably won't make a difference but I thought you should be aware. I think it is actually called out in the file itself. Edited October 27, 2011 by ReMark Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 oh really? i'll check..... that's how i used to do it but some clever so-and-so at cadtutor persuaded me of the merits of doing it this way! i thought the doc file was provided exactly so that users could customise without screwing up the original lsp file. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 I think I have discovered what the problem is after trying it on my computer and getting the same results as you. I believe you need to put quotation marks on either side of the hatch pattern that you want to make the default. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 oh really? i'll check..... that's how i used to do it but some clever so-and-so at cadtutor persuaded me of the merits of doing it this way! i thought the doc file was provided exactly so that users could customise without screwing up the original lsp file. Many people have made the same mistake as you. I follow Lee Mac's advice. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 here is what i found in the acad2010.lsp: ;;; Note: ;;; This file is normally loaded only once per AutoCAD session. ;;; If you wish to have LISP code loaded into every document, ;;; you should add your code to acaddoc.lsp. but that's not really what you were talking about, is it? couldn't see any other direction about where to put what. but either way, that won't affect the performance of a bit of code like this, will it? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 OUCH! I have to go back and correct what I wrote then. I meant to say ACADDOC.LSP! YIKES! OK...anyway, did you read my advice about the quotation marks? BTW...you do NOT need to add them around the scale. Try it. Now. I really don't care which file you use at this point. We are just testing the code. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 I think I have discovered what the problem is after trying it on my computer and getting the same results as you. I believe you need to put quotation marks on either side of the hatch pattern that you want to make the default. BOOM! is it socially acceptable for a man to kiss a robot? thanks remark, very good work. and a (fairly) rookie mistake, too. may i ask how you noticed this? just plain old experience? maybe we can convince SLW to change his post so nobody has to read the last 2 pages! thanks again Quote Link to comment Share on other sites More sharing options...
SLW210 Posted October 27, 2011 Share Posted October 27, 2011 here is what i found in the acad2010.lsp: ;;; Note: ;;; This file is normally loaded only once per AutoCAD session. ;;; If you wish to have LISP code loaded into every document, ;;; you should add your code to acaddoc.lsp. but that's not really what you were talking about, is it? couldn't see any other direction about where to put what. but either way, that won't affect the performance of a bit of code like this, will it? It states to place LISP code in ACADDOC.LSP. Do not ACADDOC2010.LSP I haven't customized on 2011 yet, I will look into it I really need to change my default hatch. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 I think we need to point out that the line to be added to acaddoc.lsp should read as follows: (setvar "hpname" "your preferred hatch pattern name here in quotes") Leaving the quotes out will result in no change to the default hatch pattern AutoCAD uses. And just to be on the safe side (think future upgrade) put your acaddoc.lsp file in a new, separate folder called CADSTUFF (or anything you like to call it) and set the path to this folder under Options > Files in AutoCAD. I'd move that folder right to the top of the list too so it stands out. Keep the new folder out of the AutoCAD program folder. Put it in C:\program files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.