明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1672|回复: 1

[LISP]

[复制链接]
发表于 2004-8-19 10:00:00 | 显示全部楼层 |阅读模式
怎样用LISP来限制某些CAD功能?例如:设置好字体、标注式样、图层和线型后不容许再设置其他的字体、标注式样、图层和线型。
发表于 2004-8-19 10:39:00 | 显示全部楼层
Attach DWS file to your drawing. Here is a sample from Internet:
  1.   ;;;Michael Puckett
  2. (defun cdrs (key lst / pair rtn)
  3. (while (setq pair (assoc key lst))
  4. (setq rtn (cons (cdr pair) rtn)
  5. lst (cdr (member pair lst))))
  6. (reverse rtn));;;R. Robert Bell
  7. (defun AddDWS (FileN / DictN eDict XRInt)
  8. (setq DictN "AcStStandard"
  9. eDict (cond ((cdr (assoc -1 (dictsearch (namedobjdict) DictN))))
  10. ((dictadd (namedobjdict)
  11. DictN
  12. (entmakex '((0 . "DICTIONARY") (100 .
  13. "AcDbDictionary")))))))
  14. (if (setq XRInt (cdrs 3 (entget eDict)))
  15. (setq XRInt (1+ (apply 'max (mapcar 'atoi XRInt))))
  16. (setq XRInt 0))
  17. (dictadd eDict
  18. (itoa XRInt)
  19. (entmakex
  20. (list '(0 . "XRECORD") '(100 . "AcDbXrecord") (cons 1 FileN)))));;Usage: (AddDWS "c:\\program files\\AutoCAD 2004\\Sample\\MKMStd.dws")
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-9-30 18:21 , Processed in 0.180327 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表