Jump to content

Recommended Posts

When I run this command using below tcl

hv -b -tcl Image_Capture1.tcl example.modl example.res


This is the results log I see on my linux terminal:


Loading Report...
Applying Report...


It's stuck at "Ready" and unless I press Ctrl+c or enter it doesn't exit back to terminal. How can I make the code to exit to terminal after the proc is over?

proc BatchMain { } {
set inputdeck [lindex $::argv 6]
set resultfile [lindex $::argv 7]
puts $inputdeck
puts $resultfile
set t [::post::GetT]
hwi GetSessionHandle sess$t
sess$t GetProjectHandle proj$t
hwi OpenStack
sess$t LoadReport Batch_Process.tpl
sess$t ApplyReport Batch_Process replace true false 2 $inputdeck $resultfile
set numpages [proj$t GetNumberOfPages];
for {set i 1} {$i <= $numpages} {incr i} {
proj$t SetActivePage $i
proj$t GetPageHandle pg$t $i
pg$t Draw
pg$t ReleaseHandle
sess$t CaptureScreen png image_$i.png

hwi CloseStack
proj$t ReleaseHandle
sess$t Close





Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...