Repeat macro doesn't work

Repeat macro doesn't work

Anonymous
Not applicable
995 Views
6 Replies
Message 1 of 7

Repeat macro doesn't work

Anonymous
Not applicable

Hi everyone 

 

Sorry for my bad English but i have got some problem.

Why cannot I repeat this macro routine below:

 

*^C^Ccopy;p;;@;@;move;p;;@;\align;p;;@;@;\\;n;

 

Other routines have worked just fine...

Hopefully someone has an answer for this.

 

Thanks and have a good day !

0 Likes
996 Views
6 Replies
Replies (6)
Message 2 of 7

pendean
Community Legend
Community Legend

What happens at the commandline when your macro finishes? Post the details from there.

0 Likes
Message 3 of 7

Emmsleys
Alumni
Alumni

Would you be able to share more information as suggested? 

 

Were you able to make any other edits to the macro you have provided? 



Sarah Emmsley
Technical Support Specialist

0 Likes
Message 4 of 7

Anonymous
Not applicable

Hi Dean

Hi Sarah

 

Thanks for your replies.

I found a solution and improved my macro:

 

*^C^Ccopy;p;;@;@;move;p;;@;\rotate;p;;@;r;@;\\

 

In my work, I have to copy object(s) on polyline, then align/rotate it with that polyline (different angles and distances) which is a long polyline.

So that purpose, I have created this macro to simplify my work (many clicks with that copy-rotate/align routine). I create first object(s) then use this macro to do the routine (but with the COPY command in my macro, at the end, I have to delete the overlapping object(s), I am working on improve this).

 

So with the old macro, it worked fine (no error occur) but did not repeat itself. Maybe the ALIGN command is the problem there (one more thing: when I use ALIGN command and don't change the angle of object(s), it resets the last point (@) to (0,0)).

 

Now i have changed to ROTATE command and it works ok.

 

Loc Nguyen

Autocad LT 2014

Message 5 of 7

steven-g
Mentor
Mentor
It does look as though the align command is stopping the normal repeat action of the macro, but add another command at the end and it works again. try this [CODE]*^C^Ccopy;p;;@;@;move;p;;@;\align;p;;@;@;\\;n;m;p;;@;@;[/CODE]
Message 6 of 7

pendean
Community Legend
Community Legend

Question: if the object(s) is a block, any reason you cannot use DIVIDE command's Object option to have it do all the work for you? MEASURE command does a similar job although complex Plines might confuse it. See before and after pictures below, the rectangle is a block:

 

Capture.PNG

 

 

Capture2.PNG

Message 7 of 7

Anonymous
Not applicable

Dean, Steven

Thank you for your hard work.

 

To Steven: so the ALIGN command is the reason after all. Thanks for your macro, but now I am using ROTATE command which is better than ALIGN (for my work only).

 

To Dean: yes, DIVIDE or MEASURE does copy and align block to Polylines (ARRAYPATH does the job too). But these commands copy object to Polylines at every X distance, which is not work in my case (mine is not follow any rule) (example: first distance is 5, then second is 11, third is 7... Or copy and align object at intersection point of Polyline and other objects)

 

Loc Nguyen

Autocad LT 2014