Annotation#

Annotation commands are used to create, position, and modify viewport annotations.

Create annotations#

AnimationUserData.Arrow(name: str, startPoint: tuple[float] = (), endPoint: tuple[float] = (), startAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', endAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', startHeadStyle: SymbolicConstantType = 'NONE', endHeadStyle: SymbolicConstantType = 'FILLED_ARROW', startGap: float = 0, endGap: float = 0, color: str = '', lineStyle: SymbolicConstantType = 'SOLID', lineThickness: SymbolicConstantType = 'VERY_THIN') Arrow[source]#

This method creates an Arrow object.

Parameters:
name

A String specifying the annotation repository key.

startPoint

A pair of Floats specifying the start point X- and Y-offsets in millimeters from startAnchor. The default value is (0, 0).

endPoint

A pair of Floats specifying the end point X- and Y-offsets in millimeters from endAnchor. The default value is (0, 0).

startAnchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y-coordinates as percentages of the viewport width and height. A sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant indicates a relative position. Possible values are:

  • BOTTOM_LEFT,,

  • BOTTOM_CENTER

  • BOTTOM_RIGHT

  • CENTER_LEFT

  • CENTER

  • CENTER_RIGHT

  • TOP_LEFT

  • TOP_CENTER

  • TOP_RIGHT

The default value is BOTTOM_LEFT.

endAnchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y-coordinates as percentages of the viewport width and height. A Sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant indicates a relative position. Possible values are:

  • BOTTOM_LEFT,,

  • BOTTOM_CENTER

  • BOTTOM_RIGHT

  • CENTER_LEFT

  • CENTER

  • CENTER_RIGHT

  • TOP_LEFT

  • TOP_CENTER

  • TOP_RIGHT

The default value is BOTTOM_LEFT.

startHeadStyle
A SymbolicConstant specifying the style of the start head. Possible values are:

ARROW FILLED_ARROW HOLLOW_CIRCLE FILLED_CIRCLE HOLLOW_DIAMOND FILLED_DIAMOND HOLLOW_SQUARE FILLED_SQUARE NONE

The default value is NONE.

endHeadStyle

A SymbolicConstant specifying the style of the end head. Possible values are: ARROW

FILLED_ARROW HOLLOW_CIRCLE FILLED_CIRCLE HOLLOW_DIAMOND FILLED_DIAMOND HOLLOW_SQUARE FILLED_SQUARE NONE

The default value is FILLED_ARROW.

startGap

A Float specifying the distance in millimeters between the arrow start point and the arrow start head. The default value is 0.0.

endGap

A Float specifying the distance in millimeters between the arrow end point and the arrow end head. The default value is 0.0.

color

A String specifying the color of the arrow. Possible string values are any valid color. The default value is “White”.

lineStyle

A SymbolicConstant specifying the line style of the arrow. Possible values are SOLID, DASHED, DOTTED, and DOT_DASH. The default value is SOLID.

lineThickness

A SymbolicConstant specifying the line thickness of the arrow. Possible values are VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.

Returns:
An Arrow object.

Notes

This function can be accessed by:

mdb.Arrow
session.odbs[*name*].userData.Arrow
AnimationUserData.Text(name: str, text: str = '', offset: tuple[float] = (), anchor: SymbolicConstantType | float = 'BOTTOM_LEFT', referencePoint: SymbolicConstantType | float = 'BOTTOM_LEFT', rotationAngle: float = 0, color: str = '', font: str = '', backgroundStyle: SymbolicConstantType = 'TRANSPARENT', backgroundColor: str = '', box: BooleanType = 0, justification: SymbolicConstantType = 'JUSTIFY_LEFT') Text[source]#

This method creates a Text object.

Parameters:
name

A String specifying the annotation repository key.

text

A String specifying the text of the Text object. The default value is an empty string.

offset

A pair of Floats specifying the X- and Y-offsets in millimeters of the Text object from anchor. The default value is (0, 0).

anchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y coordinates as percentages of the viewport width and height. A Sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant specifies a relative position. Possible values are:

  • BOTTOM_LEFT,,

  • BOTTOM_CENTER

  • BOTTOM_RIGHT

  • CENTER_LEFT

  • CENTER

  • CENTER_RIGHT

  • TOP_LEFT

  • TOP_CENTER

  • TOP_RIGHT

The default value is BOTTOM_LEFT.

referencePoint

A SymbolicConstant or a sequence of Floats specifying a point. The sequence of two Floats specifies the X- and Y-coordinates of the reference point of the Text annotation given as percentages of its width and height. The SymbolicConstant indicates a relative position. Possible values are:

  • BOTTOM_LEFT,,

  • BOTTOM_CENTER

  • BOTTOM_RIGHT

  • CENTER_LEFT

  • CENTER

  • CENTER_RIGHT

  • TOP_LEFT

  • TOP_CENTER

  • TOP_RIGHT

