Magma TCL Scripting III

Status
Not open for further replies.

praneshcn

Member level 5
Joined
Aug 23, 2007
Messages
90
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,899
Hi ,

I want to dump the information given by the following script in a file. Could anyone help me out on the syntax.......................


data loop cell "model_cell -cell_type standard" $m
{
set aaa [ query location cell $cell ]
puts "force location cell $cell $aaa"
}

I want the statements which are printed bcoz of the "puts" statement to be dumped in a file.
any suggestions.

thankz
 

Try this

set outfile [ open loaction.tcl w ]
data loop cell "model_cell -cell_type standard" $m
{
set aaa [ query location cell $cell ]
puts $outfile "force location cell $cell $aaa"
}
 

    praneshcn

    Points: 2
    Helpful Answer Positive Rating
1 set outfile [ open loaction.tcl w ]
2 data loop cell "model_cell -cell_type standard" $m
3 {
4 set aaa [ query location cell $cell ]
5 puts $outfile "force location cell $cell $aaa"
6 }

Hi vak,

Could u explain the first line syntax please and also the addition made to line no 5. what is the use of that "open loaction.tcl w" and saving it to an attribute outfile. I tried this script and it is working correctly. Could u suggest some materials for learning tcl or more precisely m-tcl. till nw i am following the user guide and am not able to implement it to practical applications.

Thankz for ur prompt reply.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…