model.view() returns a list of view that can be used when viewing geometry/mesh and plot groups. Each view has an axis and some properties on the top level. In 3D a view also has a camera and a list of lights. All views also have a list of hide features.
model.view().create(<vtag>,<gtag>) creates a view tied to the geometry with the given tag. The dimension of the view is the same as the dimension for the geometry.
model.view().create(<vtag>,<viewdim>) creates a view with the given tag for the given dimension (1, 2, or 3). These views are not tied to any geometry and show up under the Views node under Results in the COMSOL Desktop.
model.view().create(<vtag>,<gtag>,<workplane>) creates a view tied to the work plane with the given tag in the geometry sequence with the given tag. The dimension of the view is 2.
model.view(<vtag>).set(<pname>,<pvalue>) sets the given property to the given value.
model.view(<vtag>)
.getType(<pname>) returns the property with the given name of type
Type.
model.view(<vtag>).axis().getType(<pname>) returns the axis property with the given name.
model.view(<vtag>).camera().getType(<pname>) returns the camera property with the given name.
model.view(<vtag>).light().create(<ltag>,<ltype>) creates a light with the given tag and type.
<ltype> can be any of
'DirectionalLight',
'PointLight',
'SpotLight', and
'HeadLight'.
model.view(<vtag>).light(<ltag>).getType(<pname>) returns the light property with the given name.
model.view(<vtag>)
.hideObjects().create(<htag>) creates a hide feature of geometric objects in the geometry sequence. The API for controlling it is similar to the API for selection in the geometry sequence; see
Geometry Object Selection Methods under
model.geom().
model.view(<vtag>)
.hideEntities().create(<htag>) creates a hide feature of geometric entities in the analyzed geometry used, for example, for the physics. The API for controlling it is similar to the API for selections on the finalized geometry; see
model.selection().
model.view(<vtag>)
.hideMesh().create(<htag>) creates a hide feature of geometric entities in the analyzed geometry from an imported mesh used, for example, for the physics. The API for controlling it is similar to the API for selections on the finalized geometry; see
model.selection(). For example, the following code hides boundary 4 in the geometry based on the mesh in
mesh1: