乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 54|回复: 1

[编程交流] Acad.lsp - Hatch Scale / Patte

[复制链接]

46

主题

118

帖子

23

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
291
发表于 2022-7-6 12:17:20 | 显示全部楼层 |阅读模式
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:
 
  1. (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?
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
362
发表于 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.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-5 06:23 , Processed in 0.616863 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表