Change package on multiple components

Change package on multiple components

infinitemach
Enthusiast Enthusiast
669 Views
3 Replies
Message 1 of 4

Change package on multiple components

infinitemach
Enthusiast
Enthusiast

I have a design where I need to bulk change the package from 0402 to 0603. In the PCB designer, I selected all the 0402 capacitors in Design Manager, 183 of them, and when I right click on one of the capacitors, I can only change the package on the part I clicked on. 

 

Looking over in Inspector, I don't see a quick action for changing the package. It only has an action for replacing the part, which doesn't seem optimal to me.

0 Likes
670 Views
3 Replies
Replies (3)
Message 2 of 4

mtl_asm
Collaborator
Collaborator

i dont think there is a way without making a script. 

 

but its easy enough to do... for example just group the caps you want to change then run something like this. Just change the string variable "target_package" to be whatever the package you want to change to is called. 

 

// change package for group example
// by scott monk mtl.asm@gmail.com
// no warranty. no attribution.

#usage "changes package of components in group to target string"

string target_package = "C_CHIP-0603(1608-METRIC)";

string cmd;
string temp;

if(board){
	board(B){
		B.elements(E){
			if(ingroup(E)){
				sprintf(temp, "change package %s %s;", E.name, target_package);
				cmd += temp;
			}
		}
	}
}else{

	dlgMessageBox("run from board view");
}

exit(cmd);

 

 

mtlasm_0-1683057767157.png

 

Message 3 of 4

TimPaterson
Enthusiast
Enthusiast

This can be done with the Change command in command line mode. With the group selected, enter something like this in the command line just above the graphics area (not to be confused with the text command line below the graphics area):

 

change package '0603'

 

After entering the command, right-click in any blank area of the graphics window. The only option should be Change: Group. Select that, voila!

 

Note the text in quotes is the name of variant for that component, not the name of the footprint.

 

0 Likes
Message 4 of 4

giladk
Enthusiast
Enthusiast

This helped me allot. quick changing packages should be part of the menu. it is very common to scale a resistor or capacitor up or down depending on the need.

0 Likes