Macro not showing query to overwrite existing file

Macro not showing query to overwrite existing file

zohaib4948
Contributor Contributor
244 Views
2 Replies
Message 1 of 3

Macro not showing query to overwrite existing file

zohaib4948
Contributor
Contributor

Hi respected seniors

      I have aquestion, I have created a macro to create nc programs of selected toolpaths and then write them, It is working good but when selected nc program already write then there is no query to ovewrite it and it write it strightly

macro attached below

I want that when i run this macro if nc programe already write then it ask me to overwrite it if i say yes it write if i say no it don't

 

DIALOGS MESSAGE ON

Capture.PNG

DIALOGS ERROR ON
FOREACH $Selected_TP IN (explorer_selected_entities()) {
CREATE NCPROGRAM $Selected_TP.name EDIT NCPROGRAM $Selected_TP.name APPEND TOOLPATH $Selected_TP.name DEACTIVATE NCPROGRAM
}
FOREACH $Selected_ncp IN (explorer_selected_entities()) {
ACTIVATE NCPROGRAM $Selected_ncp KEEP NCPROGRAM ;
YES
}

0 Likes
245 Views
2 Replies
Replies (2)
Message 2 of 3

kevin.hammond3WX4X
Advocate
Advocate

Have you got both dialogs and messages set to on?

 

Use the commands below in your macro before the command to write the nc programs, they can turned off again if required after that part of the macro

 

dialogs message on
dialogs error on

 

Regards Kevin

0 Likes
Message 3 of 3

Carlos.PintoLRW5G
Enthusiast
Enthusiast

Hi, just remove the "YES"

 

DIALOGS ERROR ON
FOREACH $Selected_TP IN (explorer_selected_entities()) {
CREATE NCPROGRAM $Selected_TP.name EDIT NCPROGRAM $Selected_TP.name APPEND TOOLPATH $Selected_TP.name DEACTIVATE NCPROGRAM
}
FOREACH $Selected_ncp IN (explorer_selected_entities()) {
ACTIVATE NCPROGRAM $Selected_ncp KEEP NCPROGRAM ;
}

0 Likes