Setting Graphics View Options

You can use this command to access options for showing or hiding a few objects in the graphics view:

Graphics.ViewOptions

Supported graphical view properties are listed below.

PropertyDescription
ShowLegendGets or sets whether a legend is shown for the result object.
ShowTriadGets or sets whether the triad is shown.
ShowRulerGets or sets whether the ruler is shown.
ResetResets the graphics view properties to the defaults.
ShowMeshGets or sets whether to display the model’s mesh.
ShowRandomColorsGets or sets whether to show random colors for each object of the application.
ShowVerticesGets or sets whether to display all the vertices of the model.
ShowClusteredVerticesGets or sets whether to display all closely clustered vertices of the model.
ShowEdgeDirectionGets or sets whether to display the edge direction arrow.
ShowMeshConnectionGets or sets whether to display edge connection using a color scheme based on the mesh connection information.
ShowThickEdgeScopingGets or sets whether to thicken the display of edge scoping.
ModelDisplayGets or sets the model display options.
ModelColoringGets or sets the model display coloring options.
RescaleAnnotationsRescales the size of annotations following a zoom in or zoom out of the model.
ShowCoordinateSystemsGets or sets whether to display all defined coordinate systems.
ClusteredVertexToleranceGets or set the clustered vertices tolerance value.
ShowBeamThicknessGets or sets whether to display the thickness of beams.
ShowShellThicknessGets or sets whether to display the thickness of shells.
ShowSPHExpansionGets or sets whether to display the expansion for sph elements.
ShowRemotePointConnectionsGets or sets whether to display the Remote Point Connections.

Code Examples

This code hides the ruler and the triad and shows the legend for the active result:

Graphics.ViewOptions.ShowRuler = False
Graphics.ViewOptions.ShowLegend = True
Graphics.ViewOptions.ShowTriad = False

This code modifies the global view options settings by rescaling the annotations, setting the model display by shaded exterior, model coloring by material, setting the clustered vertex tolerance to 0.5 and displaying the clustered vertices:

Graphics.ViewOptions.RescaleAnnotations() 
Graphics.ViewOptions.ModelDisplay = ModelDisplay.ShadedExterior 
Graphics.ViewOptions.ModelColoring = ModelColoring.ByMaterial 
Graphics.ViewOptions.ClusteredVertexTolerance = Quantity( 0.5, 'm')  
Graphics.ViewOptions.ShowClusteredVertices = True

This code displays connection lines between geometry and Remote Points or between supported remote boundary conditions and Remote Points.

Graphics.ViewOptions.ShowRemotePointConnections = True

For information about legend settings for Mechanical results, see Working with Legends.