乐筑天下

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

[综合讨论] SELECT in macro won't sta

[复制链接]

4

主题

11

帖子

7

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-7 00:04:16 | 显示全部楼层 |阅读模式
I'm trying to make a selectsimilar with a macro so my fellow AutoCAD 09 & 10 LT can use it. I've come up with this so far
 
  1. ^c^c_getsel;\_last;_select;_p;;

and it won't stay selected so I can then do move or delete... =[
 
 
One other this, I remember there being something you could put into your macro which hides what the macro just did in the command line???? anyone remember this
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-7 00:12:29 | 显示全部楼层
You could use the PSelect instead of the normal Select ... that tends to leave the selected as is after the command completes.
 
The ^P hides the code from the command line.
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-7 00:15:20 | 显示全部楼层
BTW, are you sure GetSel works on LT? That's an Express tool written in Lisp even on 2011. AFAIK it's a bit difficult to get lisp running in LT.
回复

使用道具 举报

29

主题

519

帖子

477

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
163
发表于 2022-7-7 00:23:27 | 显示全部楼层
 
Not impossible, but in terms of the EULA illegal.
 
Try this in your command string:  
  1. ^C^C^P_.pselect;/;_p;;
回复

使用道具 举报

29

主题

519

帖子

477

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
163
发表于 2022-7-7 00:27:07 | 显示全部楼层
On second thoughts, why do you need to do it like that? You can set Objects before Command in Options > Selection Tab and it makes your macro superfluous.
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-7 00:34:47 | 显示全部楼层
I think the OP wants to "simulate" the new Select Similar by using the old GetSel command. That asked you for one or more sample objects and then selected as previous all the objects on those layers. So without it, this whole thing doesn't make much sense.
回复

使用道具 举报

29

主题

519

帖子

477

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
163
发表于 2022-7-7 00:39:36 | 显示全部楼层
Pity the OP is using AutoCAD 2009 because in 2011 they brought in a new command SELECTSIMILAR which is similar to the ET GetSel.
 
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-7 00:45:34 | 显示全部楼层
Yep! And it's also sorry he can't use any lisp. Else he could've used something like mine over here: http://forums.augi.com/showthread.php?p=1132051#post1132051
回复

使用道具 举报

YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-7 00:48:07 | 显示全部楼层
 
pselect does not seem to work in LT.  I have never heard of this command before.
 
I also have this dilemma that I want to work on the selection set after the macro has finished, but the macro always cancels the selection.  So I have to manually select the previous selection.  Very tedious!
 
It works with identical key strokes in command line, but when I use this code, the objects won't stay selected:
  1. ^C^C'-LAYER LO * U PT_HEIGHT* U RL_*;;_ai_selall m 0,0 0,0 ^CSELECT;P;;;
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-7 00:55:13 | 显示全部楼层
Why the 3 enters after the select command?
 
It's strange, but in my Vanilla 2011 both the PSelect and the Select commands work perfectly fine when I issue them manually. But the Select doesn't change the highlights when it's issued from a macro (only the PSelect does that).
 
Perhaps you could use a script file to run the select command through your macro?
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-9 21:32 , Processed in 0.710067 second(s), 72 queries .

© 2020-2025 乐筑天下

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