Canvas#

Canvas commands are used to create, position, and modify canvas objects. The Canvas commands need only the abaqus module to be imported; no additional modules need to be imported.

Create layers in a viewport#

Viewport#

class Viewport(name: str, origin: tuple[float] = (), width: float = 120, height: float = 80, border: BooleanType = 1, titleBar: BooleanType = 1, titleStyle: SymbolicConstantType = 'SYSTEM', customTitleString: str = '')[source]#

Methods

Layer(name[, copyViewName])

This method creates a Layer object in the Layer repository.

Layer(name: str, copyViewName: str = '') Layer[source]#

This method creates a Layer object in the Layer repository.

Parameters:
name

A String specifying the repository key.

copyViewName

A String specifying the name of the layer to copy.

Returns:
A Layer object.

Notes

This function can be accessed by:

session.viewports[name].Layer

Object features#

Annotation features of Viewport#

class AnnotationViewport(name: str, origin: tuple[float] = (), width: float = 120, height: float = 80, border: BooleanType = 1, titleBar: BooleanType = 1, titleStyle: SymbolicConstantType = 'SYSTEM', customTitleString: str = '')[source]#

The following commands operate on Viewport objects. For more information about the Viewport object, see Viewport object.

Notes

This object can be accessed by:

import annotationToolset

Methods

plotAnnotation(annotation[, index])

This method plots an Annotation object in aViewport.

plotAnnotation(annotation: Annotation, index: str = 0.0)[source]#

This method plots an Annotation object in aViewport.

Parameters:
annotation

An Annotation object to plot.

index

An Int specifying the index of the Annotation object in the sequence of annotations to plot. The default value is zero.

AttributeColorMap#

class AttributeColorMap[source]#

The AttributeColorMap object is used to store values and attributes associated with AttributeColorMap type objects. AttributeColorMap objects can be modified using the methods described below. The methods accessed via the Viewport object cause the AttributeColorMap object to be updated in the session.viewports[name].colorMappings repository.

Notes

This object can be accessed by:

session.viewports[name].colorMappings[name]
Attributes:
mapType: SymbolicConstant

A SymbolicConstant specifying the type of AttributeColorMap . Possible values are MATERIAL_MAP, SECTION_MAP, PART_MAP, ELSET_MAP, AVERAGING_REGION_MAP, and ELTYPE_MAP.

overrides: dict

A Dictionary object specifying a color mapping. Each key is of String type and specifies an attribute in the map; the corresponding values specify the color definition to apply to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines the active status for the attribute. For example:overrides={ ‘Part-1’:(1,’00FF00’, ‘00CCFF’, ‘00FF00’)}

defaultOverrides: dict

A Dictionary object specifying a custom color mapping similar to overrides. For example:`defaultOverrides={ ‘Copper’:(1,’’00FF00’, ‘00CCFF’, ‘00FF00’)}`The color mapping can contain keys that have not been created. When the key is created, it gets the appropriate values from this mapping.

attributeColors: dict

A Dictionary object specifying the color settings of each attribute as described in the [updateOverrides ](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-c-attributecolormappyc.htm?ContextScope=allsimaker-attributecolormapupdateoverridespyc)method.

Methods

setDefaults()

This method resets the AttributeColorMap object to its default state.

setValues([overrides, defaultOverrides])

This method modifies the AttributeColorMap object.

updateOverrides([overrides, defaultOverrides])

This method specifies additional overrides to be added to the current object definition.

setDefaults()[source]#

This method resets the AttributeColorMap object to its default state.

setValues(overrides: dict | None = None, defaultOverrides: dict | None = None)[source]#

This method modifies the AttributeColorMap object.

Parameters:
overrides

