AnnotationBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# AnnotationBuilder Class

class `NXOpen.Diagramming.``AnnotationBuilder`

  Bases: `NXOpen.Diagramming.ConnectableElementBuilder`

  Represents a AnnotationBuilder.

  To create a new instance of this class, use `NXOpen.Diagramming.AnnotationCollection.CreateAnnotationBuilder()`

  New in version NX10.0.0.

# Properties

Property | Description
--- | ---
BoundaryDisplay | Returns or sets the visibility of boundary.
BoundaryType | Returns or sets the boundary type of the annotation
FormattedStringBuilder | Returns the formatted string of the text.
Height | Returns or sets the height.
HeightPolicy | Returns or sets the height policy.
Internal | Returns the flag that indicates if the sheet element is internal.
Label | Returns the label of this sheet element.
LabelName | Returns or sets the label name of this sheet element.
Location | Returns the location of the sheet element relative to another sheet element.
LocationStyle | Returns or sets the location style.
MirrorX | Returns or sets the sheet element to Mirror along the X axis.
MirrorY | Returns or sets the sheet element to Mirror along the Y axis.
Owner | Returns or sets the owning sheet element.
OwningSheet | Returns the owning sheet.
ResizeOption | Returns or sets the resize option of the sheet element
Rotation | Returns or sets the rotation angle that is counter clockwise and relative to the owner.
SourceElement | Returns the source element that records which sheet element it is a copy of.
Tag | Returns the Tag for this object.
Text | Returns or sets the text should be used only when textType is Diagramming.
TextStyleBuilder | Returns the text style of the annotation.
TextType | Returns or sets the text type.
UpToDate | Returns the flag that indicates if the sheet element is up to date.
Visible | Returns the flag that indicates if the sheet element is visible.
Width | Returns or sets the width.
WidthPolicy | Returns or sets the width policy.
NXOpen.Diagramming.SheetElementBuilder.X | Returns or sets the absolute x coordinate.
NXOpen.Diagramming.SheetElementBuilder.Y | Returns or sets the absolute y coordinate.
ZDepth | Returns or sets the Z depth.

# Methods

Method | Description
--- | ---
Commit | Commits any edits that have been applied to the builder.
Destroy | Deletes the builder, and cleans up any objects created by the builder.
GetAllPorts | Gets all ports of this connectable element.
GetAllowedTransformations | Get the allowed transformations of the sheet element.
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetMinNodeSize | Gets the minimum node size values
GetObject | Returns the object currently being edited by this builder.
GetPorts | Gets ports of this connectable element by the direction.
SetMinNodeSize | Sets the minimum node size values
SetOwningSheet | Set the owning sheet when the sheet element is created.
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Enumerations

AnnotationBuilderTextTypeOption Enumeration | Represents the option `NXOpen.Diagramming.AnnotationBuilder.TextType()` for a `NXOpen.Diagramming.AnnotationBuilder`.

# Property Detail

## BoundaryDisplay

`AnnotationBuilder.``BoundaryDisplay`

  Returns or sets the visibility of boundary.

  If return true, the annotation will show its boundary if it has one.

  `-------------------------------------`

  Getter Method

  Signature `BoundaryDisplay`

  Returns: |
  Return type: | bool

  New in version NX10.0.0.

  License requirements: None.

  `-------------------------------------`

  Setter Method

  Signature `BoundaryDisplay`

  Parameters: | boundaryDisplay (bool) –

  New in version NX10.0.0.

  License requirements: None.

## BoundaryType

`AnnotationBuilder.``BoundaryType`

  Returns or sets the boundary type of the annotation

  `-------------------------------------`

  Getter Method

  Signature `BoundaryType`

  Returns: |
  Return type: | `NXOpen.Diagramming.DiagrammingAnnotationboundarytype`

  New in version NX10.0.0.

  License requirements: None.

  `-------------------------------------`

  Setter Method

  Signature `BoundaryType`

  Parameters: | boundaryType (`NXOpen.Diagramming.DiagrammingAnnotationboundarytype`) –

  New in version NX10.0.0.

  License requirements: None.

## FormattedStringBuilder

`AnnotationBuilder.``FormattedStringBuilder`

  Returns the formatted string of the text.

  `-------------------------------------`

  Getter Method

  Signature `FormattedStringBuilder`

  Returns: |
  Return type: | `NXOpen.Diagramming.FormattedStringBuilder`

  New in version NX10.0.0.

  License requirements: None.

## Text

`AnnotationBuilder.``Text`

  Returns or sets the text should be used only when textType is Diagramming.

  AnnotationBuilder.TextTypeOption.Fixed

  `-------------------------------------`

  Getter Method

  Signature `Text`

  Returns: |
  Return type: | str

  New in version NX10.0.0.

  License requirements: None.

  `-------------------------------------`

  Setter Method

  Signature `Text`

  Parameters: | strValue (str) –

  New in version NX10.0.0.

  License requirements: None.

## TextStyleBuilder

`AnnotationBuilder.``TextStyleBuilder`

  Returns the text style of the annotation.

  `-------------------------------------`

  Getter Method

  Signature `TextStyleBuilder`

  Returns: |
  Return type: | `NXOpen.Diagramming.TextStyleBuilder`

  New in version NX11.0.0.

  License requirements: None.

## TextType

`AnnotationBuilder.``TextType`

  Returns or sets the text type.

  If `NXOpen.Diagramming.AnnotationBuilderTextTypeOption.Fixed`, the text of annotation is stored in `NXOpen.Diagramming.AnnotationBuilder`. If `NXOpen.Diagramming.AnnotationBuilderTextTypeOption.Parametric`, the text of annotation is stored in `NXOpen.Diagramming.AnnotationBuilder.FormattedStringBuilder()`.

  `-------------------------------------`

  Getter Method

  Signature `TextType`

  Returns: |
  Return type: | `NXOpen.Diagramming.AnnotationBuilderTextTypeOption`

  New in version NX10.0.0.

  License requirements: None.

  `-------------------------------------`

  Setter Method

  Signature `TextType`

  Parameters: | textType (`NXOpen.Diagramming.AnnotationBuilderTextTypeOption`) –

  New in version NX10.0.0.

  License requirements: None.

# Method Detail

## Validate

`AnnotationBuilder.``Validate`

  Validate whether the inputs to the component are sufficient for commit to be called.

  If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

  Signature `Validate()`

  Returns: | Was self validation successful
  Return type: | bool

  New in version NX3.0.1.

  License requirements: None.