PrintPDFBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# PrintPDFBuilder Class

class `NXOpen.``PrintPDFBuilder`

  Bases: `NXOpen.Builder`

  Represents a `NXOpen.PrintPDFBuilder` to be used when exporting the Current Display or selected sheets to a PDF document.

  This class is for use on Windows only and is created using `NXOpen.PlotManager`.

  All sheets provided must be in the displayed part.

  To create a new instance of this class, use `NXOpen.PlotManager.CreatePrintPdfbuilder()`

  Default values.

  Property | Value
  --- | ---
  Relation | Undefined

  New in version NX5.0.0.

# Properties

Property | Description
--- | ---
Action | Returns or sets the action option to be used when saving the PDF file in a Teamcenter environment.
AddWatermark | Returns or sets the Add Watermark option.
Append | Returns or sets the Append option.
Colors | Returns or sets the color option to be used when creating the PDF document.
CustomSymbolsInForeground | Returns or sets the plotting custom symbols in the foreground option.
DatasetName | Returns or sets the dataset name to be used when Creating a New PDF document in a Teamcenter environment.
DatasetType | Returns or sets the dataset type to be used when exporting a PDF to Teamcenter
Filename | Returns or sets the filename to be used upon creation of the PDF document.
ImageResolution | Returns or sets the resolution of images created for export of shaded views.
NamedReferenceType | Returns or sets the named reference type to be used when exporting a PDF to Teamcenter
OutputText | Returns or sets the output text of the PDF.
RasterImages | Returns or sets the Raster Images option.
Relation | Returns or sets the relation to be used when exporting a PDF to Teamcenter
Scale | Returns or sets the scale factor to be used when creating a PDF document.
ShadedGeometry | Returns or sets the Shaded Geometry as Wireframe option.
Size | Returns or sets the size of the PDF document.
SourceBuilder | Returns the Source builder.
Tag | Returns the Tag for this object.
Units | Returns or sets the units of the X and Y dimensions to be used when Dimension has been selected from the Size option.
Watermark | Returns or sets the watermark text.
Widths | Returns or sets the width option.
XDimension | Returns or sets the x dimension to be used when Dimension has been selected from the Size option.
YDimension | Returns or sets the y dimension to be used when Dimension has been selected from the Size option.

# Methods

Method | Description
--- | ---
Assign | The Assign button will assign an appropriate name to the Dataset field if Create New is chosen as the Action.
Commit | Commits any edits that have been applied to the builder.
CreateCdf | Creates and returns a `NXOpen.CDF` object representing the Color Palette.
CreateWidthDefinition | Creates and returns a `NXOpen.WidthDefinition` object representing the Width Palette.
DefinePalette | Initialize the Color Palette.
DefineWidths | Initialize the Width dialog.
Destroy | Deletes the builder, and cleans up any objects created by the builder.
GetCdf | Returns a `NXOpen.CDF` object representing the Color Palette.
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetObject | Returns the object currently being edited by this builder.
GetWidthDefinition | Returns a `NXOpen.WidthDefinition` object representing the Width Palette.
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

PrintPDFBuilderActionOption Enumeration | Specifies the action option to be used when running Teamcenter
PrintPDFBuilderColor Enumeration | Specifies the color option to use when creating the PDF document
PrintPDFBuilderImageResolutionOption Enumeration | Specifies the image resolution when exporting a raster image
PrintPDFBuilderOutputTextOption Enumeration | Specifies the output text option, as either text or polylines
PrintPDFBuilderRelationOption Enumeration | Specifies the relation to use when exporting a PDF to Teamcenter
PrintPDFBuilderSizeOption Enumeration | Specifies the size option of the PDF document.
PrintPDFBuilderUnitsOption Enumeration | Specifies which units are associated to the dimensions
PrintPDFBuilderWidth Enumeration | Specifies the primary selection of which type of width assignment to use.

# Property Detail

## Action