The default value is BOTTOM_LEFT.

rotationAngle

A Float specifying the amount of rotation in degrees about referencePoint. The default value is 0.0.

color

A String specifying the color of the Text object. Possible string values are any valid color. The default value is “White”.

font

A String specifying the font of the Text object. Possible string values are any valid font specification. The default value is “--verdana-medium-r-normal–120-“.

backgroundStyle

A SymbolicConstant specifying the Text object background style. Possible values are MATCH, TRANSPARENT, and OTHER. The default value is TRANSPARENT.

backgroundColor

A String specifying the color of the Text object background. Possible string values are any valid color. The default value matches the viewport background.

box

A Boolean specifying whether the box around the text is shown. The default value is OFF.

justification

A SymbolicConstant specifying the Text object justification for multiline text. Possible values are JUSTIFY_LEFT, JUSTIFY_CENTER, and JUSTIFY_RIGHT. The default value is JUSTIFY_LEFT.

Returns:
A Text object.
!img

Notes

This function can be accessed by:

mdb.Text
session.odbs[*name*].userData.Text
AnimationUserData.XYData(name: str, data: tuple, sourceDescription: str = '', contentDescription: str = '', positionDescription: str = '', legendLabel: str = '', xValuesLabel: str = '', yValuesLabel: str = '', axis1QuantityType: ~abaqus.XY.QuantityType.QuantityType = <abaqus.XY.QuantityType.QuantityType object>, axis2QuantityType: ~abaqus.XY.QuantityType.QuantityType = <abaqus.XY.QuantityType.QuantityType object>)[source]#

This method creates an XYData object from a sequence of X–Y data pairs.

Parameters:
name

A String specifying the repository key.

data

A sequence of pairs of Floats specifying the X–Y data pairs.

sourceDescription

A String specifying the source of the X–Y data (e.g., “Entered from keyboard”, “Taken from ASCII file”, “Read from an ODB”, etc.). The default value is an empty string.

contentDescription

A String specifying the content of the X–Y data (e.g., “field 1 vs. field 2”). The default value is an empty string.

positionDescription

A String specifying additional information about the X–Y data (e.g., “for whole model”). The default value is an empty string.

legendLabel

A String specifying the label to be used in the legend. The default value is the name of the XYData object.

xValuesLabel

A String specifying the label for the X-values. This value may be overridden if the X–Y data are combined with other X–Y data. The default value is an empty string.

yValuesLabel

A String specifying the label for the Y-values. This value may be overridden if the X–Y data are combined with other X–Y data. The default value is an empty string.

axis1QuantityType

A QuantityType object specifying the QuantityType object associated to the X -axis1- values.

axis2QuantityType

A QuantityType object specifying the QuantityType object associated to the Y -axis2- values.

Returns:
An XYData object.

Notes

This function can be accessed by:

session.odbs[name].userData.XYData

Object features#

Annotation#

class Annotation[source]#

The Annotation object is the abstract base type for other Annotation objects. The Annotation object has no explicit constructor. The methods and members of the Annotation object are common to all objects derived from Annotation.

Notes

This object can be accessed by:

import annotationToolset
mdb.annotations[name]
session.odbs[name].userData.annotations[name]
session.viewports[name].annotationsToPlot[i]
Attributes:
name: str

A String specifying the annotation repository key.

Methods

bringForward()

This method brings the Annotation object one position up in the annotation stack.

bringToFront()

This method brings the Annotation object to the top of the annotation stack.

moveAfter(name)

This method moves the Annotation object after another object in the same repository.

moveBefore(name)

This method moves the Annotation object before another object in the same repository.

sendBackward()

This method sends the Annotation object one position down in the annotation stack.

sendToBack()

This method sends the Annotation object to the bottom of the annotation stack.

translate([x, y])

This method translates the Annotation object on the viewport plane.

bringForward()[source]#

This method brings the Annotation object one position up in the annotation stack.

bringToFront()[source]#

This method brings the Annotation object to the top of the annotation stack.

moveAfter(name: str)[source]#

This method moves the Annotation object after another object in the same repository.

Parameters:
name

A String specifying the name of the other Annotation object.

moveBefore(name: str)[source]#

This method moves the Annotation object before another object in the same repository.

Parameters:
name

A String specifying the name of the other Annotation object.

sendBackward()[source]#

This method sends the Annotation object one position down in the annotation stack.

sendToBack()[source]#

This method sends the Annotation object to the bottom of the annotation stack.

translate(x: float | None = None, y: float | None = None)[source]#

This method translates the Annotation object on the viewport plane.

