乐筑天下

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

[编程交流] 尺寸te的自动图文集编辑

[复制链接]

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:58:22 | 显示全部楼层
As a VERY quick modification:
 

[code](defun c:TxtUpdate ( / *error* _read                      dcfilename strfilename strlst ss dctag ptr dcflag str ) ;; © Lee Mac 2010  (setq dcfilename  "txtUpdate.dcl"   ;; DCL Filename       Strfilename "txtUpdate.txt"   ;; Data Filename  ) (defun *error* ( msg )   (and dcTag (unload_dialog dcTag))   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")       (princ (strcat "\n** Error: " msg " **")))   (princ)) (defun _read ( file / ofile lst nl )   (cond (  (setq ofile (open file "r"))                    (while (setq nl (read-line ofile))              (setq lst (cons nl lst)))            (close ofile)))    (reverse lst) ) (cond (  (not (setq Strfilename (findfile Strfilename)))          (princ "\n** Data File not Found **"))       (  (not (setq StrLst (_read Strfilename)))          (princ "\n** Data File Empty **"))       (  (not (setq ss (ssget "_:L" '((0 . "*TEXT"))))))       (  (
回复

使用道具 举报

2

主题

9

帖子

7

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 11:02:15 | 显示全部楼层
Yep works ok would need to be able to put text as a prefix aswell as a suffix thou. How would the code be altered to do this
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:08:10 | 显示全部楼层
Change:
 
  1. (subst (cons 1 (strcat (cdr (assoc 1 (entget ent))) str)) (assoc 1 (entget ent)) (entget ent))
 
to
 
  1. (subst (cons 1 (strcat str (cdr (assoc 1 (entget ent))))) (assoc 1 (entget ent)) (entget ent))
 
I'll leave the adding of prompts to you if you like - just remember to mark/initial where modifications are made.
回复

使用道具 举报

9

主题

43

帖子

35

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 11:10:39 | 显示全部楼层
Sounds a bit like this, for those interested:
http://www.jtbworld.com/dimnotes.htm
回复

使用道具 举报

1

主题

5

帖子

4

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 11:15:22 | 显示全部楼层
This is a very handy LISP routine!  Thanks very much for sharing it.
 
I do have a question:  
I've added the line " \U+2104" to the associated text file to add the centerline symbol to dimensions. On my computer, using ACAD2011/Win7 64bit, the dialog box shows the centerline symbol in the list.  On another machine with ACAD2008/XP Pro 64bit it shows up as a small vertical rectangle in the dialog box list. I checked Options/Display/Fonts and both copies of AutoCAD use the same font settings.  Is the problem with displaying the correct symbol an operating system issue?  Is there a setting in XP that will let the dialog box show the correct symbol?
 
Thanks-
Mike
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:18:13 | 显示全部楼层
Thanks CADapult, glad you like it
 
As for the display, this would be something inherent to how the DCL interacts with XP or different versions of AutoCAD, I'm not sure how one would go about changing that
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 20:49 , Processed in 0.550470 second(s), 62 queries .

© 2020-2025 乐筑天下

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