Mirrored paste in script

Mirrored paste in script

Anonymous
Not applicable
795 Views
1 Reply
Message 1 of 2

Mirrored paste in script

Anonymous
Not applicable

Hello,

 

i'm trying to copy a group of elements and paste it mirrored at a diffrent postion.

This works fine if i use the gui.

But i'm trying to use a script to automate the process.

 

Grouping works.

group (-10 -5) (-10 55) (55 55) (55 -5) (-10 -5)
PASTE (-5 55)  ;

Pasting at a defined position also.

 

 

But i can't mirror. When done mually i just click the middle mouse button and my group gets mirrored.

But the help doesn't list the necessary command for the middle mouse button

 

Any combination of the following modifiers may follow the opening brace in order to simulate a particular key that is held pressed with the "mouse click" or to change the type of coordinates:
>    right mouse button click
A       Alt key
C       Ctrl key
P       Polar coordinates (relative to the mark, x = radius, y = angle in degrees, counterclockwise)
R       Relative coordinates (relative to the mark)
S       Shift key

 

 

I'm pretty sure it's doable. Im just missing the right syntax.

So my question is: How can i either emulate the middle mouse button or paste mirrored in a different way.

I tried to copy first and mirror afterwards, but since my copys are connected the wiring is messed up pretty bad this way.

 

Thank you so much for you time and im looking forward to your answer.

 

Reply
Reply
0 Likes
Accepted solutions (1)
796 Views
1 Reply
Reply (1)
Message 2 of 2

jorge_garcia
Autodesk
Autodesk
Accepted solution

Hi @Anonymous,

 

I hope you're doing well. Thank you for documenting the issue you are seeing in such a detailed way, makes my life easier. So if you wanted to script this operation, here is one way to do it.

 

GROUP (x1 y1) (x2 y2) ...; //For as many points as you want to form the group polygon, remember that you must start and end on the same point.

CUT (x1 y1) ; //The cut command puts objects in the clipboard if you don't specify an exact anchor point EAGLE will use the center of the group. Nothing //will be removed. The functionality of the CUT command has been for the most part superseded by COPY but CUT is still available in the command line.

PASTE MR0 (x1 y1); //The Mirror flag can't be used on it's own by adding R0 I avoid any rotation and conform to the orientation requirements.

 

This should take care of it, the only thing you were missing was the MR0. Please accept as solution if my post fully resolves your issue, or reply with additional details if the problem persists.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Reply
Reply