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

9 REPLIES 9
Reply
Message 1 of 10
Ibisu_nert
779 Views, 9 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

9 REPLIES 9
Message 2 of 10
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.

--------------------------------------
Former Expert Elite Member (not enough participation in all their webinars and other "stuff", even though I beta test and regularly contribute to the betterment of the software and the PowerMill community as a whole)

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

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

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

can you be a little more specific with the errors? 

--------------------------------------
Former Expert Elite Member (not enough participation in all their webinars and other "stuff", even though I beta test and regularly contribute to the betterment of the software and the PowerMill community as a whole)

the numbers never lie
Message 5 of 10

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 10

YOU PT_BR?

Message 7 of 10

PT
Message 8 of 10
Ibisu_nert
in reply to: Ibisu_nert


does not execute. When debugging nothing happens, my powermil is 2020
maybe for this
Message 9 of 10
TK.421
in reply to: Ibisu_nert

did you change the extension from .txt to .mac? the debugger should show you errors

--------------------------------------
Former Expert Elite Member (not enough participation in all their webinars and other "stuff", even though I beta test and regularly contribute to the betterment of the software and the PowerMill community as a whole)

the numbers never lie
Message 10 of 10

Did you change the paths and post files?

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

Post to forums  

Autodesk Design & Make Report