Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So we have a macro that we run for drilling holes in plates. Currently we use one macro to separate the featureset into multiple featuresets by size then a second macro to drill those featuresets. The macro currently creates a new tool based on the featureset size. Is there an easy way to change this so that it first checks the project to make sure the tool doesnt already exist; and then if it doesnt goes and grabs the correct drill from the database to use in the drilling program?
current macro looks like this
STRING msg6 = "Please highlight all numbered feature sets." + CRLF + "Then hit RESUME."
MACRO PAUSE $msg6
FOREACH $f IN explorer_selected_entities() {
REAL d = $f.Name
IF $d <= 1.0 {
STRING $dName = "" + $d + ""
ACTIVATE FEATURESET $dName
REAL $diameter = $d
IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "deep_drill.ptf"
EDIT TPPAGE TOOL
CREATE TOOL ; DRILL
EDIT TOOL ; DIAMETER $diameter
EDIT TOOL ; NUMBER COMMANDFROMUI 1
STRING newTool = $diameter + "_Drill"
RENAME Tool ; $newTool
EDIT TPPAGE SWDrilling
EDIT DRILL TYPE DEEP_DRILL
EDIT DRILL DEPTH HOLE
EDIT PAR 'AxialDepthOfCut.UserDefined' '1' EDIT DRILL PECK_DEPTH "0.05"
EDIT TPPAGE SWToolRapidMv
EDIT TOOLPATH SAFEAREA CALCULATE_DIMENSIONS
EDIT TOOLPATH SAFEAREA PLUNGE_SIZE "0"
EDIT TPPAGE SWFeedSpeed
EDIT FEEDRATE CUTTING_SPEED "60"
IF $diameter >= .75 {
EDIT FRATE "2.0"
EDIT PRATE "2.0"
} ELSE {
EDIT FRATE "3.0"
EDIT PRATE "3.0"
}
EDIT COOLANT ON
EDIT TPPAGE SWDrilling
Solved! Go to Solution.