Skip to main content
1-Visitor
Apr 24, 2017 5:11 AM UTC
Question

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

15-Moonstone
Apr 27, 2017 10:09 AM UTC

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).

Translate
1-Visitor
Apr 28, 2017 10:13 AM UTC

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 .

Translate
RPN
18-Opal
Apr 30, 2017 1:43 PM UTC

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

Translate
15-Moonstone
May 2, 2017 4:52 AM UTC

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

Translate