乐筑天下

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

[综合讨论] Help combing two macro's

[复制链接]

2

主题

4

帖子

2

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-7 00:25:01 | 显示全部楼层 |阅读模式
I have two existing working macros that i would like to combine together to form one, but am struggling to work out how to combine them. The first insets a block at a defined scale and rotation into the drawing. The second insets an incremental number.
 
CODE 1
  1. ^c^c-layer;m;"LB-T007-SET-OUT";c;WHITE;;l;continuous;;;-insert;"LB-setting-out-point";sc;25;ro;0;
 
CODE 2
  1. ^c^c_text;\;;$M=$(+,$(getvar,USERR1),$(getvar,USERR2));setvar;USERR1;$M=$(+,$(getvar,USERR1),$(getvar,USERR2));
 
It would also be great if this command would then repeat for consectutive mouse clicks until the command chain is ended.
 
What i want to end upwith is a command that inserts a block with an accompanying incremental ref number and to repeat this for number of repetitions
 
 
Any assitance would be mush appreciated
 
Andy C
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 00:31:10 | 显示全部楼层
Renderman: The OP is using LT.
 
Haven't we seen this request in two other forms?  It's deja' vue all over again.
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-7 00:39:23 | 显示全部楼层
 
 
... Ohhhhh! I completely overlooked that!
 
I'm still struggling to understand why anyone buys LT anymore.
 
 
 
I do not recall seeing this, otherwise I would have ignored the OP.
回复

使用道具 举报

2

主题

4

帖子

2

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-7 00:44:57 | 显示全部楼层
Unfortunately i am using Keyscape LT 2010 which is a Landscape Architecture package that runs on the back of AutoCAD LT and has had the LISP functions disabled.
 
The only way i am able to do this as far as i am aware is via the CUI interface and creating a menu bar button against which i can assign a macro.
 
I have done this indivudally for both codes but want to try and combine it together.
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 00:51:10 | 显示全部楼层
Here's one:
 
http://www.cadtutor.net/forum/showthread.php?54236-HELP-with-a-non-working-Macro&highlight=macro
 
And here's the other:
 
http://www.cadtutor.net/forum/showthread.php?54236-HELP-with-a-non-working-Macro&highlight=incremental
 
And this is where it all started:
 
http://www.cadtutor.net/forum/showthread.php?54181-NEEDED-Deisel-Expression-for-incremental-numbering&highlight=macro
 
So we now have four choices as where to respond.  Take your pick.  LOL
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 00:55:06 | 显示全部楼层
I think the OP just got a bit carried away by the lack of response. Rather than "bumping" the original post he repeated it in a slightly different fashion. The first attempt I can understand but the next two really weren't necessary in my opinion. But as the wife says, "It is what it is."
 
I'm willing to give him the benefit of the doubt.
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-7 01:02:21 | 显示全部楼层
 
Fair enough, I'll follow your wise decision... in kind, I've deleted my post.
回复

使用道具 举报

8

主题

1133

帖子

1164

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-7 01:10:34 | 显示全部楼层
Whilst not being a user of Macros, I have been idly browsing, and one bit of information that I gleaned was that there was a limit of the number of characters on each line. I don't know whether this is still the case, but you needed to put a "+" at the end of each line to join it on to the next line of code.
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-7 01:18:12 | 显示全部楼层
 
If you're speaking in regard to the code in the OP, they are each on only a single line. They appear wrapped (on multiple lines) as a result of your browser windows size and/or screen resolution.
回复

使用道具 举报

8

主题

1133

帖子

1164

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-7 01:22:41 | 显示全部楼层
I was hoping that it was the answer to his query, as the combined length of both macros comfortably exceeds 80 characters.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-9 09:33 , Processed in 0.344360 second(s), 72 queries .

© 2020-2025 乐筑天下

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