本帖最后由 kucha007 于 2024-11-15 22:16 编辑
源程序出处:http://bbs.mjtd.com/forum.php?mo ... 794&fromuid=7329538
用了很久,非常好用。但也有一些小问题,就做了一些调整。
1-程序使用逻辑不变:目前支持单行文字+属性文字(源程序不支持)+块内属性文字。
2-汉字匹配方式做了调整,方便后面增加一些常用字符,有需要也可以自己改。
3-如果文字位于锁定的图层则无法编辑,这里做了判断,会弹窗提示。
主要会出现在块内属性文字和块外不随层的情况。
4-程序会临时关闭捕捉,避免选字时出错
5-支持四级钢筋符号,扩充特殊符号列表,避免文字分解错误。
6-支持词组匹配
7-支持单行且不带格式的多行属性文字
- (setq Defined
- (List
- "%%130" "%%131" "%%132" "%%133" "%%134" ;1~4级钢筋符号+特殊钢筋
- "%%135" "%%136" "%%137" "%%138" ;L型钢+H型钢+槽型钢+工字钢
- "%%150" "%%151" "%%152" "%%153" "%%154" "%%155" "%%156" "%%157" "%%158" "%%159" ;罗马数字
- "%%177" "%%p" "%%P" ;正负号
- "%%c" "%%C" "%%D" "%%d" "%%%";直径符号+度数符号+%
- '("%%140" "%%141") '("%%142" "%%143") ;上下标开关
- '("%%200" "%%201") '("%%202" "%%203") '("%%204" "%%205") ;圆圈数字
- )
- )
- ;单字符列表:相同的字符不能重复出现,否则容易匹配错误
- (setq OneSTRLst
- (list
- '("零" "壹" "贰" "叁" "肆" "伍" "陆" "柒" "捌" "玖" "拾" "佰" "仟" "萬" "億")
- '("一" "二" "三" "四" "五" "六" "七" "八" "九" "十")
- '("甲" "乙" "丙" "丁" "戊" "己" "庚" "辛" "壬" "癸")
- '("㈠" "㈡" "㈢" "㈣" "㈤" "㈥" "㈦" "㈧" "㈨" "㈩") ;括号汉字
- '("⑴" "⑵" "⑶" "⑷" "⑸" "⑹" "⑺" "⑻" "⑼" "⑽") ;括号数字
- '("①" "②" "③" "④" "⑤" "⑥" "⑦" "⑧" "⑨" "⑩") ;圆圈数字
- '("Ⅰ" "Ⅱ" "Ⅲ" "Ⅳ" "Ⅴ" "Ⅵ" "Ⅶ" "Ⅷ" "Ⅸ" "Ⅹ" "Ⅺ" "Ⅻ") ;罗马数字1-12大写
- '("ⅰ" "ⅱ" "ⅲ" "ⅳ" "ⅴ" "ⅵ" "ⅶ" "ⅷ" "ⅸ" "ⅹ") ;罗马数字1-10小写
- '("%%130" "%%131" "%%132" "%%133") ;钢筋符号
- '("红" "橙" "黄" "绿" "青" "蓝" "紫")
- '("前" "后" "左" "右" "上" "下")
- '("东" "西" "南" "北" "中")
- '("酸" "甜" "苦" "辣" "咸")
- '("春" "夏" "秋" "冬")
- '("加" "减" "乘" "除")
- '("喜" "怒" "哀" "乐")
- '("爱" "恨" "情" "愁")
- '("江" "河" "湖" "海")
- '("琴" "棋" "书" "画")
- '("大" "小" "多" "少")
- '("天" "地" "人")
- '("日" "月" "年")
- '("时" "分" "秒")
- '("黑" "白" "灰")
- '("平" "立" "剖")
- '("正" "背" "侧")
- '("-" ".")
- '(":" ":")
- '("," ",")
- '("(" "(" "[")
- '(")" ")" "]")
- '("主" "次")
- '("给" "排")
- '("梁" "板")
- '("水" "电")
- '("雨" "污")
- '("男" "女")
- '("开" "关")
- '("进" "出")
- '("新" "旧")
- '("美" "丑")
- '("好" "坏")
- '("动" "静")
- '("冷" "热")
- '("强" "弱")
- '("明" "暗")
- '("善" "恶")
- '("真" "假")
- '("高" "矮")
- '("胖" "瘦")
- '("长" "短")
- '("宽" "窄")
- '("快" "慢")
- '("远" "近")
- '("软" "硬")
- '("轻" "重")
- '("清" "浊")
- '("昼" "夜")
- '("香" "臭")
- '("深" "浅")
- '("胜" "败")
- '("干" "湿")
- '("顺" "逆")
- '("推" "拉")
- '("伸" "缩")
- '("升" "降")
- '("单" "双")
- '("奇" "偶")
- '("阴" "阳")
- '("顶" "底")
- '("粗" "细")
- )
- )
- ;多字符列表:字符串包含在另一个串字符中时,较长的写在前面
- (setq MoreSTRLst
- (list
- '("亚光面" "光面" "烧面" "烧洗面" "荔枝面" "自然面")
- '("详图" "平面图" "立面图" "剖面图" "大样图" "意向图")
- '("园建" "给排水" "电气" "水电" "结构")
- '("索引及物料" "索引" "物料" "尺寸及竖向" "尺寸定位" "竖向设计" "坐标定位" "网格放样")
- '("尺寸" "尺寸定位")
- '("竖向" "竖向设计")
- '("置石分布" "小品设施分布" "超荷载换填")
- '("置石" "置石分布")
- '("小品" "小品设施分布")
- '("镀锌" "热镀锌" "不锈钢")
- '("方通" "圆通" "扁通")
- '("竹木" "塑木" "防腐木")
- )
- )
|