How to change macro 1 tool to all.HELP

How to change macro 1 tool to all.HELP

ken1996th
Contributor Contributor
492 Views
6 Replies
Message 1 of 7

How to change macro 1 tool to all.HELP

ken1996th
Contributor
Contributor
0 Likes
Accepted solutions (2)
493 Views
6 Replies
Replies (6)
Message 2 of 7

ken1996th
Contributor
Contributor


STRING NEWNAME1=REPLACE(NAME,'D',Tool.Overhang)
RENAME TOOLPATH ; $NEWNAME1

0 Likes
Message 3 of 7

icse
Collaborator
Collaborator
Accepted solution

select all toolpaths you whant to change then run this macro:

 

 

entity list $tps = explorer_selected_entities()
if size($tps) <= 0 {
	return
}
if $tps[0].RootType != 'toolpath' {
	return
}

foreach $tp in filter($tps, 'entity_exists(this.Tool)') {	
	string $newName = replace($tp.Name,'D',tp.Tool.Overhang)
	if tp.Name == $newName {
		continue
	}
	if entity_exists(entity('toolpath',$newName)) {
		$newName = new_entity_name('toolpath',$newName)
	}
	rename toolpath ${tp.Name} ${newName}
}

 

 

I also could write you one where it adds the overhang to the end of the name so you dont have to add a 'D'.

 

Also you can add macros to keyboard shortcuts in the options, so you dont have to drag/drop the file into powermill all the time.

Message 4 of 7

ken1996th
Contributor
Contributor

Thanks you very much ❤️

Message 5 of 7

ken1996th
Contributor
Contributor

Can you help me 1 more ?

with this macro with all tool 

 
FORM COLLISION
EDIT COLLISION TYPE COLLISION
EDIT COLLISION STOCKMODEL_CHECK N
EDIT COLLISION SCOPE ALL
EDIT COLLISION SPLIT_TOOLPATH N
EDIT PAR 'Verification.UseVerificationThickness' 1
EDIT PAR 'Verification.UseVerificationThickness' 0
EDIT COLLISION DEPTH N
EDIT COLLISION DEPTH Y
EDIT COLLISION ADJUST_TOOL Y
EDIT COLLISION APPLY
COLLISION ACCEPT 
 
 
 
 
0 Likes
Message 6 of 7

icse
Collaborator
Collaborator
Accepted solution

here you go:

entity list $tps = explorer_selected_entities()
if size($tps) <= 0 {
	return
}
if $tps[0].RootType != 'toolpath' {
	return
}
dialogs message off
foreach $tp in filter($tps, 'this.Computed == 1') {	
	activate toolpath $tp
	EDIT COLLISION TYPE COLLISION
	EDIT COLLISION STOCKMODEL_CHECK N
	EDIT COLLISION SCOPE ALL
	EDIT COLLISION SPLIT_TOOLPATH N
	EDIT PAR 'Verification.UseVerificationThickness' 1
	EDIT PAR 'Verification.UseVerificationThickness' 0
	EDIT COLLISION DEPTH N
	EDIT COLLISION DEPTH Y
	EDIT COLLISION ADJUST_TOOL Y
	EDIT COLLISION APPLY
}
dialogs message on
0 Likes
Message 7 of 7

ken1996th
Contributor
Contributor

Thanks  you ❤️