🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

how to extract time step and corresponding contour value by using TCL/tk

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

1.) I want to extract data for only specific set of elements but  I am getting contour value all element. I don't know what is mistake

 

proc QueryAndExportELEM {FileName} {

    mh GetSelectionSetHandle ssh [mh AddSelectionSet element]
    ssh Clear
    ssh Add 'dimension 2'
    ssh Add 'dimension 3'
 
 foreach elem {11 22} {
     ssh Add 'id $elem'
     mh GetQueryCtrlHandle qc
    qc SetSelectionSet [ssh GetID]
    qc SetQuery 'element.id contour.value'
    qc GetIteratorHandle qciter
   
    puts 'Element ID: $elem'
  
    set fp [open $FileName w]
  
    for {qciter First} {[qciter Valid]} {qciter Next} {
    puts $fp [regsub -all \{ [regsub -all \} [qciter GetDataList] ''] ''] }
    close $fp
   
     mh RemoveSelectionSet [ssh GetID'] 
  
     qc ReleaseHandle 
     qciter ReleaseHandle
 }
   ssh ReleaseHandle
 
 }

 

 2.)  How I can extract time step and corresponding contour value to .csv file by using TCL/tk. ??

Find more posts tagged with

Sort by:
1 - 6 of 61