JWhelp 发表于 2022-7-6 23:38:43

Macro - Copy & Paste Block

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, ENTERENTER
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 发表于 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.
 

^C^C_ucs;f;\;_copybase;0,0,0;\;_ERASE;p;;_pasteblock;0,0,0;_ucs;w;_pasteblock;0,0,0;

JWhelp 发表于 2022-7-7 00:59:30

That's great, now it does the job!- Bit of a school boy error -
 
Thanks very much!
 
页: [1]
查看完整版本: Macro - Copy & Paste Block