I’m afraid that that function is not available in Powermill. But you can set user parameters to the toolpaths segments and its points. So I would set those parameters there and then use those for postprocessing.
Here are 2 macros. The first is setting the "HAS_CUSTOM_SPINDLE_SPEED" for selected toolpaths segments to “YES”. And “NO” for the not selected ones. It is also setting the "CUSTOM_SPINDLE_SPEED" value which is in that example 5000.
The second macro just selects toolpaths segments where the parameter "HAS_CUSTOM_SPINDLE_SPEED" is “YES” for visual check.
In your postprocessor you need to define User parameters “udp_CUSTOM_SPINDLE_SPEED” and “udp_HAS_CUSTOM_SPINDLE_SPEED”. Those will be getting the values from Powermill during postprocessing. Then you can in the Move Linear command add the condition statement and print out the custom spindle speed if needed.
INT $cutomSpindleSpeed = 5000
ENTITY $tp = entity("Toolpath","")
INT LIST selected_rows = selected_list_rows('TPList.TPListView')
INT $rowIndex = 0
WHILE $rowIndex < size($selected_rows) {
IF $selected_rows[$rowIndex] == 1 {
INT $i = point_add_parameter($tp,$rowIndex,0,"HAS_CUSTOM_SPINDLE_SPEED","YES","segment")
INT $ii = point_add_parameter($tp,$rowIndex,0,"CUSTOM_SPINDLE_SPEED",$cutomSpindleSpeed,"segment")
} ELSE {
INT $i = point_add_parameter($tp,$rowIndex,0,"HAS_CUSTOM_SPINDLE_SPEED","NO","segment")
INT $ii = point_remove_parameter($tp,$rowIndex,0,"CUSTOM_SPINDLE_SPEED","segment")
}
$rowIndex = $rowIndex + 1
}
ENTITY tp = ENTITY("TOOLPATH","")
INT $tp_Count = 0
INT $tp_ComponentCount = toolpath_component_count($tp, 'segments')
WHILE $tp_Count < $tp_ComponentCount {
print par "$point_parameters($tp,$tp_Count,0,'segment' )"
IF $has_point_parameter( $tp, $tp_Count,0, 'HAS_CUSTOM_SPINDLE_SPEED', 'segment') == 1 {
IF $point_parameters( $tp, $tp_Count, 0, 'segment')['HAS_CUSTOM_SPINDLE_SPEED'] == "YES" {
EDIT TPSELECT ; TPLIST UPDATE\r $tp_Count TOGGLE
}
}
$tp_Count = $tp_Count + 1
}