Move Group to a specific location

Move Group to a specific location

cdenneyB9ZMH
Enthusiast Enthusiast
15,851 Views
16 Replies
Message 1 of 17

Move Group to a specific location

cdenneyB9ZMH
Enthusiast
Enthusiast

Hi Folks,

 

I'm attempting to draw a footprint for a mini USB port (Datasheet). There are slots in the pad. I found this help article which describes how to make slots. 

 

I was successful with that, but I drew everything at the 0,0 location. Now I want to move this whole group, the Pad as well as the milling outline to a specific location. As far as I can tell, the Group command only allows you to use your mouse to move everything together. I don't know how I can just type in a dimension that I want everything to move to. And if I Group everything and then use the Move command to type in the exact Position I want, it only moved the Pad, and leaves with Milling outline.

 

For reference, here is a picture of the footprint I'm trying to draw.

 

Capture.PNG

 

Any advice?

Accepted solutions (2)
15,852 Views
16 Replies
Replies (16)
Message 2 of 17

C.Nicks
Advisor
Advisor
Accepted solution

Hi Chris,

There are a few different ways you can move the whole group by a set amount.

First, show all of the layers you want moved and group the objects. Set the grid to the distance you want to move, then activated the group (ctrl + right-clck) and move it with the mouse 1 step on the grid. You may have to repeat this for both axis.

 

Another option is a ulp I wrote called MOVEBY.ulp. It is a very simple dialog that moves a group by amounts entered for each axis.

 

Group all of the objects to move, run MOVEBY.ulp and enter in the distances to move the group.

 

Check it out and let me know if it does what you're looking for.

 

 

 

Best Regards,
Cameron


Eagle Library Resources


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.

Message 3 of 17

cdenneyB9ZMH
Enthusiast
Enthusiast

@C.Nicks I ended up moving the group and snapping it to the grid, having to do it twice, once for each axis, and that worked. I did it even before I got your response but now with this ULP it'll probably make this type of thing much easier in the future. Thanks!

0 Likes
Message 4 of 17

C.Nicks
Advisor
Advisor
Glad you got it figured out. Another little trick with the grid is to set one axis as the primary distance, and the other axis as alt. Then perform the move group in one direction, drop it, then start the move again holding alt to move the other direction. That way you only need to change the grid once.

I didn't think I would use that ulp very much when I wrote it, but I found that I use it all the time. It's so handy to me, that I have it setup as one of my mouse shortcuts.
You can even type in different units to move by. If you're on mm grid and type 1in into the dialog, it'll move 25.4mm. Great for defining offsets without changing the grid.
As you use it, let me know if you think of any other features that would be handy.

Best Regards,
Cameron


Eagle Library Resources


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.

Message 5 of 17

cdenneyB9ZMH
Enthusiast
Enthusiast

@C.Nicks I used your MoveBy.ulp today and I must say, that is one wonderful script. Thank you so much for making it. It worked perfectly!

Message 6 of 17

C.Nicks
Advisor
Advisor
Glad you like it. Please let me know if you think of any feature that would help make it better.

Best Regards,
Cameron


Eagle Library Resources


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.

0 Likes
Message 7 of 17

Anonymous
Not applicable

@C.Nicks - I just used your ULP today too, worked a treat. Thanks for making it available 🙂

0 Likes
Message 8 of 17

C.Nicks
Advisor
Advisor

I'm glad you've found it useful.

 

If you need something with more features @rachaelATWH4 has a more advanced move script available called moveTools.ulp

Best Regards,
Cameron


Eagle Library Resources


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.

0 Likes
Message 9 of 17

Anonymous
Not applicable

Thanks Cameron,

 

The preview description of the script gives instructions for installing the ULP to "the board context menus".  Could you possibly explain what this means?  My understanding was that it would add this ULP to one of the menu commands, but I haven't managed to find it anywhere.

 

Thanks a lot,

Ryan

 

 

0 Likes
Message 10 of 17

C.Nicks
Advisor
Advisor
Hi Ryan,
In computing, the context menu usually refers to the right-click menu.

