乐筑天下

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

[综合讨论] Macro - Copy & Paste Block

[复制链接]

5

主题

16

帖子

11

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 23:38:43 | 显示全部楼层 |阅读模式
Hello Fellow Cadists,
 
Can some please let me know where I’m going wrong with this macro.
 
I thought it would be simple but it doesn’t quite work.
The macro attempts to orientate the UCS to the face of an object, copy the object based on the origin of the face, delete the object and replace it with a block containing the object. It would be good to then place a duplicate block on 0,0,0, of the world ucs.
Sounds pretty straightforward:  
 
Command line Summary
 
USC, ENTER, F, ENTER, , ENTER
COPYWITH BASEPOINT, ENTER, 0,0,0, ENTER  ENTER
ERASE, ENTER, P ENTER
PLASTEBLOCK, ENTER, 0,0,0, ENTER
UCS, ENTER, W, ENTER
PLASTEBLOCK, ENTER, 0,0,0, ENTER
 
Macro
^C^C_ucs;f;\;
_copybase;0,0,0;\;
_ERASE;p;
_pasteblock;0,0,0;
_ucs;w;
_pasteblock;0,0,0;
 
Can anyone shed light on this issue please?
 
Cheers
回复

使用道具 举报

YZ

27

主题

232

帖子

205

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
135
发表于 2022-7-7 00:36:45 | 显示全部楼层
Have you tried this macro? Where does it fail?
 
When using Erase, Previous, you need to enter twice to accept the selection set, otherwide it is waiting in case you want to add more than only the previous.
 
  1. ^C^C_ucs;f;\;_copybase;0,0,0;\;[b]_ERASE;p;;[/b]_pasteblock;0,0,0;_ucs;w;_pasteblock;0,0,0;
回复

使用道具 举报

5

主题

16

帖子

11

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-7 00:59:30 | 显示全部楼层
That's great, now it does the job!  - Bit of a school boy error -
 
Thanks very much!
 
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 04:13 , Processed in 0.524877 second(s), 69 queries .

© 2020-2025 乐筑天下

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