乐筑天下

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

[编程交流] debug: vla-get-layer()

[复制链接]

218

主题

699

帖子

483

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1090
发表于 2022-7-6 06:38:26 | 显示全部楼层 |阅读模式
Hi
 
runing this:
 
  1. (vl-load-com)(defun C:TEST(/ ent lay) (if (setq ent (entsel "\nSelect Object"))   (alert     (strcase "Layer Name:"       (vla-get-layer(vlax-ename->vla-object(car ent)))       )     )   ) (princ) )
 
in acad after selecting an entity, the alert box left without the layer name
 
why?
 
Thanks
Shay
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 06:48:56 | 显示全部楼层
STRCASE will change the case (upper/lower) of a string. eg. (strcase "hello") => "HELLO" or (strcase "hello" nil) => "HELLO" or (strcase "HELLO" T) => "hello"
STRCAT (what you want) will join multiple strings. eg. (strcat "800" "85") => "80085"
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 06:59:15 | 显示全部楼层
Reconsider the STRCASE function.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

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

铜币
358
发表于 2022-7-6 07:04:09 | 显示全部楼层
Because the function strcase must be strcat
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 07:15:13 | 显示全部楼层
*echo* *echo* *echo*
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

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

铜币
358
发表于 2022-7-6 07:21:03 | 显示全部楼层
Three posts at the same moment .
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 07:29:10 | 显示全部楼层
 
... Better than having some incorrect replies thrown in, I 'spose.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 07:34:07 | 显示全部楼层
 
Agreed. I just found it amusing. Nothing against anyone.
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 07:42:20 | 显示全部楼层
 
I think we (yourself, Tharwat, and I) are in agreement on that.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-3 17:19 , Processed in 0.906800 second(s), 71 queries .

© 2020-2025 乐筑天下

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