明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2029|回复: 3

[求助]获取图元坐标信息

[复制链接]
发表于 2010-8-9 09:48:00 | 显示全部楼层 |阅读模式

现在能够得到图元的信息 ((-1 . <图元名: 7ef4fd68>) (0 . "LWPOLYLINE") (330 . <图元名:
7ef4fd08>) (5 . "2D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0")
(100 . "AcDbPolyline") (90 . 4) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10
122.324 115.89) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 203.136 223.115) (40 .
0.0) (41 . 0.0) (42 . 0.0) (10 593.91 88.2551) (40 . 0.0) (41 . 0.0) (42 . 0.0)
(10 758.854 220.904) (40 . 0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0))

我想得到其中坐标点的信息,即开头为10的数据组,请问有人知道哪个函数可以用么?

发表于 2010-8-9 10:16:00 | 显示全部楼层
(cdr (assoc 10 (entget (car (entsel)))))
发表于 2010-8-15 13:16:00 | 显示全部楼层
 (cdr (assoc 10 (entget (car (entsel)))))--提取一个顶点坐标

发表于 2010-8-15 15:09:00 | 显示全部楼层
(defun massoc (key alist / x nlist)
  (foreach x alist
    (if (eq key (car x))
      (setq nlist (cons (cdr x) nlist))
    )
  )
  (reverse nlist)
)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-2 08:24 , Processed in 0.167570 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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