明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 海盗曹

(结构用)梁编号加减数字

    [复制链接]
 楼主| 发表于 2012-5-21 11:53 | 显示全部楼层
springwillow 发表于 2012-5-21 10:04
支持一下海盗!

谢谢支持~
发表于 2012-5-21 15:43 | 显示全部楼层
咋不来个自动重排捏?
发表于 2012-7-7 11:30 | 显示全部楼层
这个设计时能用到,多谢并学习
发表于 2012-7-30 23:46 | 显示全部楼层
支持。。
发表于 2012-7-31 08:33 | 显示全部楼层
支持。。支持。。支持。。
发表于 2012-8-5 21:44 | 显示全部楼层
非常感谢,很管用哦!!!
 楼主| 发表于 2012-8-7 16:53 | 显示全部楼层
greatvictory 发表于 2012-5-21 15:43
咋不来个自动重排捏?

修行不够啊。。。
发表于 2012-8-7 17:53 | 显示全部楼层
  1. ;; 伪源码需要e派工具箱(XCAD)的支持
  2. ;; 梁编号数字增减
  3. (defun c:tt (/ co ss i s1 tx n1 n2 tx1 tx2 tx3)
  4.   (setq        int (Uint 3 "" "增减数字" int)
  5.         co  (if        (> int 0)
  6.               4
  7.               1
  8.             )
  9.   )
  10.   (princ "\n选择梁编号文本: ")
  11.   (if (setq ss (ssget '((0 . "TEXT") (1 . "*L-* *x,*L-* *X*,*L-* *×"))))
  12.     (progn
  13.       (setq i -1)
  14.       (while (setq s1 (ssname ss (setq i (1+ i))))
  15.         (setq tx  (xyp-get-dxf 1 s1)
  16.               n1  (vl-string-search "-" tx)
  17.               n2  (vl-string-search "(" tx)
  18.               tx1 (substr tx 1 (+ n1 1))
  19.               tx2 (substr tx (+ n1 2) (- n2 n1 1))
  20.               tx3 (substr tx (+ n2 1))
  21.               tx2 (itoa (+ (atoi tx2) int))
  22.               tx  (strcat tx1 tx2 tx3)
  23.               s1  (xyp-SubUpd s1 1 tx)
  24.         )
  25.         (xyp-put "color" s1 co)
  26.       )
  27.     )
  28.   )
  29.   (princ)
  30. )
 楼主| 发表于 2012-8-10 14:14 | 显示全部楼层
xyp1964 发表于 2012-8-7 17:53

院长一出手,就知有没有~!
发表于 2012-8-10 18:39 | 显示全部楼层
海盗曹 发表于 2012-8-10 14:14
院长一出手,就知有没有~!

编号增减有木有……编号重排有木有……有木有……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-4 12:08 , Processed in 0.213534 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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