Set Default Hatch Layer - System Wide

Set Default Hatch Layer - System Wide

PLANacass
Explorer Explorer
221 Views
4 Replies
Message 1 of 5

Set Default Hatch Layer - System Wide

PLANacass
Explorer
Explorer

I'm using CAD 2026.  Currently, with each new file I work in, whenever i use the command HATCH AutoCAD will create a new layer called "_dsg hatch".  I then have to change the hatch layer and purge the new layer that AutoCAD created.  How can I change the default layer that the command uses, system wide, so it doesn't create new layers that I have to purge?

0 Likes
Accepted solutions (1)
222 Views
4 Replies
Replies (4)
Message 2 of 5

DGCSCAD
Collaborator
Collaborator
Accepted solution

Set the variable HPLAYER to "." (just a period).

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 3 of 5

PLANacass
Explorer
Explorer

Excellent, thank you.  So far this seems to have worked

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant

@DGCSCAD wrote:

Set the variable HPLAYER to "." (just a period).


.... not only in existing drawings, but also in all your drawing template files, so it will be set in all new drawings.

Kent Cooper, AIA
0 Likes
Message 5 of 5

DGCSCAD
Collaborator
Collaborator

You could also make it permanent by adding that^/this line to an ACADDOC.lsp file: (setvar 'HPLAYER ".")

 

First, test to see if you already have an acaddoc.lsp by copy/pasting this to the command line: (findfile "acaddoc.lsp")

If it returns a path and file, then add the (setvar 'HPLAYER ".") line to the existing file.

 

If it returns nil, then:

  • Create a new folder.
  • Create a new text file in that folder called acaddoc.lsp.
  • Copy/paste (setvar 'HPLAYER ".") into the new file, then save and close.
  • Go to OPTIONS in AutoCAD.
  • Add that new folders path to the "Support File Search Path", and "Trusted Locations".

Now, every drawing you open will have your HPLAYER variable set to a period.

 

You'll also have the ability to add other changes to various variables and such. You'll have opened a new world of automation for yourself.

 

AutoCad 2018 (full)
Win 11 Pro
0 Likes