Message 1 of 1
Problem with $tp.Computed information not being updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am a beginner Korean. I need your help...
STRING $msg = ""
INT $start_time = 0
INT $tp_time = 0
INT $final_time = 0
INT $count = 0
ENTITY LIST $calculate_Toolpaths = Input Entity Multiple Toolpath"Select the toolpath to calculate."
INFOBOX NEW "Batch Time Process"
INFOBOX STYLE "NORMAL"
foreach $tp in calculate_Toolpaths {
$msg = " TOOLPATH: '" + $tp.Name +"' ->"
INFOBOX APPEND $msg
if not ( $tp.Computed) {
if ($tp.batch == 0) {
$msg = " Batch Process Off " + CRLF
} else {
DIALOGS MESSAGE OFF
DIALOGS ERROR OFF
ACTIVATE TOOLPATH $tp.name
$start_time = time()
EDIT TOOLPATH $tp.Name CALCULATE
$tp_time = time() - $start_time
if not ( $tp.Computed) {
$msg = " Could not Calculate!!!" + CRLF
} else {
$msg = " " + $time_to_string($tp_time ,"S") + CRLF
$final_time = $final_time + $tp_time
$count = $count + 1
}
}
} else {
$msg = " Already Calculated" + CRLF
}
DIALOGS MESSAGE ON
INFOBOX APPEND $msg
}
DIALOGS MESSAGE ON
DIALOGS ERROR ON
$msg = " Total Time for " + $count + " toolpaths: "+ time_to_string($final_time ,"S") + CRLF
INFOBOX APPEND $msg
It's part of the macro I'm making with reference to the forum.
Usually I know you use this phrase. ' foreach $tp in FOLDER ('toolpath') ' ----- This syntax works fine,
if I use ' ENTITY LIST $calculate_Toolpaths = Input Entity Multiple Toolpath"Select the toolpath to calculate. '
The toolpath is calculated normally, but the $tp.Computed value is still zero.
I need your help