General Commands > About General Commands > model.result()

model.result()
Postprocessing and results interface.
Syntax
model.result().create(<pgtag>,dim);
model.result().create(<pgtag>,ftype);
model.result().autoplot();
model.result().autoplot(<value>);
model.result(<pgtag>).set(property,<value>);
model.result(<pgtag>).run();
 
model.result(<pgtag>).create(<ftag>,ftype);
model.result(<pgtag>).feature(<ftag>).getPlotGroup();
model.result(<pgtag>).feature(<ftag>).getType();
model.result(<pgtag>).feature(<ftag>).getSDim();
model.result(<pgtag>).feature(<ftag>).isPlotGroup();
model.result(<pgtag>).feature(<ftag>).selection(...);
model.result(<pgtag>).feature(<ftag>).set(property,<value>);
model.result(<pgtag>).feature(<ftag>).run();
model.result(<tag>).feature(<ftag>).getAllowedPropertyValues(property);
 
model.result(<pgtag>).feature(<ftag>).create(<attrtag>, attrtype);
model.result(<pgtag>).feature(<ftag>).feature(<attrtag>).set(property,<value>);
 
model.result().dataset().create(<dtag>,dtype);
model.result().dataset(<dtag>).create(<dtag2>,dtype);
model.result().dataset(<dtag>).selection(...);
model.result().dataset(<dtag>).set(property,<value>);
model.result().dataset(<dtag>).getAllowedPropertyValues(property);
 
model.result().export().create(<etag>,<pgtag>,ctype);
model.result().export(<etag>).create(<e2tag>,ctype);
model.result().export(<etag>).set(property,<value>);
model.result().export(<etag>).run();
model.result().export(<etag>).getAllowedPropertyValues(property);
 
model.result().numerical().create(<ntag>,ntype);
model.result().numerical(<ntag>).selection(...);
model.result().numerical(<ntag>).set(property,<value>);
model.result().numerical(<ntag>).run();
 
model.result().table().create(<ftag>,ntype);
model.result().table(<ftag>).setColumnHeaders(<headers>);
model.result().table(<ftag>).setTableData(<realData>,<imagData>);
model.result().table(<ftag>).getColumnHeaders();
model.result().table(<ftag>).getReal();
model.result().table(<ftag>).getImag();
model.result().table(<ftag>).isComplex();
model.result().table(<ftag>).clearTableData();
model.result().table(<ftag>).save(<filename>);
 
