乐筑天下

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

[编程交流] It’s possible AutoCad selectio

[复制链接]

54

主题

208

帖子

46

银币

后起之秀

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

铜币
386
发表于 2022-7-6 11:29:11 | 显示全部楼层 |阅读模式
Dear All,
 
It’s possible AutoCad selection save (s1, s2, s3 etc.) & after some time
reuse the selection sets inside some lisp or inside a command
 
Just like Photoshop selection
回复

使用道具 举报

2

主题

74

帖子

72

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 11:37:50 | 显示全部楼层
Of course, but!
and they exist only in a single session, ie closed\open and they're gone: (
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:42:20 | 显示全部楼层
I think TimSpangler wrote something that would facilitate this a while back.
回复

使用道具 举报

88

主题

346

帖子

281

银币

后起之秀

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

铜币
423
发表于 2022-7-6 11:46:22 | 显示全部楼层
At the Command: prompt type this...
 
(setq ss1 (ssget))
 
Select your objects.
 
This creates a selection set called ss1.
To retrieve (or reuse) the selection set just type !ss1 at any Select Objects: prompt.
 
Once you close the drawing the selection set is gone like the others have said.
 
You can do this at anytime from the command prompt.
I had several selection sets like this written into my in my menu.  
 
Hope this helps...
回复

使用道具 举报

1

主题

1069

帖子

1050

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
69
发表于 2022-7-6 11:52:51 | 显示全部楼层
 
Another way to create groups separately for the particular selection set
These woul stored in the current drawing
See Help file about
 
~'J'~
回复

使用道具 举报

54

主题

208

帖子

46

银币

后起之秀

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

铜币
386
发表于 2022-7-6 11:57:03 | 显示全部楼层
 
 
DEAR SIR,
 
THX FOR HELP ME..
回复

使用道具 举报

88

主题

346

帖子

281

银币

后起之秀

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

铜币
423
发表于 2022-7-6 12:01:52 | 显示全部楼层
Glad to help someone (Finally!!)
回复

使用道具 举报

2

主题

74

帖子

72

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 12:06:59 | 显示全部楼层
 
I do not know how it was in previous versions, but in 2010 does not happen, ie (setq ss1 (ssget)) works, but the Select Objects: ss1 - no, writes *Invalid selection*, but if you first select(highlight) selection (sssetfirst nil ss1), and then apply it to any command that all is well.
Or put in command line this  (vl-cmdf "command name" ss1 "") for example  (vl-cmdf "_move" ss1 "")
 
 
Well ... me, in principle, it is not necessary, just curious, where can I see this (written by TimSpangler)
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:13:53 | 显示全部楼层
(Can't sleep)
Here's a way...
 
You'll need this subroutine: http://www.cadtutor.net/forum/showpost.php?p=271368&postcount=13

[code];;; Stored Selection Sets;;; Required Subroutines: AT:ListSelect;;; Alan J. Thompson, 03.26.10(defun c:SSS (/ #Choice #Name #SS) (vl-load-com) (or *SSS:Option* (setq *SSS:Option* "Store")) (initget 0 "Recall rEmove Store") (if (vl-consp *SSS:Sets*)   (setq *SSS:Option*          (cond ((getkword (strcat "\nStore Selection Sets\nSpecify option. [Recall/rEmove/Store] : "                           ) ;_ strcat                 ) ;_ getkword                )                (*SSS:Option*)          ) ;_ cond   ) ;_ setq   (setq *SSS:Option* "Store") ) ;_ if (cond   ((eq *SSS:Option* "Recall")    (if (vl-consp *SSS:Sets*)      (and (setq #Choice (car (AT:ListSelect                                "Recall Stored Selection Sets"                                "Select Selection Set:"                                "10"                                "10"                                "false"                                (vl-sort (mapcar 'car *SSS:Sets*) '
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:16:55 | 显示全部楼层
 
I think I saw it on theSwamp.org a while back
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 02:32 , Processed in 0.417907 second(s), 72 queries .

© 2020-2025 乐筑天下

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