A Dictionary object specifying a color mapping. Each key is of String type and specifies an attribute in the map; the corresponding values specify the color definition to apply to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines the active status for the attribute. For example:overrides={ ‘Part-1’:(1,’#00FF00’, ‘#00CCFF’, ‘#00FF00’)}

defaultOverrides

A Dictionary object specifying a custom color mapping similar to overrides. For example:`defaultOverrides={ ‘Copper’:(1,’’#00FF00’, ‘#00CCFF’,

‘#00FF00’)}`The color mapping can contain keys that have not been

created. When the key is created, it gets the appropriate values from this mapping.

updateOverrides(overrides: dict | None = None, defaultOverrides: dict | None = None)[source]#

This method specifies additional overrides to be added to the current object definition.

Parameters:
overrides

A Dictionary object specifying a color mapping. Each key is of String type and specifies an attribute in the map; the corresponding values specify the color definition to apply to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines the active status for the attribute. For example:overrides={ ‘Part-1’:(1,’#00FF00’, ‘#00CCFF’, ‘#00FF00’)}

defaultOverrides

A Dictionary object specifying a custom color mapping similar to overrides. For example:`defaultOverrides={ ‘Copper’:(1,’’#00FF00’, ‘#00CCFF’,

‘#00FF00’)}`The color mapping can contain keys that have not been

created. When the key is created, it gets the appropriate values from this mapping.

Canvas#

class Canvas[source]#

Displayable#

class Displayable[source]#

DrawingArea#

class DrawingArea[source]#

The DrawingArea object specifies the location and size of the drawing area used for placement of viewports.

Notes

This object can be accessed by:

session.drawingArea
Attributes:
width: float

A Float specifying the width in millimeters.

height: float

A Float specifying the height in millimeters.

origin: tuple[float]

A pair of Floats specifying the coordinates of the bottom left hand corner in millimeters.

Highlight#

ImageOptions#

class ImageOptions[source]#

The ImageOptions object stores settings that control how an image is rendered in a particular viewport. ImageOptions objects are accessed from the image options associated with a particular viewport. The ImageOptions object has no constructor; Abaqus creates the imageOptions member for a viewport when the viewport is created using the values in the imageOptions member of the current viewport.

Notes

This object can be accessed by:

session.viewports[name].imageOptions

Methods

setValues([imageName, showImage, ...])

This method modifies the ImageOptions object.

setValues(imageName: str = '', showImage: BooleanType = 0, positionMethod: SymbolicConstantType = 'FIT_TO_VIEWPORT', fitMethod: SymbolicConstantType = 'BEST_FIT', alignment: SymbolicConstantType = 'CENTER', xScale: float = 1, yScale: float = 1, origin: tuple[float] = (), translucency: float = 1, options: str | None = None)[source]#

This method modifies the ImageOptions object.

Parameters:
imageName

A String specifying the name of the image. A list of valid image names is in the images repository in the session object.

showImage

A Boolean specifying whether an image should be displayed in the viewport background. The default value is OFF.

positionMethod

A SymbolicConstant specifying which positioning method is used to determine how the image will be scaled and positioned in the viewport. Possible values are:FIT_TO_VIEWPORT, specifying a display mode where the image is scaled to fit in the viewport using the specified fitMethod.AUTO_ALIGN, specifying a display mode where the image is scaled as specified by xScale and yScale and then positioned in the viewport using the specified alignment.MANUAL, specifying a display mode where the image is scaled as specified by xScale and yScale and then positioned in the viewport using the specified origin.The default value is FIT_TO_VIEWPORT.

fitMethod

A SymbolicConstant specifying which type of fit is performed to scale and position the image in the viewport when positionMethod =FIT_TO_VIEWPORT. Possible values are:BEST_FIT, specifying a mode where the image is scaled to completely fit within the viewport.FIT_WIDTH, specifying a mode where the image width is scaled to match the viewport width.FIT_HEIGHT, specifying a mode where the image height is scaled to match the viewport height.The default value is BEST_FIT.

alignment

A SymbolicConstant specifying the relative position of the image in the viewport when positionMethod =AUTO_ALIGN. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is CENTER.

xScale

A Float specifying the scale applied to the image width. The xScale argument is ignored when positionMethod =FIT_TO_VIEWPORT. The default value is 1.0.When xScale is negative, the image is mirrored about its y-axis but its position is not affected.

yScale

A Float specifying the scale applied to the image height. The yScale argument is ignored when positionMethod =FIT_TO_VIEWPORT. The default value is 1.0.When yScale is negative, the image is mirrored about its x-axis but its position is not affected.

origin

A pair of Floats specifying the X- and Y-offsets in millimeters from the lower-left corner of the viewport. The origin argument is ignored unless positionMethod =MANUAL. The default value is (0, 0).

translucency

A Float specifying the translucency factor to use when displaying the image. Possible values are 0.0 ≤≤ translucency ≤≤ 1.0 with 0.0 being invisible and 1.0 being opaque. The default value is 1.0.

options

None or an ImageOptions object specifying the object from which values are to be copied. If other arguments are also supplied to setValues, they will override the values in the options member. The default value is None.

Raises:
RangeError

Layer#

class Layer(name: str, copyViewName: str = '')[source]#

Objects can be superimposed by displaying them in different layers of a viewport.

Notes

This object can be accessed by:

session.viewports[name].layers[name]
Attributes:
displayedObject: Displayable

A Displayable object specifying the object to be displayed. The Displayable type is an abstract generalization. The concrete possible types are Part, Assembly, ConstrainedSketch, Odb, or XYPlot.

view: View

A View object specifying the object that controls viewing of the layer.

odbDisplay: OdbDisplay

An Odb`Display object specifying the display options for the Odb object.

partDisplay: PartDisplayOptions

A Part`DisplayOptions object specifying the display options for the Part object.

assemblyDisplay: AssemblyDisplayOptions

An Assembly`DisplayOptions object specifying the display options for the Assembly object.

Methods

moveAfter(name)

This method moves the layer object after another object in the layer repository.

moveBefore(name)

This method moves the layer object before another object in the layer repository.

moveAfter(name: str)[source]#

This method moves the layer object after another object in the layer repository.

Parameters:
name

A String specifying the name of the other Layer object.

moveBefore(name: str)[source]#

This method moves the layer object before another object in the layer repository.

Parameters:
name

A String specifying the name of the other Layer object.

MovieOptions#

class MovieOptions[source]#

The MovieOptions object stores settings that control how the movie background for an animation is rendered in a particular viewport. MovieOptions objects are accessed from the movie options associated with a particular viewport. The MovieOptions object has no constructor; Abaqus creates the movieOptions member for a viewport when the viewport is created using the values in the movieOptions member of the current viewport.

Notes

This object can be accessed by:

session.viewports[name].movieOptions

Methods

setValues([movieName, showMovie, ...])

This method modifies the MovieOptions object.

setValues(movieName: str = '', showMovie: BooleanType = 0, positionMethod: SymbolicConstantType = 'FIT_TO_VIEWPORT', fitMethod: SymbolicConstantType = 'BEST_FIT', alignment: SymbolicConstantType = 'CENTER', xScale: float = 1, yScale: float = 1, origin: tuple[float] = (), translucency: float = 1, options: str | None = None)[source]#

This method modifies the MovieOptions object.

Parameters:
movieName

A String specifying the name of the movie. A list of valid movie names is in the movies repository in the session object.

showMovie

A Boolean specifying whether a movie should be displayed in the viewport during an animation. The default value is OFF.

positionMethod

A SymbolicConstant specifying which positioning method is used to determine how the movie frames will be scaled and positioned in the viewport. Possible values are:FIT_TO_VIEWPORT, specifying a display mode where the movie frame is scaled to fit in the viewport using the specified fitMethod.AUTO_ALIGN, specifying a display mode where the movie frame is scaled as specified by xScale and yScale and then positioned in the viewport using the specified alignment.MANUAL, specifying a display mode where the movie frame is scaled as specified by xScale and yScale and then positioned in the viewport using the specified origin.The default value is FIT_TO_VIEWPORT.

fitMethod

A SymbolicConstant specifying which type of fit is performed to scale and position the movie frame in the viewport when positionMethod =FIT_TO_VIEWPORT. Possible values are:BEST_FIT, specifying a mode where the movie frame is scaled to completely fit within the viewport.FIT_WIDTH, specifying a mode where the movie frame width is scaled to match the viewport width.FIT_HEIGHT, specifying a mode where the movie frame height is scaled to match the viewport height.The default value is BEST_FIT.

alignment

A SymbolicConstant specifying the relative position of the movie frame in the viewport when positionMethod =AUTO_ALIGN. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is CENTER.

xScale

A Float specifying the scale applied to the movie frame width. The xScale argument is ignored when positionMethod =FIT_TO_VIEWPORT. The default value is 1.0.When xScale is negative, the movie frame is mirrored about its y-axis but its position is not affected.

yScale

A Float specifying the scale applied to the movie frame height. The yScale argument is ignored when positionMethod =FIT_TO_VIEWPORT. The default value is 1.0.When yScale is negative, the movie frame is mirrored about its x-axis but its position is not affected.

origin

A pair of Floats specifying the*X*- and Y-offsets in millimeters from the lower-left corner of the viewport. The origin argument is ignored unless positionMethod =MANUAL. The default value is (0, 0).

translucency

A Float specifying the translucency factor to use when displaying the movie frame. Possible values are 0.0 ≤≤ translucency ≤≤ 1.0 with 0.0 being invisible and 1.0 being opaque. The default value is 1.0.

options

None or a MovieOptions object specifying the object from which values are to be copied. If other arguments are also supplied to setValues, they will override the values in the options member. The default value is None.

Raises:
RangeError

ViewportBase#

class ViewportBase(name: str, origin: tuple[float] = (), width: float = 120, height: float = 80, border: BooleanType = 1, titleBar: BooleanType = 1, titleStyle: SymbolicConstantType = 'SYSTEM', customTitleString: str = '')[source]#

A viewport is the container for the graphics generated by the application. TheViewport object stores the various settings that determine how objects are displayed within that viewport.

Notes

This object can be accessed by:

session.viewports[name]
Attributes:
displayMode: SymbolicConstant

A SymbolicConstant specifying the display mode of the viewport. Possible values are:SINGLE, specifying a single displayedObject.OVERLAY, specifying one or more layers to be displayed simultaneously—each layer contains one displayedObject.

viewManipLayers: SymbolicConstant

A SymbolicConstant specifying which layer or layers will be controlled by the view manipulation tools when displayMode=OVERLAY. Possible values are ALL and CURRENT.

layerOffset: float

A Float specifying a factor to be used in offsetting layers in the screen Z direction. Possible values are –1 to 1. A negative value reverses the apparent order in which the layers are plotted.

windowState: SymbolicConstant

A SymbolicConstant specifying the current state of a viewport. Possible values are NORMAL, MAXIMIZED, and MINIMIZED.

currentWidth: float

A Float specifying the width in millimeters of the current viewport, regardless of the value of windowState.

currentHeight: float

A Float specifying the height in millimeters of the current viewport, regardless of the value of windowState, and including the title bar.

applyLinkedCommands: Boolean

A Boolean specifying whether the viewport is linked for synchronization. The default value is ON.

activeColorModes: SymbolicConstant

A SymbolicConstant specifying the currently active color mappings. Possible values are: DEFAULT_COLORS PART_GEOM_MAP_COLORS ASSEMBLY_MAP_COLORS PART_MAP_COLORS INSTANCE_MAP_COLORS INSTANCE_TYPE_MAP_COLORS SECTION_MAP_COLORS MATERIAL_MAP_COLORS LOAD_MAP_COLORS BC_MAP_COLORS INTERACTION_MAP_COLORS CONSTRAINT_MAP_COLORS SET_MAP_COLORS SURFACE_MAP_COLORS INTERNAL_SET_MAP_COLORS INTERNAL_SURFACE_MAP_COLORS DISPLAY_GRP_MAP_COLORS SELECTION_GRP_MAP_COLORS ELTYPE_MAP_COLORS PLOT_MAP_COLORS MESH_MAP_COLORS The default value is DEFAULT_COLORS.

colorMode: SymbolicConstant

A SymbolicConstant specifying the last applied color mapping. Possible values are: DEFAULT_COLORS PART_GEOM_MAP_COLORS ASSEMBLY_MAP_COLORS PART_MAP_COLORS INSTANCE_MAP_COLORS INSTANCE_TYPE_MAP_COLORS SECTION_MAP_COLORS MATERIAL_MAP_COLORS LOAD_MAP_COLORS BC_MAP_COLORS INTERACTION_MAP_COLORS CONSTRAINT_MAP_COLORS SET_MAP_COLORS SURFACE_MAP_COLORS INTERNAL_SET_MAP_COLORS INTERNAL_SURFACE_MAP_COLORS DISPLAY_GRP_MAP_COLORS SELECTION_GRP_MAP_COLORS ELTYPE_MAP_COLORS PLOT_MAP_COLORS MESH_MAP_COLORS The default value is DEFAULT_COLORS.

translucency: float

A Float specifying the translucency that will be applied to objects colored using initialColor and it needs to be set along with initialColor. If initialColor is set to ‘As is’ then translucency will have no effect.

animationConnect: Boolean

A Boolean specifying whether an animation is connected to the viewport.

colorMappings: dict[str, AttributeColorMap]

A repository of AttributeColorMap objects specifying the objects cannot be constructed but the following attribute maps are supported: “type” “Element set” “Material” “Section” “Default” “Part” “Part instance” “Element type” “Averaging region” “Assembly” “Property” “Set” “Surface” “Skin” “Profile” “Part shape” “Part status” “Part geometry” “Meshability” “Instance type” “Load” “Boundary condition” “Interaction” “Constraint” “Interaction type” “Constraint type” “Display group” “Selection group” “Interaction property” “Connector” “Connector type” “Connector property” “Internal set” “Internal surface” “mapColors” “autoColors” “overrides” “defaultAutoColors” “defaultOverrides” “objectToCopy” “colorMapping” “colorMappings” “colorMode” “attributeColors” “updateOverrides” “colorCodeOverride” “initialColor” “Layup” “Ply”

initialColor: str

A String specifying the color that will be applied to all objects in the viewport at the start of color coding. The possible values are ‘As is’, ‘Default’ or a string with a hexadecimal representation of a color.

currentLayer: str

A String specifying which layer is affected by options settings when displayMode =OVERLAY. The current layer is also the only layer affected by view manipulations when**viewManipLayers** =CURRENT.

displayedObject: Displayable

A Displayable object specifying the object to be displayed. The Displayable type is an abstract generalization. The concrete possible types are Part, Assembly, ConstrainedSketch, Odb, PlyStackPlot, or XYPlot. If displayedObject=None, Abaqus displays an empty viewport.

layers: dict[str, Layer]

A repository of Layer objects specifying the key to the repository is a String with the name of the layer.

view: View

A View object specifying the object that controls viewing of the viewport content.

odbDisplay: OdbDisplay

An Odb`Display object specifying the display options for the Odb object.

partDisplay: PartDisplayOptions

A Part`DisplayOptions object specifying the display options for the Part object.

assemblyDisplay: AssemblyDisplayOptions

An Assembly`DisplayOptions object specifying the display options for the Assembly object.

viewportAnnotationOptions: ViewportAnnotationOptions

A ViewportAnnotationOptions object.

detailPlotOptions: DetailPlotOptions

A DetailPlotOptions object.

annotationsToPlot: AnnotationsToPlotArray

An AnnotationsToPlotArray object.

visibleLayers: tuple

A tuple of Strings specifying the names of layers that will be displayed in the viewport when displayMode = OVERLAY.

currentOrigin: tuple[float]

A pair of Floats specifying the X- and Y-coordinates in millimeters in the canvas coordinate system of the lower left corner of the current viewport, regardless of the value of windowState.

iconOrigin: tuple[float]

A pair of Floats specifying the X- and Y-coordinates in millimeters of the lower left corner of the current viewport from a coordinate system having its origin in the lower left corner of the drawing area. This origin refers to the viewport location when windowState =MINIMIZED.

lightOptions: LightOptions

A LightOptions object.

imageOptions: ImageOptions

An ImageOptions object.

movieOptions: MovieOptions

A MovieOptions object.

animationController: AnimationController

An AnimationController object.

drawings: tuple

A tuple of Strings specifying keys to the session.drawings repository. The default value is an empty sequence.

Methods

addDrawings([names])

This method identifies the names of Drawing objects to be rendered in the Viewport.

bringToFront()

This method moves the Viewport object to the front.

disableColorCodeUpdates()

This method disables Viewport updates and internal computations triggered because of color coding.

disableMultipleColors()

This method disables applying multiple color mappings that was enabled using enableMultipleColors

disableRefresh()

This method disables Viewport refresh.

enableColorCodeUpdates()

This method enables Viewport color code updates disabled using disableColorCodeUpdates.

enableMultipleColors()

This method enables multiple color mappings to be applied at the same time.

enableRefresh()

This method enables Viewport refresh disabled using disableRefresh.

forceRefresh()

This method causes the Viewport to refresh immediately.

getActiveElementLabels([useCut, printResults])

This method returns the element labels currently active in the viewport based on the current display group.

getActiveNodeLabels([useCut, printResults])

This method returns the node labels currently active in the viewport based on the current display group.

getPrimVarMinMaxLoc()

This method returns a dictionary containing the minimum, maximum and their location for the current primary variable.

makeCurrent()

This method makes theViewport object the current viewport.

maximize()

This method maximizes the Viewport object to fill the drawing area.

minimize()

This method minimizes the Viewport object to appear as an abbreviated title bar.

offset([deltaX, deltaY])

This method modifies the current X-Y location of the viewport by the specified distance.

removeDrawings([names])

This method identifies the names of Drawing objects to no longer be rendered in the Viewport.

restore()

This method restores a maximized or minimized Viewport object to its previous size and location.

sendToBack()

This method moves the Viewport object to the back.

setValues([displayedObject, displayMode, ...])

This method modifies the Viewport object.

timeDisplay([numFrames, numSeconds, ...])

This method refreshes the Viewport display numFrames times and then checks to see if numSeconds seconds have elapsed.

setColor

addDrawings(names: tuple = ())[source]#

This method identifies the names of Drawing objects to be rendered in the Viewport.

Parameters:
names

A sequence of String values identifying keys in the session.drawings repository.

Raises:
ValueError.
bringToFront()[source]#

This method moves the Viewport object to the front.

disableColorCodeUpdates()[source]#

This method disables Viewport updates and internal computations triggered because of color coding. Performance improvement will be significant when color coding is ON and repeating operations are performed using a script each of which requires color code updates. No benefit will be had when color coding is OFF.

disableMultipleColors()[source]#

This method disables applying multiple color mappings that was enabled using enableMultipleColors

disableRefresh()[source]#

This method disables Viewport refresh. Some methods that require the Viewport to be up-to-date will override this setting. It is advisable to use this method sparingly.

enableColorCodeUpdates()[source]#

This method enables Viewport color code updates disabled using disableColorCodeUpdates.

enableMultipleColors()[source]#

This method enables multiple color mappings to be applied at the same time. It also ensures that the Viewport is updated correctly when initialColor is set.

enableRefresh()[source]#

This method enables Viewport refresh disabled using disableRefresh.

forceRefresh()[source]#

This method causes the Viewport to refresh immediately. It is provided to allow scripts to refresh the Viewport before the script terminates. Normally, there would only be a single cumulative refresh that takes place immediately after the script completes.

getActiveElementLabels(useCut: BooleanType = 0, printResults: BooleanType = 0)[source]#

This method returns the element labels currently active in the viewport based on the current display group. The element labels are printed only when the displayedObject member in the Viewport object is set to an Odb. The getActiveElementLabels method has the following arguments:

Parameters:
useCut

A Boolean flag to specify if any active cutting plane is to be considered in determining active elements.

printResults

A Boolean flag to specify if the active element labels are to be printed to the replay file.

Returns:
A Dictionary object of element labels, keyed by OdbInstance name. Returns python:None if the
displayedObject member is not an Odb object.
getActiveNodeLabels(useCut: BooleanType = 0, printResults: BooleanType = 0)[source]#

This method returns the node labels currently active in the viewport based on the current display group. The node labels are printed only when the displayedObject member in the Viewport object is set to an Odb. The getActiveNodeLabels method has the following arguments:

Parameters:
useCut

A Boolean flag to specify if any active cutting plane is to be considered in determining active nodes.

printResults

A Boolean flag to specify if the active node labels are to be printed to the replay file.

Returns:
A Dictionary object of node labels, keyed by OdbInstance name. Returns python:None if the
displayedObject member is not an Odb object.
getPrimVarMinMaxLoc()[source]#

This method returns a dictionary containing the minimum, maximum and their location for the current primary variable. A contour plot should be displayed in the current viewport or else the method will return None.

Returns:
A dictionary with keys ‘minPartInstanceName’, ‘minElementLabel’, ‘minNodeLabel’,
‘minPosition’, ‘maxPartInstanceName’, ‘maxElementLabel’, ‘maxNodeLabel’, ‘maxPosition’ .
makeCurrent()[source]#

This method makes theViewport object the current viewport.

maximize()[source]#

This method maximizes the Viewport object to fill the drawing area.

minimize()[source]#

This method minimizes the Viewport object to appear as an abbreviated title bar.

offset(deltaX: float = 0, deltaY: float = 0)[source]#

This method modifies the current X-Y location of the viewport by the specified distance.

Parameters:
deltaX

A Float specifying the offset in millimeters of the X-component of the viewport origin. The default value is 0.

deltaY

A Float specifying the offset in millimeters of the Y-component of the viewport origin. The default value is 0.

removeDrawings(names: tuple = ())[source]#

This method identifies the names of Drawing objects to no longer be rendered in the Viewport.

Parameters:
names

A sequence of String values identifying keys in the Viewport sequence.

Raises:
ValueError.
restore()[source]#

This method restores a maximized or minimized Viewport object to its previous size and location.

sendToBack()[source]#

This method moves the Viewport object to the back.

setValues(displayedObject: ~abaqus.Canvas.Displayable.Displayable = <abaqus.Canvas.Displayable.Displayable object>, displayMode: ~abaqusConstants.SymbolicConstantType | None = None, visibleLayers: tuple = (), viewManipLayers: ~abaqusConstants.SymbolicConstantType | None = None, currentLayer: str = '', layerOffset: float | None = None)[source]#

This method modifies the Viewport object. The arguments to setValues are the same as the arguments to the Viewport method, except for the name argument. In addition, the setValues method has the following arguments:

Parameters:
displayedObject

A Displayable object specifying the object to be displayed. The Displayable type is an abstract generalization. The concrete possible types are Part, Assembly, ConstrainedSketch, Odb, PlyStackPlot, or XYPlot. If *displayedObject*=None, Abaqus displays an empty viewport.

displayMode

A SymbolicConstant specifying the display mode of the viewport. Possible values are:SINGLE, specifying a single displayedObject.OVERLAY, specifying one or more layers to be displayed simultaneously—each layer contains one displayedObject.

visibleLayers

A sequence of Strings specifying the names of layers that will be displayed in the viewport when displayMode = OVERLAY.

viewManipLayers

A SymbolicConstant specifying which layer or layers will be controlled by the view manipulation tools when *displayMode*=OVERLAY. Possible values are ALL and CURRENT.

currentLayer

A String specifying which layer is affected by options settings when displayMode =OVERLAY. The current layer is also the only layer affected by view manipulations when*viewManipLayers* =CURRENT.

layerOffset

A Float specifying a factor to be used in offsetting layers in the screen Z direction. Possible values are –1 to 1. A negative value reverses the apparent order in which the layers are plotted.

Raises:
RangeError
timeDisplay(numFrames: int = 0, numSeconds: int = 10, degreesPerFrame: float = 0)[source]#

This method refreshes the Viewport display numFrames times and then checks to see if numSeconds seconds have elapsed. If not, it will continue refreshing the Viewport until the time has elapsed. At completion, the actual number of refreshes (frames) rendered and elapsed time will be reported along with the calculated frames-per-second (fps).

Parameters:
numFrames

An Int specifying the minimum number of times to refresh the Viewport. The default value is 0.

numSeconds

An Int specifying the minimum number of seconds to spend refreshing the Viewport. The default value is 10.

degreesPerFrame

A Float specifying the number of degrees to rotate the model view about its Z axis before each refresh. The default value is 0.0.