Community
whats wrong it tells me there the Material not in the DB
STRING $Material = ""
STRING LIST $Options = {"Aluminium", "Guss", "Werkzeugstahl"}
INT $result = INPUT CHOICE $Options "Wähle das Material"
If $result == 0 {
$Material = "Aluminium"
} ELSEIF $result == 1 {
$Material = "Guss"
} ELSE {
$Material = "Werkzeugstahl"
}
//Abfrage der Werkzeuge für M4
IF NOT $ENTITY_EXISTS('tool','HSS_NC-Anbohrer_D10,00_90Grad_YG-1_D2306100') {
FORM TOOLDBSEARCH
TOOLDB QUERY SET TOOL_TYPE ALL
TOOLDB QUERY SET STOCK_MATERIAL_ACTIVE
TOOLDB STOCK_MATERIAL SELECT "$Material"
TOOLDB QUERY SET NAME "HSS_NC-Anbohrer_D10,00_90Grad_YG-1_D2306100"
TOOLDB QUERY PRESET
TOOLDB RESULTS_LIST CREATE NOQUIBBLE ALL
}
IF NOT $ENTITY_EXISTS('tool','HSS_Bohrer_D03,30_L36_Gold-P') {
FORM TOOLDBSEARCH
TOOLDB QUERY SET TOOL_TYPE ALL
TOOLDB QUERY SET STOCK_MATERIAL_ACTIVE
TOOLDB STOCK_MATERIAL SELECT "$Material"
TOOLDB QUERY SET NAME "HSS_Bohrer_D03,30_L36_Gold-P"
TOOLDB QUERY PRESET
TOOLDB RESULTS_LIST CREATE NOQUIBBLE ALL
}
IF NOT $ENTITY_EXISTS('tool','Gewindebohrer_M4x0,7') {
FORM TOOLDBSEARCH
TOOLDB QUERY SET TOOL_TYPE ALL
TOOLDB QUERY SET STOCK_MATERIAL_ACTIVE
TOOLDB STOCK_MATERIAL SELECT "$Material"
TOOLDB QUERY SET NAME "Gewindebohrer_M4x0,7"
TOOLDB QUERY PRESET
TOOLDB RESULTS_LIST CREATE NOQUIBBLE ALL
TOOLDBSEARCH ACCEPT
}
Solved! Go to Solution.
Solved by rafael.sansao. Go to Solution.
I tested on the Powermill 2020 and 2021 and it works. Which version are you using?
STRING $Material = ""
STRING LIST $Options = {"Aluminium", "Guss", "Werkzeugstahl"}
INT $result = INPUT CHOICE $Options "Wähle das Material"
If $result == 0 {
$Material = "Aluminium"
} ELSEIF $result == 1 {
$Material = "Guss"
} ELSE {
$Material = "Werkzeugstahl"
}
//Abfrage der Werkzeuge für M4
IF NOT $ENTITY_EXISTS('tool','HSS_NC-Anbohrer_D10,00_90Grad_YG-1_D2306100') {
FORM TOOLDBSEARCH
TOOLDB QUERY SET TOOL_TYPE ALL
TOOLDB QUERY SET STOCK_MATERIAL_ACTIVE
TOOLDB STOCK_MATERIAL SELECT $Material
TOOLDB QUERY SET NAME "HSS_NC-Anbohrer_D10,00_90Grad_YG-1_D2306100"
TOOLDB QUERY PRESET
TOOLDB RESULTS_LIST CREATE NOQUIBBLE ALL
}
//...................
Rafael Sansão
i dont know why but i cloesed everything reopend it and it works without ""
thank you
Can't find what you're looking for? Ask the community or share your knowledge.