Jump to content

Recommended Posts

Posted

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 >

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    13

  • designerstuart

    10

  • kingdaddy

    3

  • halfcracked

    2

Top Posters In This Topic

Posted (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 by SLW210
Posted

OOO good thought on the autoloading lisp!

 

Actually I think just setting (setvar "HPSCALE" 96) will fix things up nicely.

Posted

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.

  • 1 year later...
Posted
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?

Posted

Yes...LT does not use Lisp hence no need for the file. You can delete it.

Posted
Yes...LT does not use Lisp hence no need for the file. You can delete it.

 

So I cant set a default hatch pattern?

Posted

In LT? I do not know the answer to that. I guess, like you, I'd have to do a little more investigating.

Posted

Thanks so much, let me know if you need any schematic symbols or aircraft instrument drawings.:wink:

Posted

You're welcomed so much. Yes I do. I'll take 100 of each; in large. Can you ship them overnight?:lol: Thanks.

  • 2 years later...
Posted (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 by SLW210
Posted (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 by SLW210
Posted
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

Posted

You didn't happen to shut down then restart ADT after making the addition to your lisp doc file did you?

Posted

yes i restarted after changing the lisp file.

Posted

interstingly i can paste the (setvar "HPSCALE" 10) code to the command line and it works, just the HPNAME that does not.

Posted

So if you type HPNAME at the command line and press Enter you get.......? I get this:

 

Command: HPNAME

 

Enter new value for HPNAME :

Posted (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 by SLW210

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...