`PrintPDFBuilder.``Action`

  Returns or sets the action option to be used when saving the PDF file in a Teamcenter environment.

  This can be set to Create New, Overwrite Existing PDF, or Append to Existing PDF.

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

  Getter Method

  Signature `Action`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderActionOption`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Action`

  Parameters: | action (`NXOpen.PrintPDFBuilderActionOption`) –

  New in version NX5.0.0.

  License requirements: None.

## AddWatermark

`PrintPDFBuilder.``AddWatermark`

  Returns or sets the Add Watermark option.

  If Add Watermark is set to false, no Watermark will be added to the PDF document. If Add Watermark is set to true, the user defined watermark text will be added as a watermark to the PDF document.

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

  Getter Method

  Signature `AddWatermark`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `AddWatermark`

  Parameters: | addWatermark (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Append

`PrintPDFBuilder.``Append`

  Returns or sets the Append option.

  If Append is set to false, a new PDF document will be created and will overwrite an existing PDF document. If Append is set to true, the selected sheets will be appended to the existing PDF document.

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

  Getter Method

  Signature `Append`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Append`

  Parameters: | append (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Colors

`PrintPDFBuilder.``Colors`

  Returns or sets the color option to be used when creating the PDF document.

  If the color option is set to Custom Palette or Colors By Width then the PDF document will be created with the user defined color attributes belonging to the CDF object.

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

  Getter Method

  Signature `Colors`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderColor`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Colors`

  Parameters: | colors (`NXOpen.PrintPDFBuilderColor`) –

  New in version NX5.0.0.

  License requirements: None.

## CustomSymbolsInForeground

`PrintPDFBuilder.``CustomSymbolsInForeground`

  Returns or sets the plotting custom symbols in the foreground option.

  Setting this option on will cause custom symbols to be plotted in the foreground. When this option is off, geometry may overlap custom symbols when plotted.

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

  Getter Method

  Signature `CustomSymbolsInForeground`

  Returns: |
  Return type: | bool

  New in version NX11.0.0.

  License requirements: None.

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

  Setter Method

  Signature `CustomSymbolsInForeground`

  Parameters: | customSymbolsInForeground (bool) –

  New in version NX11.0.0.

  License requirements: None.

## DatasetName

`PrintPDFBuilder.``DatasetName`

  Returns or sets the dataset name to be used when Creating a New PDF document in a Teamcenter environment.

  The dataset name will be used if Create New, Overwrite Existing PDF, or Append to Existing PDF are selected as the Action.

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

  Getter Method

  Signature `DatasetName`

  Returns: |
  Return type: | str

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `DatasetName`

  Parameters: | datasetName (str) –

  New in version NX5.0.0.

  License requirements: None.

## DatasetType

`PrintPDFBuilder.``DatasetType`

  Returns or sets the dataset type to be used when exporting a PDF to Teamcenter

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

  Getter Method

  Signature `DatasetType`

  Returns: |
  Return type: | str

  New in version NX7.5.0.

  License requirements: None.

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

  Setter Method

  Signature `DatasetType`

  Parameters: | datasetType (str) –

  New in version NX7.5.0.

  License requirements: None.

## Filename

`PrintPDFBuilder.``Filename`

  Returns or sets the filename to be used upon creation of the PDF document.

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

  Getter Method

  Signature `Filename`

  Returns: |
  Return type: | str

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Filename`

  Parameters: | filename (str) –

  New in version NX5.0.0.

  License requirements: None.

## ImageResolution

`PrintPDFBuilder.``ImageResolution`

  Returns or sets the resolution of images created for export of shaded views.

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

  Getter Method

  Signature `ImageResolution`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderImageResolutionOption`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ImageResolution`

  Parameters: | imageResolution (`NXOpen.PrintPDFBuilderImageResolutionOption`) –

  New in version NX5.0.0.

  License requirements: None.

## NamedReferenceType

`PrintPDFBuilder.``NamedReferenceType`

  Returns or sets the named reference type to be used when exporting a PDF to Teamcenter

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

  Getter Method

  Signature `NamedReferenceType`

  Returns: |
  Return type: | str

  New in version NX7.5.0.

  License requirements: None.

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

  Setter Method

  Signature `NamedReferenceType`

  Parameters: | namedReferenceType (str) –

  New in version NX7.5.0.

  License requirements: None.

## OutputText

`PrintPDFBuilder.``OutputText`

  Returns or sets the output text of the PDF.

  This will determine whether the drawing text will be exported as text or as polylines.

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

  Getter Method

  Signature `OutputText`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderOutputTextOption`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `OutputText`

  Parameters: | outputText (`NXOpen.PrintPDFBuilderOutputTextOption`) –

  New in version NX6.0.0.

  License requirements: None.

## RasterImages

`PrintPDFBuilder.``RasterImages`

  Returns or sets the Raster Images option.

  This option determines whether or not raster images will be exported to the PDF document.

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

  Getter Method

  Signature `RasterImages`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `RasterImages`

  Parameters: | rasterImages (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Relation

`PrintPDFBuilder.``Relation`

  Returns or sets the relation to be used when exporting a PDF to Teamcenter

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

  Getter Method

  Signature `Relation`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderRelationOption`

  New in version NX7.5.0.

  License requirements: None.

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

  Setter Method

  Signature `Relation`

  Parameters: | relation (`NXOpen.PrintPDFBuilderRelationOption`) –

  New in version NX7.5.0.

  License requirements: None.

## Scale

`PrintPDFBuilder.``Scale`

  Returns or sets the scale factor to be used when creating a PDF document.

  This value ranges from 0.00 to 1.00 and will only be used if the Size option is set to Scale.

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

  Getter Method

  Signature `Scale`

  Returns: |
  Return type: | float

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Scale`

  Parameters: | scale (float) –

  New in version NX5.0.0.

  License requirements: None.

## ShadedGeometry

`PrintPDFBuilder.``ShadedGeometry`

  Returns or sets the Shaded Geometry as Wireframe option.

  If set to true, this option will show shaded objects as wireframes. The shaded objects will be represented as shaded if this option is set to false.

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

  Getter Method

  Signature `ShadedGeometry`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ShadedGeometry`

  Parameters: | shadedGeometry (bool) –

  New in version NX5.0.0.

  License requirements: None.

## Size

`PrintPDFBuilder.``Size`

  Returns or sets the size of the PDF document.

  If the size is set to Scale, then the PDF will use the user-defined Scale Factor. If the size is set to dimension, then the PDF will use the user-defined X and Y dimensions.

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

  Getter Method

  Signature `Size`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderSizeOption`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Size`

  Parameters: | size (`NXOpen.PrintPDFBuilderSizeOption`) –

  New in version NX5.0.0.

  License requirements: None.

## SourceBuilder

`PrintPDFBuilder.``SourceBuilder`

  Returns the Source builder.

  The Source builder contains all data involving the selected sheets.

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

  Getter Method

  Signature `SourceBuilder`

  Returns: | New SourceBuilder object
  Return type: | `NXOpen.PlotSourceBuilder`

  New in version NX5.0.1.

  License requirements: None.

## Units

`PrintPDFBuilder.``Units`

  Returns or sets the units of the X and Y dimensions to be used when Dimension has been selected from the Size option.

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

  Getter Method

  Signature `Units`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderUnitsOption`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Units`

  Parameters: | units (`NXOpen.PrintPDFBuilderUnitsOption`) –

  New in version NX5.0.0.

  License requirements: None.

## Watermark

`PrintPDFBuilder.``Watermark`

  Returns or sets the watermark text.

  This user-defined text will appear as a watermark to the PDF document only if Add Watermark is set to true.

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

  Getter Method

  Signature `Watermark`

  Returns: |
  Return type: | str

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Watermark`

  Parameters: | watermark (str) –

  New in version NX5.0.0.

  License requirements: None.

## Widths

`PrintPDFBuilder.``Widths`

  Returns or sets the width option.

  If the width option is set to Single Width, Custom Three Widths, or Custom Palette then the PDF document will be created with the user defined width attributes belonging to the WidthDefinition object.

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

  Getter Method

  Signature `Widths`

  Returns: |
  Return type: | `NXOpen.PrintPDFBuilderWidth`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Widths`

  Parameters: | widths (`NXOpen.PrintPDFBuilderWidth`) –

  New in version NX5.0.0.

  License requirements: None.

## XDimension

`PrintPDFBuilder.``XDimension`

  Returns or sets the x dimension to be used when Dimension has been selected from the Size option.

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

  Getter Method

  Signature `XDimension`

  Returns: |
  Return type: | float

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `XDimension`

  Parameters: | xDimension (float) –

  New in version NX5.0.0.

  License requirements: None.

## YDimension

`PrintPDFBuilder.``YDimension`

  Returns or sets the y dimension to be used when Dimension has been selected from the Size option.

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

  Getter Method

  Signature `YDimension`

  Returns: |
  Return type: | float

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `YDimension`

  Parameters: | yDimension (float) –

  New in version NX5.0.0.

  License requirements: None.

# Method Detail

## Assign

`PrintPDFBuilder.``Assign`

  The Assign button will assign an appropriate name to the Dataset field if Create New is chosen as the Action.

  Signature `Assign()`

  New in version NX5.0.0.

  License requirements: None.

## CreateCdf

`PrintPDFBuilder.``CreateCdf`

  Creates and returns a `NXOpen.CDF` object representing the Color Palette.

  This object contains all custom color information to be used when Custom Palette or Colors By Width is selected from the Color option.

  Signature `CreateCdf()`

  Returns: | CDF object
  Return type: | `NXOpen.CDF`

  New in version NX5.0.0.

  License requirements: None.

## CreateWidthDefinition

`PrintPDFBuilder.``CreateWidthDefinition`

  Creates and returns a `NXOpen.WidthDefinition` object representing the Width Palette.

  This object contains all custom width information to be used when Single Width, Custom Three Widths, or Custom Palette is selected from the Width option.

  Signature `CreateWidthDefinition()`

  Returns: | WidthDefinition object
  Return type: | `NXOpen.WidthDefinition`

  New in version NX5.0.0.

  License requirements: None.

## DefinePalette

`PrintPDFBuilder.``DefinePalette`

  Initialize the Color Palette.

  This allows the user to change the attributes of any color. These changed colors will be used if Custom Palette or Colors By Width is selected as the color option.

  Signature `DefinePalette()`

  New in version NX5.0.0.

  License requirements: None.

## DefineWidths

`PrintPDFBuilder.``DefineWidths`

  Initialize the Width dialog.

  This allows the user to change the attributes of Single Width, Custom Three Widths, or Custom Palette. These changed width values will be used depending on the width option selected.

  Signature `DefineWidths()`

  New in version NX5.0.0.

  License requirements: None.

## GetCdf

`PrintPDFBuilder.``GetCdf`

  Returns a `NXOpen.CDF` object representing the Color Palette.

  This object contains all custom color information to be used when Custom Palette or Colors By Width is selected from the Color option.

  Signature `GetCdf()`

  Returns: | CDF object
  Return type: | `NXOpen.CDF`

  New in version NX5.0.0.

  License requirements: None.

## GetWidthDefinition

`PrintPDFBuilder.``GetWidthDefinition`

  Returns a `NXOpen.WidthDefinition` object representing the Width Palette.

  This object contains all custom width information to be used when Single Width, Custom Three Widths, or Custom Palette is selected from the Width option.

  Signature `GetWidthDefinition()`

  Returns: | WidthDefinition object
  Return type: | `NXOpen.WidthDefinition`

  New in version NX5.0.0.

  License requirements: None.

## Validate

`PrintPDFBuilder.``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.