Parameters:
x

A Float specifying the X translation amount in millimeters.

y

A Float specifying the Y translation amount in millimeters.

AnnotationsToPlotArray#

class AnnotationsToPlotArray(iterable=(), /)[source]#

The AnnotationsToPlotArray object is a sequence that stores references to plotted annotations. By adding annotations to and removing annotations from this sequence, you can control which annotations are displayed in a particular viewport.

Notes

This object can be accessed by:

import annotationToolset
session.viewports[name].annotationsToPlot

Methods

bringForward(index)

This method brings the Annotation object one position forward in the AnnotationsToPlotArray sequence.

bringToFront(index)

This method brings the Annotation object to the beginning of the AnnotationsToPlotArray sequence.

moveAfter(index, other)

This method moves the Annotation object after another object in the same AnnotationsToPlotArray sequence.

moveBefore(index, other)

This method moves the Annotation object before another object in the same AnnotationsToPlotArray sequence.

sendBackward(index)

This method sends the Annotation object one position backward in the AnnotationsToPlotArray sequence.

sendToBack(index)

This method sends the Annotation object to the end of the AnnotationsToPlotArray sequence.

bringForward(index: str)[source]#

This method brings the Annotation object one position forward in the AnnotationsToPlotArray sequence.

Parameters:
index

An Int specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

bringToFront(index: str)[source]#

This method brings the Annotation object to the beginning of the AnnotationsToPlotArray sequence.

Parameters:
index

An Int specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

moveAfter(index: str, other: str)[source]#

This method moves the Annotation object after another object in the same AnnotationsToPlotArray sequence.

Parameters:
index

An Integer specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

other

An Integer specifying the index of the other Annotation object in the AnnotationsToPlotArray sequence after which this object will be moved.

moveBefore(index: str, other: str)[source]#

This method moves the Annotation object before another object in the same AnnotationsToPlotArray sequence.

Parameters:
index

An Int specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

other

An Int specifying the index of the other Annotation object in the AnnotationsToPlotArray sequence before which this object will be moved.

sendBackward(index: str)[source]#

This method sends the Annotation object one position backward in the AnnotationsToPlotArray sequence.

Parameters:
index

An Int specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

sendToBack(index: str)[source]#

This method sends the Annotation object to the end of the AnnotationsToPlotArray sequence.

Parameters:
index

An Int specifying the index of the Annotation object in the AnnotationsToPlotArray sequence.

AnnotationViewport#

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.

Arrow#

class Arrow(name: str, startPoint: tuple[float] = (), endPoint: tuple[float] = (), startAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', endAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', startHeadStyle: SymbolicConstantType = 'NONE', endHeadStyle: SymbolicConstantType = 'FILLED_ARROW', startGap: float = 0, endGap: float = 0, color: str = '', lineStyle: SymbolicConstantType = 'SOLID', lineThickness: SymbolicConstantType = 'VERY_THIN')[source]#

The Arrow object stores the visual settings and location of an arrow annotation. The Arrow object is derived from the Annotation object.

Notes

This object can be accessed by:

import annotationToolset
mdb.annotations[name]
session.odbs[name].userData.annotations[name]
session.viewports[name].annotationsToPlot[i]

Methods

setValues([startPoint, endPoint, ...])

This method modifies the Arrow object.

translateEndPoint([x, y])

This method translates the end point of the Arrow object on the viewport plane.

translateStartPoint([x, y])

This method translates the start point of the Arrow object on the viewport plane.

