Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro Tool DB with Material

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
gosmann.andreas
644 Views, 4 Replies

Macro Tool DB with Material

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
}
4 REPLIES 4
Message 2 of 5

try this:

TOOLDB STOCK_MATERIAL SELECT $Material

Rafael Sansão

EESignature

Message 3 of 5

i tried that dont work

Message 4 of 5

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

EESignature

Message 5 of 5

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.

Post to forums  

Autodesk Design & Make Report