Jump to content

change default hatch


Recommended Posts

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 by SLW210
Link to comment
Share on other sites

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    13

  • designerstuart

    10

  • kingdaddy

    3

  • halfcracked

    2

Top Posters In This Topic

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 by ReMark
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...