In Eagle you can add custom commands, scripts, or ULPs to the right-click menus for each of the main objects. For example you can control whether something shows up when right clicking a component vs a trace.
Check out the section in the help system for MENU.

Best Regards,
Cameron


Eagle Library Resources


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.

Message 11 of 17

Anonymous
Not applicable
Accepted solution

If you need to move a group by a set distance (rather than to a set coordinate), you can select the whole group, then just type:
MOVE (>0 0) (X Y); 
Where X and Y are replaced by the amount you want to move it.

Message 12 of 17

Anonymous
Not applicable

I know that this reply is about a year old now but I regularly use this method to centre a board after I have routed it to make it easier to place repeated parts in the same but a mirrored position if that makes sense Smiley LOL

 

In short very useful so thanks adamXGWX9

0 Likes
Message 13 of 17

C.Nicks
Advisor
Advisor
Yes, that is exactly what the moveby.ulp dialog outputs to the command line. It just uses a GUI and also has a copy option.

Best Regards,
Cameron


Eagle Library Resources


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.

Message 14 of 17

cdenneyB9ZMH
Enthusiast
Enthusiast

Oh interesting. That makes a lot of sense actually. Still, super useful tool whether you type it or use the GUI.

0 Likes
Message 15 of 17

Anonymous
Not applicable

Thanks @C.Nicks I'll give your ulp a try but I do like to get a handle on some simple CLI commands too

0 Likes
Message 16 of 17

ericwhitefield
Community Visitor
Community Visitor

@C.Nicks Thank you! Your script is very useful.

0 Likes
Message 17 of 17

Anonymous
Not applicable

the following copied from

 https://electronics.stackexchange.com/questions/266472/move-to-absolute-position-in-eagle-cad

 

 

 

Understand that in EAGLE there's a strong correlation between CLI arguments and mouse clicks. Essentially you can think of CLI arguments as coordinates of mouse clicks. So using the mouse, MOVE is a two click operation: (a) pick up the object, (b) put it down.

MOVE command on CLI is the same way: first arg is the location of mouse click, second arg is the destination click.

So let's look at your command strings:

  • mov
  • click the part
  • mov (0 0)
  • the part returns to where it was before it was clicked

This is invalid because the "mov (0,0)" starts a new move command without finishing the first.

  • mov
  • click the part
  • (0 0)
  • the place on the part that was clicked is now at the origin

This is the expected result for that sequence: it's the same as Move, Click part, then click at origin.

So what is the proper way? Let's say you have an SMD centered at (1,1) and you want to move it to (3,3) (yes I know this is easy with grid but I'm keeping the numbers simple). You can just do

  • move (1 1) (3 3)

First arg simulates a click at 1,1 which is the part origin and then you're moving it to desired location.

What if you don't know the proper origin? Use C before the first param, to simulate control-click, and then type a location near the part:

  • move (C1 0) (3 3)

What about groups? This is a VERY HELPFUL trick. Often I end up with a bunch of SMD pads that are in the right places relative to one another but I want to move the entire line of them to a new location. In the GUI you'd do this with right-click. Use the same concept as "C" above, except use ">" to indicate right click.

So I have a group of pads which are all at Y = 2.65 and I want them to go to Y = 1.9. Instead of trying to mess with grid and all that, I just calculate I want them to move down by 0.75 units. So, assuming it's a bunch of pads centered at (0, 2.65), I will:

  • .. group the pads with the mouse ..
  • move (>0 2.65) (0 1.9)

What if I'm lazy about group centers? Neat thing about right-click is, since you can only have one group at a time, it'll automatically grab the group no matter where you click. So you can just fake the first click at the origin 0,0 and then enter a relative location, which will achieve the same effect: if I want to move it down 0.75 I can do

  • .. group the pads with the mouse ..
  • move (>0 0) (0 -0.75)

Took me a while to figure that out since it was buried in the "help move" text. There are very few things in EAGLE which I've found impossible to do by CLI, it's just not always obvious or well documented.