- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a macro to rename all NCPROGRAMS in tree.
Reset localvars
//Deseja alterar todos os nome dos NCPROGRAMS ?
string yesorno = "Clica SIM, para renomear os Ncprograms" + crlf + "Clica NAO, para cancelar a macro"
bool yes = 0
$yes = QUERY $yesorno
IF yes {
STRING $nombre = ""
INT $COUNT = INPUT "Introduz numero do primeiro programa"
// Nomear todos os Ncprograms ou só os selecionados
string allorno = "Click SIM, para renomear os Ncprograms" + crlf + "Clica NAO, outras opcoes"
bool yes = 0
$yes = QUERY $allorno
IF $yes == 1 {
// Numerar todos os Ncprograms
FOREACH Ncp IN folder ('NCProgram') {
ACTIVATE NCPROGRAM $Ncp.name
STRING NewName = ($nombre + $COUNT)
$COUNT = $COUNT + 1
RENAME NCPROGRAM ; $NewName
}
}
The problem is: this macro rename all programs inside NCPROGRAM tree.
Is it possible rename the programs only inside ACTIVE FORDER ? (Red Arrow)
Thanks in advance
With best regards
Pedro Valente
Solved! Go to Solution.