乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 31|回复: 2

[编程交流] get Entity name , ( string )

[复制链接]

57

主题

183

帖子

126

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
285
发表于 2022-7-5 23:46:13 | 显示全部楼层 |阅读模式
i have this code
 
 
  1. (setq selpline (ssget '((0 . "INSERT"))))  (setq m 0)  (repeat (sslength selpline)      (setq entbh (ssname selpline m))        (setq lentpl (entget entbh))            (setq tipo_l (cdr(assoc -1 (entget entbh))))  )
 
 
Unable to collect the value of the variable entity in tipo_l
when I try to use it more of an error
Error: bad argument type: stringp
 
How can I work with this value as a string?
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 00:20:11 | 显示全部楼层
there is no need for the line in orange color since you have it with entget function or visa versa .
 
The entity you want can not be string , so what are you planning to do with it as a string ?
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 00:55:29 | 显示全部楼层
 
You can convert any data type to a string using the vl-princ-to-string or vl-prin1-to-string functions.
 
However, since an entity name is simply a pointer to the DXF data in the drawing database, it is useless when the pointer is lost through converting it to a string or when not assigned to a variable.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 21:33 , Processed in 0.775975 second(s), 58 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表