cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

how the list of param values stored in jtable ???

vdayalan
1-Newbie

how the list of param values stored in jtable ???

can anyone tell me how could we stored the list of param names, types and values in j table????

4 REPLIES 4
sjuraj
13-Aquamarine
(To:vdayalan)

You have to use J-link to collect parameters datas and insert it to JTable (synchornous mode) or use another API (Web-link, VB, Toolkit) to collect datas and pass it to Java app that creates JTable (asynchronous mode).

ddhini
14-Alexandrite
(To:vdayalan)

ArrayList<String> paramnamelist = new ArrayList<String>();

Parameters s=model.ListParams();//get all the parameter name

  for(int i =0;i<s.getarraysize();i++){

  //get the param name

  String ae=s.get(i).GetName();

  paramnamelist.add(ae);

  }

use this to get all the parameter name .After that get the individual values that you needed .

RPN
17-Peridot
17-Peridot
(To:vdayalan)

In Tcl I found this:

proc GetParamToCSV {model} {

set del ";"

set fp [open param.csv w]

puts $fp [join [list Name Type Value] $del]

foreach paramObj [lsort -dictionary [ps_param  list -model $model] ] {

   set nam [$paramObj cget -name]

   set val [$paramObj cget -value]

   set typ [$paramObj cget -type]

   puts $fp [join [list $nam $typ $val] $del]

  }

close $fp

}


GetParamToCSV box.prt

sjuraj
13-Aquamarine
(To:RPN)

Why do you use tcl ? What is your goal ? Solution of dhini dhini‌ with ArrayList is good.

Top Tags