You guys are so good at Macros, maybe you can help me with these two.
1) I would like to be able to invalidate all toolpaths, then calculate them all.
I have tried "queuing", but that takes forever. I just want everything calculated without having to click 90 times.
2) Gouge check and collision check for all toolpaths. (no split toolpath, 0.0 verification thickness, calculate collision depth, but do not adjust tool)
I use automatic verification on new programs, but we have a lot of old programs where automatic verification was not used.
You guys are so good at Macros, maybe you can help me with these two.
1) I would like to be able to invalidate all toolpaths, then calculate them all.
I have tried "queuing", but that takes forever. I just want everything calculated without having to click 90 times.
2) Gouge check and collision check for all toolpaths. (no split toolpath, 0.0 verification thickness, calculate collision depth, but do not adjust tool)
I use automatic verification on new programs, but we have a lot of old programs where automatic verification was not used.
Could you explain this bit more,I tried using the macro and it it says variable missing
Could you explain this bit more,I tried using the macro and it it says variable missing
If you post your macro i can take a look at it
If you post your macro i can take a look at it
There you go
I think the problem was that you did not start the macro from the toolpath context menue...
try running this maco:
//gets all the toolpaths that are selected in the explorer wich are computed and not empty
entity list $tps = filter(explorer_selected_entities(),'this.RootType == "toolpath" and this.Computed and segments(this) > 0')
//if nothing was selected we exit the macro here
if size($tps) < 1 {
return
}
dialogs message off
//iterate over all selected toolpaths with the foreach loop
foreach $tp in $tps {
// activate the next toolpath
ACTIVATE TOOLPATH ${tp.Name}
//set the parameter for collision check
EDIT COLLISION TYPE GOUGE
EDIT COLLISION APPLY
EDIT COLLISION TYPE COLLISION
EDIT COLLISION STOCKMODEL_CHECK N
EDIT COLLISION SPLIT_TOOLPATH N
EDIT PAR 'Verification.UseVerificationThickness' 0
EDIT COLLISION SHANK_CLEARANCE "0.0"
EDIT COLLISION HOLDER_CLEARANCE "0.1"
EDIT COLLISION ADJUST_TOOL N
EDIT COLLISION APPLY
}
dialogs message on
this runs a collision check over all selected toolpaths selected in the explorer
I think the problem was that you did not start the macro from the toolpath context menue...
try running this maco:
//gets all the toolpaths that are selected in the explorer wich are computed and not empty
entity list $tps = filter(explorer_selected_entities(),'this.RootType == "toolpath" and this.Computed and segments(this) > 0')
//if nothing was selected we exit the macro here
if size($tps) < 1 {
return
}
dialogs message off
//iterate over all selected toolpaths with the foreach loop
foreach $tp in $tps {
// activate the next toolpath
ACTIVATE TOOLPATH ${tp.Name}
//set the parameter for collision check
EDIT COLLISION TYPE GOUGE
EDIT COLLISION APPLY
EDIT COLLISION TYPE COLLISION
EDIT COLLISION STOCKMODEL_CHECK N
EDIT COLLISION SPLIT_TOOLPATH N
EDIT PAR 'Verification.UseVerificationThickness' 0
EDIT COLLISION SHANK_CLEARANCE "0.0"
EDIT COLLISION HOLDER_CLEARANCE "0.1"
EDIT COLLISION ADJUST_TOOL N
EDIT COLLISION APPLY
}
dialogs message on
this runs a collision check over all selected toolpaths selected in the explorer
Its not working it shows the following error message
Not sure if am missing any plugin or files asociated with the powermill application in order to run the macros
Its not working it shows the following error message
Not sure if am missing any plugin or files asociated with the powermill application in order to run the macros
wich PM version do you use?
you could try this:
entity list $tps = explorer_selected_entities()
//if nothing was selected we exit the macro here
if size($tps) < 1 {
return
}
dialogs message off
//iterate over all selected toolpaths with the foreach loop
foreach $tp in $tps {
// activate the next toolpath
ACTIVATE TOOLPATH ${tp.Name}
//set the parameter for collision check
EDIT COLLISION TYPE GOUGE
EDIT COLLISION APPLY
EDIT COLLISION TYPE COLLISION
EDIT COLLISION STOCKMODEL_CHECK N
EDIT COLLISION SPLIT_TOOLPATH N
EDIT PAR 'Verification.UseVerificationThickness' 0
EDIT COLLISION SHANK_CLEARANCE "0.0"
EDIT COLLISION HOLDER_CLEARANCE "0.1"
EDIT COLLISION ADJUST_TOOL N
EDIT COLLISION APPLY
}
dialogs message on
wich PM version do you use?
you could try this:
entity list $tps = explorer_selected_entities()
//if nothing was selected we exit the macro here
if size($tps) < 1 {
return
}
dialogs message off
//iterate over all selected toolpaths with the foreach loop
foreach $tp in $tps {
// activate the next toolpath
ACTIVATE TOOLPATH ${tp.Name}
//set the parameter for collision check
EDIT COLLISION TYPE GOUGE
EDIT COLLISION APPLY
EDIT COLLISION TYPE COLLISION
EDIT COLLISION STOCKMODEL_CHECK N
EDIT COLLISION SPLIT_TOOLPATH N
EDIT PAR 'Verification.UseVerificationThickness' 0
EDIT COLLISION SHANK_CLEARANCE "0.0"
EDIT COLLISION HOLDER_CLEARANCE "0.1"
EDIT COLLISION ADJUST_TOOL N
EDIT COLLISION APPLY
}
dialogs message on
Still not working,I use 2022 version
Still not working,I use 2022 version
how do you run the macro?
how do you run the macro?
Good Day,
The only things I find with this function structure is I'm unable to debug, you get the 'variable missing' error when you try to debug??
Do you guys find this?
FUNCTION Main(
STRING $Selected_tool
)
{
ACTIVATE TOOL $Selected_tool
EDIT TOOLSTOCKMATERIAL SPECIFIED_TOOL $Selected_tool FORM SETSTOCKMATTOOL
EDIT TOOLSTOCKMATERIAL MATERIAL "A36-(P)"
FORM APPLY SETSTOCKMATTOOL
FORM ACCEPT SETSTOCKMATTOOL
return
}
Good Day,
The only things I find with this function structure is I'm unable to debug, you get the 'variable missing' error when you try to debug??
Do you guys find this?
FUNCTION Main(
STRING $Selected_tool
)
{
ACTIVATE TOOL $Selected_tool
EDIT TOOLSTOCKMATERIAL SPECIFIED_TOOL $Selected_tool FORM SETSTOCKMATTOOL
EDIT TOOLSTOCKMATERIAL MATERIAL "A36-(P)"
FORM APPLY SETSTOCKMATTOOL
FORM ACCEPT SETSTOCKMATTOOL
return
}
Can't find what you're looking for? Ask the community or share your knowledge.