model.result().report().create(<rtag>);
model.result().report(<rtag>).getAllowedPropertyValues(property);
model.result().report(<rtag>).set(rprop,<value>);
model.result().report(<rtag>).create(<r2tag>,frtype);
model.result().report(<rtag>).feature(<r2tag>).set(rprop,<value>);
model.result().report(<rtag>).feature(<r2tag>).create(<r3tag>,frtype);
model.result().report(<rtag>).feature(<r2tag>).feature(<r3tag>)set(rprop,<value>);
model.result().report(<rtag>).run();
Description
model.result(<pgtag>) returns a plot group with tag <pgtag>.
model.result().create(<pgtag>,dim) creates a plot group with the tag <pgtag>, of dimension dim, where dim can be 1, 2, or 3.
model.result().create(<pgtag>,ftype) creates a plot group of type ftype.
model.result().autoplot() returns true if plot features are plotted automatically when selected. model.result().autoplot(true) and model.result().autoplot(false) enable and disable automatic plotting, respectively.
model.result(<pgtag>).create(<ftag>,ftype) creates a plot feature of type ftype tagged <ftag> belonging to the plot group <pgtag>.
model.result(<pgtag>).feature(<ftag>).getType() returns the type of the feature <ftag>. This is the same string ftype that was used to create the feature.
model.result(<pgtag>).feature(<ftag>).getSDim() returns the spatial dimension of the plot group.
model.result(<pgtag>).feature(<ftag>).isPlotGroup() return true if the feature is a plot group. This method is also available on the child features.
model.result(<pgtag>).feature(<ftag>).getPlotGroup() returns the plot group the feature belongs to. This method is also available on the child features.
model.result(<pgtag>).feature(<ftag>).create(<attrtag>, attrtype) creates an attribute feature with the tag <attrtag> of type attrtype, belonging to the feature <ftag>.
model.result(<pgtag>).run() plots the plot group.
model.result().dataset().create(<dtag>,dtype) creates a data set feature with the tag <dtag> and the type dtype.
model.result().export().create(<etag>,<pgtag>,etype) creates an export feature with the tag <etag>, belonging to plot group <pgtag> and of export type etype.
model.result().numerical().create(<ntag>, ntype) creates a numerical results feature with the tag <ntag> of the numerical feature type ntype.
model.result().numerical(<ntag>).run() evaluates the numerical results feature.
model.result(<tag>).feature(<ftag>)).getAllowedPropertyValues(property), model.result().dataset(<dtag>).getAllowedPropertyValues(property), model.result().export(<etag>).getAllowedPropertyValues(property), and model.result().report(<rtag>).getAllowedPropertyValues(property)return the set of allowed values for a property if the set is a finite set of strings; otherwise, they return null.
model.result().table().create(<ftag>,ntype) creates a table feature with the tag <ftag>. The set and get methods used to manipulate tables are described in Table.
The data extraction methods used to retrieve plot or numerical data are described in Results.
model.result().report().create(<rtag>,"Report") creates a report with tag <rtag>.
report.create(<tptag>,"TitlePage") adds a title page to the report report. Only one title-page feature can be added.
report.feature("<tptag>).set(prop,value) sets the title-page property prop to the value value.
report().create(<toctag>,"TableOfContents") adds a table of contents to the report report. Only one table-of-contents feature can be added.
report.create(<stag>,"Section") adds an additional section level to a report.
report.feature(<stag>).set(prop,value)
report.feature(<stag>).create(<ftag>),feature)
report.feature(<stag>).feature(<ftag>).set(prop,value)
To add a report contents feature — that is, a feature corresponding to content in the report — to a report section feature section, type, section.create(<frtag>,frtype,…). Depending on the report feature type frtype, the create operation includes zero, one or two tags that refer to the model feature to report about. The tags must refer to an existing feature of the correct type. The following report feature types are available:
To point a report feature rFeature to another feature with tag <ftag> in the tree, use the method rFeature.set("noderef",<ftag>) method. A report contents feature must point to a feature of the type it is designed to report on; see the table above. Instead of a feature tag, set "noderef" to "none" to clear a reference.
model.result().report(<rtag>).feature(<stag>).feature(<frtag>).set(frprop, <value>)
to set a property in a report feature.
Examples
Create a data set and set it to point to the tagged solution sol1 from a solver sequence:
Code for use with Java
model.result().dataset().create("dset", "Solution");
model.result().dataset("dset").set("solution", "Sol1");
Code for use with MATLAB
model.result.dataset.create('dset', 'Solution');
model.result.dataset('dset').set('solution', 'Sol1');
Create a 3D plot group containing a streamline plot and a plane with a contour plot on:
Code for use with Java
result().create("pg1",3);
result("pg1").set("data","dset");
result("pg1").create("stream","Streamline");
model.result("pg1").feature("stream").set("expr", new String[]{"2-x", "0", "z"});
model.result("pg1").feature("stream").selection().set(new int[]{2});
result().dataset().create("cutp1","CutPlane");
result("pg1").create("cont1","Contour");
result("pg1").feature("cont1").set("data","cutp1");
result("pg1").run();
Code for use with MATLAB
result.create('pg1',3);
result('pg1').set('data','dset');
result('pg1').create('stream','Streamline');
model.result('pg1').feature('stream').set('expr', {'2-x', '0', 'z'});
model.result('pg1').feature('stream').selection.set(2);
result.dataset.create('cutp1','CutPlane');
result('pg1').create('cont1','Contour');
result('pg1').feature('cont1').set('data','cutp1');
result('pg1').run;