明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 423|回复: 1

如何获取对象线型名

[复制链接]
发表于 2022-9-19 16:04 | 显示全部楼层 |阅读模式
ssget选择对象后获取对象的线型名的代码怎么写,望赐教:
(setq ss (ssget))
(setq lnm (....));;获取线型名

发表于 2022-9-19 16:24 | 显示全部楼层
  1. (defun entity:get-linetype (ent)
  2.   "获取图元的线型,当线型随层时,返回图层线型。"
  3.   (if (entity:getdxf ent 6)
  4.     (entity:getdxf ent 6)
  5.     (cdr (assoc 6 (tblsearch "layer"
  6.           (entity:getdxf ent 8))))))
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-4 21:23 , Processed in 0.239365 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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