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(<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. The valid types are
"PlotGroup1D",
"PlotGroup2D",
"PlotGroupe3D",
"PolarGroup", and
"SmithGroup".
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(<pgtag>).feature(<ftag>).prepareView(<value>) returns the view to use when plotting the plot group to which the feature belongs. The argument is a Boolean, and if
true, the view is created if needed.
model.result().dataset().create(<dtag>,dtype) creates a dataset 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().dataset(<dtag>).refresh() updates Grid dataset using data from functions that read files (Elevation, Image, and Interpolation).
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.
model.result().report().create(<rtag>,"
Report") creates a report with tag
<rtag>.
model.result().report().create(<ptag>,"
Presentation") creates a presentation with tag
<ptag>.
model.result().report().create(<ttag>,"
Template") creates a report template with tag
<ttag>. Such report templates are customized alternatives to the built-in templates: brief, intermediate, and complete. A complete report template contains a single instance of each of the regular model-contents report features. When a model-contents report feature occurs in a template, the available properties match those of the corresponding regular report feature. However, some regular report-feature properties, such as the
noderef property for referencing the model feature to report on, are not applicable and therefore not available.
To set up a template template, you can build it feature by feature or use one of the built-in templates as the starting point and then generate it before customizing the settings:
template.set("level", lvalue);
template.set("absentnodes",state);
template.generate();
The allowed values for the level property are
"brief",
"intermediate" (default), and
"complete". The value of this property is also used to define the initial settings when building the template manually. The
absentnodes property can take two values:
•
|
"exclude" (default) — template nodes that are absent from or disabled in the template are excluded when generating a report using the template;
|
•
|
"include" — conversely, template nodes that are absent from or disabled in the template are included when generating a report using the template.
|
Having created the report report, specify which template to use and then generate contents:
report.set("template", value);
report.generate();
The allowed values for the template property depends on the availability of custom templates in the model, the installation, and the user’s report templates directory:
•
|
If the directory data/reporttemplates under the COMSOL Multiphysics installation root directory contains MPH-files with report templates, these can be chosen by setting template to "installation.<TemplateFilename>.<ttag>". Here installation is a fixed namespace prefix, <TemplateFilename>.mph is the name of the MPH-file, and <ttag> is a report template tag.
|
•
|
Finally, if the reporttemplates directory under the user settings directory .comsol/v56 under your local home directory contains MPH-files with report templates, these are chosen using the same pattern as for installation templates with the difference that the namespace prefix is user.
|
Note that if report already has child nodes when
report.generate() is called, these nodes will be removed before the generation of new contents.
model.result().report().create(<ttag>,"
PresentationTemplate") creates a presentation template with tag
<ttag>. Such presentation templates are customized alternatives to the built-in templates: default and detailed. A complete presentation template contains a single instance of each of the regular model-contents presentation features. When a model-contents presentation feature occurs in a template, the available properties match those of the corresponding regular presentation feature. However, some regular presentation-feature properties, such as the
noderef property for referencing the model feature to include, are not applicable and therefore not available.
report.create(<tptag>,"
TitlePage") adds a title page to the report
report. Only one title-page feature can be added.
report.create(<tptag>,"
TitleSlide") adds a title slide to the presentation
presentation. Only one title-slide 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.create(<stag>,"
SectionSlide") adds a section slide to the presentation
presentation.
report.feature(<stag>).set(prop,value)
report.feature(<stag>).create(<ftag>),feature)
report.feature(<stag>).feature(<ftag>).set(prop,value)
To add a report or presentation contents feature — that is, a feature corresponding to content in the report or presentation — to a section feature section, type,
section.create(<frtag>,frtype,…). Depending on the feature type
frtype, the create operation includes zero, one, or two tags that refer to the model feature to include. The tags must refer to an existing feature of the correct type. The feature types that are available for reporting on the model contents are listed in
Table 2-108. For details on their usage, see the section
Model Contents — Report Components in the
COMSOL Multiphysics User’s Guide.
In addition, the custom feature types listed in Table 2-109 are also available for building reports and presentations. Their usage is described in the section
Custom Report, Documentation, and Presentation Components in the
COMSOL Multiphysics User’s Guide.
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.