@kandennti,
Thanks for taking the time to test this out on your end.
I added a few toolpaths with 'Rest Machining' on with 2 of them and off with the last one.
# Fusion360API Python script
import traceback
import adsk.core as core
import adsk.cam as cam
def run(context):
ui: core.UserInterface = None
try:
app: core.Application = core.Application.get()
ui = app.userInterface
camObj: cam.CAM = app.activeProduct
setup: cam.Setup = camObj.setups[0]
print(f"ver {app.version}")
print("\n\nBefore Change")
print("------------------")
print_state(setup.operations[2])
print_state(setup.operations[3])
print_state(setup.operations[4])
print("------------------")
print("\n\n")
change_feed(setup.operations[0])
change_feed(setup.operations[1])
print("\n\nAfter Change")
print("------------------")
print_state(setup.operations[2])
print_state(setup.operations[3])
print_state(setup.operations[4])
print("------------------")
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def change_feed(
ope: cam.Operation,
) -> None:
if ope.strategy == "drill":
prmName = "tool_feedPlunge"
else:
prmName = "tool_feedCutting"
prm: cam.ParameterValue = ope.parameters.itemByName(
prmName
)
msgLst = [
f"** Name: {ope.name} **",
"---",
f"Before Feed: {prm.value.value}",
f"Before State: {ope.operationState}",
"---",
]
prm.value.value += 100
msgLst.extend(
[
f"After Feed: {prm.value.value}",
f"After State: {ope.operationState}",
]
)
print("\n".join(msgLst))
def print_state(
ope: cam.Operation,
) -> None:
msgLst = [
f"** Name: {ope.name} **",
f"State: {ope.operationState}",
f"Rest: {cam.BooleanParameterValue.cast(ope.parameters.itemByName('useRestMachining').value).value}"
]
print("\n".join(msgLst))
ver 2.0.16976
Before Change
------------------
** Name: Adaptive1 **
State: 0
Rest: True
** Name: Pocket1 **
State: 0
Rest: True
** Name: Pocket1 (2) **
State: 0
Rest: False
------------------
** Name: Face1 **
---
Before Feed: 1000.0
Before State: 0
---
After Feed: 1100.0
After State: 0
** Name: Drill1 **
---
Before Feed: 1000.0
Before State: 0
---
After Feed: 1100.0
After State: 1
After Change
------------------
** Name: Adaptive1 **
State: 1
Rest: True
** Name: Pocket1 **
State: 1
Rest: True
** Name: Pocket1 (2) **
State: 0
Rest: False
------------------

Also, I noticed the same thing happens when updating feeds and speeds through the UI except for the edited operation is obviously regenerated when clicking "OK".