halfcracked Posted March 5, 2008 Share Posted March 5, 2008 Is there any way to change the default hatch patern from ANSI31? the default hatch is WAY too small for sitework & tends to bog things down if you forget to set the hatch pattern first. I tried HPNAME but that seems to be session dependant & dosen't help if set in the default template. I'm about > Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 5, 2008 Share Posted March 5, 2008 (edited) You could add your hatch pattern to a tool palette and use it that way. Not familiar with HPNAME and HPSCALE but you could add them to your acaddoc.lsp to be set on each loading of a drawing. Insert the name of your Hatch pattern and scale where I have it in RED. (setvar "HPNAME" "ANSI31") (setvar "HPSCALE" 1) Edited October 27, 2011 by SLW210 Quote Link to comment Share on other sites More sharing options...
halfcracked Posted March 5, 2008 Author Share Posted March 5, 2008 OOO good thought on the autoloading lisp! Actually I think just setting (setvar "HPSCALE" 96) will fix things up nicely. Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 5, 2008 Share Posted March 5, 2008 If ANSI31 is not your favorite hatch pattern to work with you can set another pattern as the default as well as change the default scale and spacing. This is done using the system variables HPNAME, HPSCALE and HPSPACE. However, these settings aren't saved anywhere so when you close AutoCAD it reverts back to ANSI31. So, how can you make the change permanent? Use the ACADDOC.LSP file. Edit the file by appending the settings in the form previously mentioned above (setvar "HPNAME" "pattern name here"). Now, all you have to do is make sure that ACADDOC.LSP is in one of the support path directories you choose (set within AutoCAD under Tools / Options / Files). It will be loaded automatically each time a drawing is opened and you'll have your new default hatch pattern ready to go. Quote Link to comment Share on other sites More sharing options...
kingdaddy Posted April 16, 2009 Share Posted April 16, 2009 So, how can you make the change permanent? Use the ACADDOC.LSP file. Edit the file by appending the settings in the form previously mentioned above (setvar "HPNAME" "pattern name here"). Now, all you have to do is make sure that ACADDOC.LSP is in one of the support path directories you choose (set within AutoCAD under Tools / Options / Files). It will be loaded automatically each time a drawing is opened and you'll have your new default hatch pattern ready to go. I dont have a ACADDOC.LSP file in my ACAD LT 2009, but I created one and put the command (setvar "HPNAME" "solid") and put it in the support directory but it didnt work. Any ideas what I did wrong? Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 16, 2009 Share Posted April 16, 2009 Yes...LT does not use Lisp hence no need for the file. You can delete it. Quote Link to comment Share on other sites More sharing options...
kingdaddy Posted April 16, 2009 Share Posted April 16, 2009 Yes...LT does not use Lisp hence no need for the file. You can delete it. So I cant set a default hatch pattern? Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 16, 2009 Share Posted April 16, 2009 In LT? I do not know the answer to that. I guess, like you, I'd have to do a little more investigating. Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 16, 2009 Share Posted April 16, 2009 OK kingdaddy, now you owe me one. See this article by AutoDesk about resetting the default hatch pattern in LT. http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2880857&linkID=9240817 I'll be back later on to collect my payment. Quote Link to comment Share on other sites More sharing options...
kingdaddy Posted April 16, 2009 Share Posted April 16, 2009 Thanks so much, let me know if you need any schematic symbols or aircraft instrument drawings.:wink: Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 16, 2009 Share Posted April 16, 2009 You're welcomed so much. Yes I do. I'll take 100 of each; in large. Can you ship them overnight? Thanks. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 (edited) Insert the name of your Hatch pattern and scale where I have it in RED. (setvar "HPNAME" "ANSI31") (setvar "HPSCALE" 1) i've tried this but to no avail..... have things changed? if i enter command HPNAME, then ANSI31, it changes fine - it just doesn't seem to work from the lispdoc. i have other custom lisps that do work from here. thanks! Edited October 27, 2011 by SLW210 Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 (edited) sorry forgot to say - also if i paste (setvar "HPNAME" "ANSI31") into command line, i get rejected Command: (setvar "HPNAME" "ANSI31") *Cancel* AutoCAD variable setting rejected: "HPNAME" nil 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 You may have the wrong lisp doc file. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 You may have the wrong lisp doc file. huh? if i did, would my other lisps still work? i think it should be a simple case of adding a bit of code to the same file i have my other custom lisps in, shouldn't it? my guess was that the code above no longer worked for some reason - if someone could confirm that it does work i'd know the problem was something else my end. but shouldn't putting the text in as i did in post 13 work, if the code is right? thanks Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 You didn't happen to shut down then restart ADT after making the addition to your lisp doc file did you? Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 yes i restarted after changing the lisp file. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 interstingly i can paste the (setvar "HPSCALE" 10) code to the command line and it works, just the HPNAME that does not. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2011 Share Posted October 27, 2011 So if you type HPNAME at the command line and press Enter you get.......? I get this: Command: HPNAME Enter new value for HPNAME : Quote Link to comment Share on other sites More sharing options...
designerstuart Posted October 27, 2011 Share Posted October 27, 2011 (edited) yes, as i said i can use the command HPNAME - it just doesn't work in a lisp in the form SLW posted earlier. i thought i might have some other place where setvars were being read instead of my lispdoc, but it is at the top of support path and also there is this issue where i don't think the code is working anyway. eg if i put just (setvar "HPNAME" "ANSI31") (setvar "HPSCALE" 10) in a lisp file and drop it in, same error: AutoCAD variable setting rejected: "HPNAME" nil Edited October 27, 2011 by SLW210 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.