Jump to content

Acad.lsp - Hatch Scale / Pattern..


Recommended Posts

Posted

Hi,

 

I want AutoCAD to start off with a set Hatch Pattern and Scale, as the default is ANGLE and scale of 1, which when you hatch something big, it takes an age to raytrace etc..

 

I've added these lines to my acad2007doc.lsp:

 

(setq HatchStyle (setvar "HPNAME" "ANSI31"))
(setq HatchScale (setvar "HPSCALE" "10"))

...but when i start AutoCAD it hasn't taken effect..

 

Have i coded it wrong or it is something else?

Posted

First off, it is recommended that you do not edit the "acad200xdoc.lsp" file. This file is "owned" by AutoCAD, and service packs, updates, reinstallation, etc. may overwrite this file and you will lose your changes. AutoCAD provides a mechanism for a "user" owned file that you have control of, it's called "Acaddoc.lsp". If it does not exist, create it.

 

Secondly, your code is attempting to set HPSCALE to a string, when it expects a REAL. The first line works OK.

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