Message 1 of 6
Not applicable
10-21-2016
08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This macro is not acting like i hoped it would, and I am out of ideas on what to change. This macro is intended to change the Speed and Feed in each toolpath so long as the tool meets the criteria in the macro options. If the tool does not meet the criteria in the macro, I would like the macro to add a suffix to the existing toolpath name of "_SPEED AND FEED NOT SET".
The way the macro is, none of the speeds and feeds get updated and none of the names get changed.
Thank you in advance,
Bruce
FOREACH $ent IN folder('TOOLPATH') {
ACTIVATE TOOLPATH $ENT.name
REAL $Dia = $tool.diameter
REAL $Thick = $toolpath.thickness
STRING $Name = $toolpath.Name
STRING $Suffix = "_SPEED AND FEED NOT SET"
STRING $NewName = $Name + $Suffix
// ############### 1.0" TOOL ###############
IF ($Dia > 0.999 AND $Dia < 1.001) {
IF $Thick == 0 {
EDIT RPM "100"
EDIT FRATE "100"
} ELSE {
EDIT RPM "200"
EDIT FRATE "200"
}
}
// ############### .750" TOOL ###############
IF ($Dia > 0.749 AND $Dia < 0.751) {
IF $Thick == 0 {
EDIT RPM "300"
EDIT FRATE "300"
} ELSE {
EDIT RPM "400"
EDIT FRATE "400"
}
}
// ############### .500" TOOL ###############
IF ($Dia > 0.499 AND $Dia < 0.501) {
IF $Thick == 0 {
EDIT RPM "500"
EDIT FRATE "500"
} ELSE {
EDIT RPM "600"
EDIT FRATE "600"
}
}
} ELSE {
RENAME TOOLPATH ; $NewName
}
Solved! Go to Solution.
