明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3681|回复: 1

[函数] 错误: 参数类型错误: lentityp nil

[复制链接]
发表于 2011-6-20 19:40:55 | 显示全部楼层 |阅读模式
下面一个函数为输出带属性块儿的属性值,在有些地方运行不会出现错误:;可有时候会出现:更改请输入<1>,空格接受默认值<DN; 错误: 参数类型错误: lentityp nil,不知道什么原因,请朋友帮忙!

(defun alluse6()



  (princ "更改请输入<1>,空格接受默认值<DN")
  (setq this_list(entget (entnext (entlast))))
  (princ (cdr (assoc 1 this_list)))
  (princ ">")
  (princ)
  (setq attsell(getint))
  (if(= attsell 1) (command "eattedit" (entlast) ""));打开最后一个属性块的增强属性编辑器




  (setq lst (entget (entnext (entlast))))
  (setq s(assoc 1 lst))
  (setq step(+ step 1))






  )
发表于 2011-6-20 20:13:13 | 显示全部楼层
  (setq this_list (entget (entnext (entlast))))
上句中(entlast)已经是最后的实体了,用entnext只能返回nil。所以entget出错。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-10 04:19 , Processed in 0.144222 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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