hardwired 发表于 2022-7-6 12:17:20

Acad.lsp - Hatch Scale / Patte

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?

rkmcswain 发表于 2022-7-6 13:22:01

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.
页: [1]
查看完整版本: Acad.lsp - Hatch Scale / Patte