明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2026|回复: 6

求救 哪位大大知道这个函数啊: YBL-ENT-SORT

[复制链接]
发表于 2012-7-15 14:46:02 | 显示全部楼层 |阅读模式
求救 哪位大大知道这个函数啊:  错误: no function definition: YBL-ENT-SORT
发表于 2012-7-15 16:24:17 | 显示全部楼层
这应该是个自定义函数。
 楼主| 发表于 2012-7-15 21:32:18 | 显示全部楼层
我应该写清楚的,是下面这个程序里的.  
作者: eachy

(defun c:AlDim (/ ss ssl i e el p dl tf dist)
  (if (and (setq ss (ssget '((0 . "dimension") (70 . 32))))
           (setq dist (getdist "\n输入间距: "))
      )
    (progn
      (command ".undo" "be")
      (setq ssl (sslength ss)
            i   -1
      )
      (repeat ssl
        (setq e  (ssname ss (setq i (1+ i)))
              el (entget e)
              p  (cdr (assoc 10 el))
              dl (cons (list p e) dl)
        )
        (if
          (and (not tf) (equal (cdr (assoc 50 el)) (/ pi 2.) 1e-6)) ;_ver
           (setq tf t)
        )
      )
      (if tf
        (setq dl (ybl-ent-sort  dl 1 4 dist)) ;_ver
        (setq dl (ybl-ent-sort  dl 0 1 dist))
      )
      (setq p (caaar dl))
      (foreach x dl
        (foreach d x
          (setq el (entget (cadr d)))
          (entmod (subst (cons 10
                               (if tf
                                 (list (car p) (cadar d))
                                 (list (caar d) (cadr p))
                               )
                         )
                         (assoc 10 el)
                         el
                  )
          )
        )
        (setq p (if tf
                  (mapcar '+ (list dist 0. 0.) p)
                  (mapcar '- p (list 0. (- dist) 0.))
                )
        )
      )
      (command ".undo" "end")
    )
  )
  (princ)
)
(princ "\nStart command with AlDim , eachy [www.xdcad.net]!")
(princ)
 楼主| 发表于 2012-7-15 21:39:38 | 显示全部楼层
本帖最后由 zag0666 于 2012-7-15 21:40 编辑



谢谢  提醒  !

我把他"家"翻了个底朝天,终于找到了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2012-7-17 22:45:28 | 显示全部楼层
可惜的是他是在标注后用于整理,如果能过标注时就能设定就好了
发表于 2012-8-13 09:13:56 | 显示全部楼层
没见过这个函数,呵呵,自定义的吧
发表于 2015-2-15 01:51:59 | 显示全部楼层
没见过这个函数
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-23 10:20 , Processed in 0.165298 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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