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: 

Problem with $tp.Computed information not being updated

0 REPLIES 0
Reply
Message 1 of 1
kjk04166
125 Views, 0 Replies

Problem with $tp.Computed information not being updated

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 zv.pngcom.png

 

Tags (1)
Labels (1)
0 REPLIES 0

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report