Program List

Program List

Anonymous
Not applicable
1,137 Views
13 Replies
Message 1 of 14

Program List

Anonymous
Not applicable

Hello how can I make a macro with the program list, where I select the programs in which I want to rewrite.
I was trying to do this, but this error is returning.

 

ENTITY LIST $Selected_ncprogram = INPUT ENTITY MULTIPLE ncprogram "Select program"

FOREACH $tp in ProgramNames {
ACTIVATE NCPROGRAM $tp.Name
KEEP NCPROGRAM
}

0 Likes
Accepted solutions (3)
1,138 Views
13 Replies
Replies (13)
Message 2 of 14

rui_rita
Advocate
Advocate
Accepted solution

Hi @Anonymous

 

ENTITY LIST $Selected_ncprogram = INPUT ENTITY MULTIPLE ncprogram "Select program"
EXPLORER SELECT NCPROGRAM root
FOREACH $tp in $Selected_ncprogram {
EXPLORER SELECT NCProgram $tp.name TOGGLE
}
KEEP NCPROGRAM SELECTED



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
Message 3 of 14

Anonymous
Not applicable
thank you very much
0 Likes
Message 4 of 14

rui_rita
Advocate
Advocate

No problem.

Mark as solved, so others users can see 

Thank you



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
0 Likes
Message 5 of 14

Anonymous
Not applicable

Hello,
I'm trying to do the following operations in the same macro, but this one giving error. what am I doing wrong?
 

 

 

 

ENTITY LIST $Selected_ncprogram = INPUT ENTITY MULTIPLE ncprogram "Select program"
EXPLORER SELECT NCPROGRAM root
FOREACH $tp in $Selected_ncprogram {

EXPLORER SELECT NCProgram $tp.name TOGGLE

}

EDIT NCPROGRAM SELECTED TAPEOPTIONS FILEOPEN "C:\Users\Rodolfo\Desktop\Haas.pmoptz"
KEEP NCPROGRAM SELECTED

EDIT NCPROGRAM SELECTED TAPEOPTIONS FILEOPEN "C:\Users\Rodolfo\Desktop\Romi.pmoptz"
KEEP NCPROGRAM SELECTED

EXPORT SETUPSHEETS NCPROGRAM ALL

0 Likes
Message 6 of 14

rui_rita
Advocate
Advocate

Hi @Anonymous

 

Can you tell me in wich line it gives you the error?



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
0 Likes
Message 7 of 14

Anonymous
Not applicable

Hello,


The error occurs in this line:

EDIT NCPROGRAM SELECTED TAPEOPTIONS FILEOPEN "C:\Users\Rodolfo\Desktop\Romi.pmoptz"

0 Likes
Message 8 of 14

rui_rita
Advocate
Advocate

Hi @Anonymous

 

I can see any problem can you put a picture with the error

 



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
0 Likes
Message 9 of 14

Anonymous
Not applicable

Follow the image of the error, it is in Portuguese

0 Likes
Message 10 of 14

rui_rita
Advocate
Advocate

Ola @Anonymous

 

I run you code and didn't get any error.

please see you macro code, or attach your macro here



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
0 Likes
Message 11 of 14

Anonymous
Not applicable

Hello

follows the macro

Message 12 of 14

rafael.sansao
Advisor
Advisor
Accepted solution

This error occurs because your macro is not selecting any NC program in the Powermill explorer.
Try this:

ENTITY LIST $Selected_ncprogram = INPUT ENTITY MULTIPLE ncprogram "Select program"
EXPLORER SELECT NCPROGRAM root
FOREACH $nc in $Selected_ncprogram {
	STRING $full_path = pathname('ncprogram',$nc.name)
	EXPLORER SELECT NCProgram $full_path TOGGLE
}
EDIT NCPROGRAM SELECTED TAPEOPTIONS FILEOPEN "C:\Users\Rodolfo\Desktop\Haas.pmoptz"
KEEP NCPROGRAM SELECTED YES

EDIT NCPROGRAM SELECTED TAPEOPTIONS FILEOPEN "C:\Users\Rodolfo\Desktop\Romi.pmoptz"
KEEP NCPROGRAM SELECTED YES

EXPORT SETUPSHEETS NCPROGRAM ALL

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

Message 13 of 14

rui_rita
Advocate
Advocate
Accepted solution

Hi

 

The error that @Anonymous gets is not because there is no selection, but because of the query that appears tor overwrite the nc files.

 

never the less the solution from @rafael.sansao solves that issue, and solves the problem if you select ncprograms in a folder.

 

thank you @rafael.sansao 😉

 

 



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.
Message 14 of 14

Anonymous
Not applicable
Hello,

Now it works

thank you