- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We just recently had our POST changed. It used to be setup that all thread mills ran CW. After the change it looks at the RPM and if the RPM is negative is runs CW and positive runs CCW. Problem is our old programs, if you run them the thread mill it post out as running the spinlde CCW. Most of our thread mills are CW cutting. So I was trying to make this Macro to look at all the toolpaths in a Folder. Then if it sees a drill type listed as Thread_mill, and the spindle speed is greater than 0 it will ask you what tool to use to replace the current tool. Replace it and recalculate it. I think my issue is the $Selected_Tool is a list, and I'm trying to pull information as an Entity?? If someone could poke me in the right direction that would be great.
STRING $FolderName = active_folder() IF $FolderName == '' { MESSAGE ERROR "There is no active folder. Please activate a folder and try again." MACRO ABORT } FOREACH tl IN FOLDER(FolderName) { IF tl.Drill.Type == 'thread_mill' { IF tl.SpindleSpeed.Value > 0 { ENTITY LIST $Selected_Tool = INPUT ENTITY MULTIPLE TOOL "Select Replacement Tool" ACTIVATE TOOLPATH $tl.Name ACTIVATE TOOL $Selected_Tool.Name EDIT PAR 'CutDirection' 'conventional' EDIT TOOLPATH $tl.Name CALCULATE } } }
Solved! Go to Solution.