I'm late but for this type of job I was using a macro : (note Tool Can be assigned to toolpaths but also to boundaries)
//---------------------------------------------------------------------------------------------------
// Permet d'afficher tous les éléments (parcours et frontière) utilisant l'outil sélectionné
//---------------------------------------------------------------------------------------------------
// Macro à lancer depuis un menu utilisateur tool.
// Exemple fichier tool.xml à mettre dans le répertoire macro
// Rappel pas d'accent sur les commandes du XML
//---------------------------------------------------------------------------------------------------
//<?xml version="1.0" ?>
//<menupage>
// <button command='MACRO "Affiche_elements_avec_outil" "%s"' label="Affiche elements avec cet outil" />
//</menupage>
//---------------------------------------------------------------------------------------------------
// Variable $Selected_Tool
//---------------------------------------------------------------------------------------------------
FUNCTION Main(STRING $Selected_Tool) {
/// commence par ne plus afficher aucun parcours outil
UNDRAW toolpath ALL
// Construire la fonction
STRING $expr = "tool.name=='" + $entity('tool',$Selected_Tool).name + "'"
INT Nb_Elem=0
// pour chaque parcours regarde si le parcours
FOREACH $tp IN extract(filter(folder('toolpath'), $expr), 'name') {
DRAW TOOLPATH ${entity('toolpath', $tp).name}
$Nb_Elem=$Nb_Elem+1
}
/// commence par ne plus afficher aucune frontière
UNDRAW BOUNDARY ALL
BOOL $Err = 0
// pour chaque frontière regarde si il y a un outil et si oui si c'est le même nom
FOREACH $Elem IN folder('boundary') {
$Err = ERROR $entity('Tool',$Elem.Tool.Name)
IF NOT $Err {
IF $Elem.Tool.Name == $Selected_Tool {
DRAW BOUNDARY $Elem.Name
$Nb_Elem=$Nb_Elem+1
}
}
}
IF $Nb_Elem !=0 {
MESSAGE INFO "Elements trouvé(s) $Nb_Elem"
} ELSE {
MESSAGE WARN "Aucun elements trouvé"
}
}