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 to generate

6 REPLIES 6
Reply
Message 1 of 7
Ibisu_nert
225 Views, 6 Replies

macro to generate

hello, in my company we work with different parts such as caps, cavities and electrodes. We generate them in two post-processors, such as litz and fanuc.

example of generated folders

FANUC
h:\Cavities\cavity_37

LITZ
l:\Cavities\cavity\37

 

My question is: is there a macro that generates in both places with a different processed post specific for each path, fanuc H: and Litz L:, respecting the Path I put:

for example I put L:\cavities\cavity_37\Tombamentos

the same macro generates and then changes the pos to Fanuc and generates in

H:\cavidades\cavidade_37\Tombamento

6 REPLIES 6
Message 2 of 7
TK.421
in reply to: Ibisu_nert

here's a macro i wrote some time ago that does the same thing. you'll need to change the folder structure and post names of course.

--------------------------------------
the numbers never lie
Message 3 of 7
Ibisu_nert
in reply to: TK.421

I changed the processor folders but it didn't work for me

Message 4 of 7
TK.421
in reply to: Ibisu_nert

can you be a little more specific with the errors? 

--------------------------------------
the numbers never lie
Message 5 of 7

Hi @Ibisu_nert   try this macro. Need to change paths !

 

 

// generate for 2 machines

EDIT NCPROGRAM ALL MESSAGES OFF
EDIT NCPROGRAM ALL COMMANDS BEFORE
EDIT NCPROGRAM ALL COMMANDS "/ {setupsheets.model.file_name}"
TPCOMMANDS ACCEPT

FOREACH ncprogram IN folder('NCProgram') {
ACTIVATE NCPROGRAM $ncprogram.Name
//machine 1
EDIT NCPROGRAM $ncprogram.Name FILENAME "D:\BLOCK\{ncprogram}s.mpf" //your destination folder
EDIT NCPROGRAM $ncprogram.Name TAPEOPTIONS FILEOPEN
"C:\FREZITE\Madeira\Centro de Maquinagem\PowerMILL\ductpost\2024\frezite_CBF-A-SIEMENS-TACV-AB_A8 2024.02.08.pmoptz" //your post 1
NCTOOLPATH APPLY
ACTIVATE NCPROGRAM $ncprogram.Name KEEP NCPROGRAM ; YES

//machine 2
EDIT NCPROGRAM $ncprogram.Name FILENAME "D:\BLOCK\{ncprogram}.tap"
EDIT NCPROGRAM $ncprogram.Name TAPEOPTIONS FILEOPEN
"C:\FREZITE\Madeira\Centro de Maquinagem\PowerMILL\ductpost\2024\Ferrari AUT12-Elexa-9 2024.01.19.pmoptz" //your post 2
NCTOOLPATH APPLY
ACTIVATE NCPROGRAM $ncprogram.Name KEEP NCPROGRAM ; YES
}
TEXTINFO ACCEPT
message info "Pronto!"
// TERMINADO

Message 6 of 7

YOU PT_BR?

Message 7 of 7

PT

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report