Macro to check names of toolpath against the tool used

Macro to check names of toolpath against the tool used

Alir3za
Enthusiast Enthusiast
147 Views
3 Replies
Message 1 of 4

Macro to check names of toolpath against the tool used

Alir3za
Enthusiast
Enthusiast

Hey all.
I need a macro that checks the names of all toolpaths against the tool used in them and reports any mismatches with a warning or something similar. For example, if a toolpath is named "r4" but the tool used in it is "r3," it should report that. 
 Thank in advance for your help.

0 Likes
148 Views
3 Replies
Replies (3)
Message 2 of 4

nguyenthinhvt95
Advocate
Advocate

Try this code :

String  msg = ""
FOREACH tp IN folder('toolpath') {
if $tp.name != $tp.tool.name {
$msg = $msg +  crlf + $tp.name
}
}

if $msg != "" {
$msg = "The list of toolpaths which do not match the tool:" + $msg
message error $msg
}

 

Message 3 of 4

Alir3za
Enthusiast
Enthusiast

When I set the correct values still gives me the error which it shouldn't 

0 Likes
Message 4 of 4

nguyenthinhvt95
Advocate
Advocate

could you please take some picture of the error you get?

0 Likes