setValues(startPoint: tuple[float] = (), endPoint: tuple[float] = (), startAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', endAnchor: SymbolicConstantType | float = 'BOTTOM_LEFT', startHeadStyle: SymbolicConstantType = 'NONE', endHeadStyle: SymbolicConstantType = 'FILLED_ARROW', startGap: float = 0, endGap: float = 0, color: str = '', lineStyle: SymbolicConstantType = 'SOLID', lineThickness: SymbolicConstantType = 'VERY_THIN')[source]#

This method modifies the Arrow object.

Parameters:
startPoint

A pair of Floats specifying the start point X- and Y-offsets in millimeters from startAnchor. The default value is (0, 0).

endPoint

A pair of Floats specifying the end point X- and Y-offsets in millimeters from endAnchor. The default value is (0, 0).

startAnchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y-coordinates as percentages of the viewport width and height. A sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant indicates a relative position. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is BOTTOM_LEFT.

endAnchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y-coordinates as percentages of the viewport width and height. A Sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant indicates a relative position. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is BOTTOM_LEFT.

startHeadStyle

A SymbolicConstant specifying the style of the start head. Possible values are:ARROWFILLED_ARROWHOLLOW_CIRCLEFILLED_CIRCLEHOLLOW_DIAMONDFILLED_DIAMONDHOLLOW_SQUAREFILLED_SQUARENONEThe default value is NONE.

endHeadStyle

A SymbolicConstant specifying the style of the end head. Possible values are:ARROWFILLED_ARROWHOLLOW_ CIRCLEFILLED_CIRCLEHOLLOW_DIAMONDFILLED_DIAMONDHOLLOW_SQUAREFILLED_SQUARENONEThe default value is FILLED_ARROW.

startGap

A Float specifying the distance in millimeters between the arrow start point and the arrow start head. The default value is 0.0.

endGap

A Float specifying the distance in millimeters between the arrow end point and the arrow end head. The default value is 0.0.

color

A String specifying the color of the arrow. Possible string values are any valid color. The default value is “White”.

lineStyle

A SymbolicConstant specifying the line style of the arrow. Possible values are SOLID, DASHED, DOTTED, and DOT_DASH. The default value is SOLID.

lineThickness

A SymbolicConstant specifying the line thickness of the arrow. Possible values are VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.

translateEndPoint(x: float | None = None, y: float | None = None)[source]#

This method translates the end point of the Arrow object on the viewport plane.

Parameters:
x

A Float specifying the X translation amount in millimeters.

y

A Float specifying the*Y* translation amount in millimeters.

translateStartPoint(x: float | None = None, y: float | None = None)[source]#

This method translates the start point of the Arrow object on the viewport plane.

Parameters:
x

A Float specifying the X translation amount in millimeters.

y

A Float specifying the*Y* translation amount in millimeters.

Text#

class Text(name: str, text: str = '', offset: tuple[float] = (), anchor: SymbolicConstantType | float = 'BOTTOM_LEFT', referencePoint: SymbolicConstantType | float = 'BOTTOM_LEFT', rotationAngle: float = 0, color: str = '', font: str = '', backgroundStyle: SymbolicConstantType = 'TRANSPARENT', backgroundColor: str = '', box: BooleanType = 0, justification: SymbolicConstantType = 'JUSTIFY_LEFT')[source]#

The Text object stores the text settings and location of a text annotation. The Text object is derived from the Annotation object.

Notes

This object can be accessed by:

import annotationToolset
mdb.annotations[name]
session.odbs[name].userData.annotations[name]
session.viewports[name].annotationsToPlot[i]
Attributes:
width: float

A Float specifying the width in millimeters of the Text object.

height: float

A Float specifying the height in millimeters of the Text object.

Methods

setValues([text, offset, anchor, ...])

This method modifies the Text object.

setValues(text: str = '', offset: tuple[float] = (), anchor: SymbolicConstantType | float = 'BOTTOM_LEFT', referencePoint: SymbolicConstantType | float = 'BOTTOM_LEFT', rotationAngle: float = 0, color: str = '', font: str = '', backgroundStyle: SymbolicConstantType = 'TRANSPARENT', backgroundColor: str = '', box: BooleanType = 0, justification: SymbolicConstantType = 'JUSTIFY_LEFT')[source]#

This method modifies the Text object.

Parameters:
text

A String specifying the text of the Text object. The default value is an empty string.

offset

A pair of Floats specifying the X- and Y-offsets in millimeters of the Text object from anchor. The default value is (0, 0).

anchor

A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats specifies the X- and Y coordinates as percentages of the viewport width and height. A Sequence of three Floats specifies the X-, Y-, and Z-coordinates of a point in the model coordinate system. A SymbolicConstant specifies a relative position. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is BOTTOM_LEFT.

referencePoint

A SymbolicConstant or a sequence of Floats specifying a point. The sequence of two Floats specifies the X- and Y-coordinates of the reference point of the Text annotation given as percentages of its width and height. The SymbolicConstant indicates a relative position. Possible values are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe default value is BOTTOM_LEFT.

rotationAngle

A Float specifying the amount of rotation in degrees about referencePoint. The default value is 0.0.

color

A String specifying the color of the Text object. Possible string values are any valid color. The default value is “White”.

font

A String specifying the font of the Text object. Possible string values are any valid font specification. The default value is “--verdana-medium-r-normal–120-“.

backgroundStyle

A SymbolicConstant specifying the Text object background style. Possible values are MATCH, TRANSPARENT, and OTHER. The default value is TRANSPARENT.

backgroundColor

A String specifying the color of the Text object background. Possible string values are any valid color. The default value matches the viewport background.

box

A Boolean specifying whether the box around the text is shown. The default value is OFF.

justification

A SymbolicConstant specifying the Text object justification for multiline text. Possible values are JUSTIFY_LEFT, JUSTIFY_CENTER, and JUSTIFY_RIGHT. The default value is JUSTIFY_LEFT.