乐筑天下

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

[编程交流] 维度字符串验证

[复制链接]

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 10:56:45 | 显示全部楼层
如果是这样,那么我的原始代码应该可以工作
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:02:26 | 显示全部楼层
我尝试了原始代码,它给了我相同的结果。列出文件中的所有内容,而不是不在文件中的内容。不在文件中的也会出现在列表中。
回复

使用道具 举报

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 11:03:35 | 显示全部楼层
刚刚测试了程序,对我来说似乎很好。。
 
在DIM上测试,例如。。。
 
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:07:05 | 显示全部楼层
字符串中有引号。
 
一旦所有字符串(“001”到“210”)都得到验证,我就有了一个脚本,可以将它们转换为文本。
 
如果我的数字没有引号,那么转换文本就不起作用。
回复

使用道具 举报

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 11:09:35 | 显示全部楼层
像这样的东西怎么样?
 
  1. 1
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:12:52 | 显示全部楼层
回复

使用道具 举报

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 11:18:16 | 显示全部楼层
I tried the original code and it's giving me the same result. Listing all the one that are in the file, as opposed to the ones that are not in the file. The ones that are not in the file are also coming up in the list.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:20:10 | 显示全部楼层
Just tested the programs and it seems to work fine for me..
 
Testing on Dims such as...
 
112438mi72ch0ac66a1gze.png
回复

使用道具 举报

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 11:21:38 | 显示全部楼层
The strings have the quotation marks in them.
 
Once all strings ("001" to "210") have been verified i have a script that turns them into text.
 
if i have numbers without the quotes then the conversion text doesn't work.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 11:27:43 | 显示全部楼层
What about something like this?
 
  1. (defun c:Test (/ ss) (vl-load-com) (if (setq ss (ssget "_X" '((0 . "DIMENSION") (-4 . ""))))   ((lambda (i n / lst e)      (while (> (setq n (1- n)) 0) (setq lst (cons n lst)))      (while (setq e (ssname ss (setq i (1+ i))))        (setq lst (vl-remove                    (atoi (vl-list->string                            (vl-remove 34 (vl-string->list (cdr (assoc 1 (entget e)))))                          )                    )                    lst                  )        )      )      (cond (lst (print lst)))    )     -1     211   ) ) (princ))
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 21:57 , Processed in 0.699774 second(s), 72 queries .

© 2020-2025 乐筑天下

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