PrintBuilder Class

class NXOpen.PrintBuilder

Bases: NXOpen.Builder

Represents a NXOpen.PrintBuilder.

This class is for use on Windows only and contains all information relating to printing. It is created using NXOpen.PlotManager.

All sheets provided must be in the displayed part.

The user must specify the sheets to be printed by setting the appropriate fields through the NXOpen.PlotSourceBuilder. The printer text and copies fields must be set in order to successfully print the provided sheets. The printer text is the path of the desired printer and the copies field represents the number of copies to be printed. This class also allows for the line widths to be scaled by setting the appropriate thin, normal, or thick scale factors.

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

Default values.

Property Value
Orientation Landscape
Width1ScaleFactor 1.0
Width2ScaleFactor 2.0
Width3ScaleFactor 3.0
Width4ScaleFactor 4.0
Width5ScaleFactor 5.0
Width6ScaleFactor 6.0
Width7ScaleFactor 7.0
Width8ScaleFactor 8.0
Width9ScaleFactor 9.0

New in version NX5.0.1.

Properties

Property Description
Copies Returns or sets the number of copies.
CustomPaper Returns or sets the custom paper.
CustomSymbolsInForeground Returns or sets the plotting custom symbols in the foreground option.
ImageResolution Returns or sets the resolution of images created for printing shaded views.
NormalWidth Returns or sets the normal width scale factor.
Orientation Returns or sets the orientation.
Output Returns or sets the shaded image option.
Paper Returns or sets the paper.
PrinterText Returns or sets the printer text.
RasterImages Returns or sets the raster images option.
ShadedGeometry Returns or sets the shaded geometry as wireframe option.
SourceBuilder Returns the Source builder.
Tag Returns the Tag for this object.
ThickWidth Returns or sets the thick width scale factor.
ThinWidth Returns or sets the thin width scale factor.
WhiteBackground Returns or sets the white background option.
Width1ScaleFactor Returns or sets the width1 scale factor.
Width2ScaleFactor Returns or sets the width2 scale factor.
Width3ScaleFactor Returns or sets the width3 scale factor.
Width4ScaleFactor Returns or sets the width4 scale factor.
Width5ScaleFactor Returns or sets the width5 scale factor.
Width6ScaleFactor Returns or sets the width6 scale factor.
Width7ScaleFactor Returns or sets the width7 scale factor.
Width8ScaleFactor Returns or sets the width8 scale factor.
Width9ScaleFactor Returns or sets the width9 scale factor.

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

PrintBuilderImageResolutionOption Enumeration Specifies the print image resolution
PrintBuilderOrientationOption Enumeration Specifies the orientation of the printed sheet
PrintBuilderOutputOption Enumeration Specifies the output option when printing Current Display
PrintBuilderPaperSize Enumeration Specifies the paper size of the printed sheet

Property Detail

Copies

PrintBuilder.Copies

Returns or sets the number of copies.

This option specifies the number of copies to be printed.

-------------------------------------

Getter Method

Signature Copies

Returns:
Return type:int

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature Copies

Parameters:copies (int) –

New in version NX5.0.1.

License requirements: None.

CustomPaper

PrintBuilder.CustomPaper

Returns or sets the custom paper.

This will be used if the paper size is set to Custom.

-------------------------------------

Getter Method

Signature CustomPaper

Returns:
Return type:int

New in version NX6.0.2.

License requirements: None.

-------------------------------------

Setter Method

Signature CustomPaper

Parameters:customPaper (int) –

New in version NX6.0.2.

License requirements: None.

CustomSymbolsInForeground

PrintBuilder.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.

ImageResolution

PrintBuilder.ImageResolution

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

-------------------------------------

Getter Method

Signature ImageResolution

Returns:
Return type:NXOpen.PrintBuilderImageResolutionOption

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature ImageResolution

Parameters:imageResolution (NXOpen.PrintBuilderImageResolutionOption) –

New in version NX5.0.1.

License requirements: None.

NormalWidth

PrintBuilder.NormalWidth

Returns or sets the normal width scale factor.

This number is used as a scale factor for normal width lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature NormalWidth

Returns:
Return type:float

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature NormalWidth

Parameters:normalWidth (float) –

New in version NX5.0.1.

License requirements: None.

Orientation

PrintBuilder.Orientation

Returns or sets the orientation.

This options determines the orientation of the printed page.

-------------------------------------

Getter Method

Signature Orientation

Returns:
Return type:NXOpen.PrintBuilderOrientationOption

New in version NX6.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Orientation

Parameters:orientationOption (NXOpen.PrintBuilderOrientationOption) –

New in version NX6.0.0.

License requirements: None.

Output

PrintBuilder.Output

Returns or sets the shaded image option.

The Current Display will be printed using the correct current shading if this option is set.

-------------------------------------

Getter Method

Signature Output

Returns:
Return type:NXOpen.PrintBuilderOutputOption

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature Output

Parameters:outputOption (NXOpen.PrintBuilderOutputOption) –

New in version NX5.0.1.

License requirements: None.

Paper

PrintBuilder.Paper

Returns or sets the paper.

This options determines the paper size used for printing. Note that all options may not available on all printers.

-------------------------------------

Getter Method

Signature Paper

Returns:
Return type:NXOpen.PrintBuilderPaperSize

New in version NX6.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Paper

Parameters:paper (NXOpen.PrintBuilderPaperSize) –

New in version NX6.0.0.

License requirements: None.

PrinterText

PrintBuilder.PrinterText

Returns or sets the printer text.

The printer field represents the full path name of the printer the user wishes to print to.

-------------------------------------

Getter Method

Signature PrinterText

Returns:
Return type:str

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature PrinterText

Parameters:printer (str) –

New in version NX5.0.1.

License requirements: None.

RasterImages

PrintBuilder.RasterImages

Returns or sets the raster images option.

This option determines whether or not raster images will be used when printing.

-------------------------------------

Getter Method

Signature RasterImages

Returns:
Return type:bool

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature RasterImages

Parameters:rasterImages (bool) –

New in version NX5.0.1.

License requirements: None.

ShadedGeometry

PrintBuilder.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.1.

License requirements: None.

-------------------------------------

Setter Method

Signature ShadedGeometry

Parameters:shadedGeometry (bool) –

New in version NX5.0.1.

License requirements: None.

SourceBuilder

PrintBuilder.SourceBuilder

Returns the Source builder.

The Source builder contains all data involving the sheets to to be printed.

-------------------------------------

Getter Method

Signature SourceBuilder

Returns:New SourceBuilder object
Return type:NXOpen.PlotSourceBuilder

New in version NX5.0.1.

License requirements: None.

ThickWidth

PrintBuilder.ThickWidth

Returns or sets the thick width scale factor.

This number is used as a scale factor for thick width lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature ThickWidth

Returns:
Return type:float

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature ThickWidth

Parameters:thickWidth (float) –

New in version NX5.0.1.

License requirements: None.

ThinWidth

PrintBuilder.ThinWidth

Returns or sets the thin width scale factor.

This number is used as a scale factor for thin width lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature ThinWidth

Returns:
Return type:float

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature ThinWidth

Parameters:thinWidth (float) –

New in version NX5.0.1.

License requirements: None.

WhiteBackground

PrintBuilder.WhiteBackground

Returns or sets the white background option.

When printing a shaded view, this option allows for the background to be white. Only set to true if printing Current Display and “Shaded Image” is also set to true.

-------------------------------------

Getter Method

Signature WhiteBackground

Returns:
Return type:bool

New in version NX5.0.1.

License requirements: None.

-------------------------------------

Setter Method

Signature WhiteBackground

Parameters:whiteBackground (bool) –

New in version NX5.0.1.

License requirements: None.

Width1ScaleFactor

PrintBuilder.Width1ScaleFactor

Returns or sets the width1 scale factor.

This number is used as a scale factor for width1 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width1ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width1ScaleFactor

Parameters:width1ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width2ScaleFactor

PrintBuilder.Width2ScaleFactor

Returns or sets the width2 scale factor.

This number is used as a scale factor for width2 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width2ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width2ScaleFactor

Parameters:width2ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width3ScaleFactor

PrintBuilder.Width3ScaleFactor

Returns or sets the width3 scale factor.

This number is used as a scale factor for width3 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width3ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width3ScaleFactor

Parameters:width3ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width4ScaleFactor

PrintBuilder.Width4ScaleFactor

Returns or sets the width4 scale factor.

This number is used as a scale factor for width4 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width4ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width4ScaleFactor

Parameters:width4ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width5ScaleFactor

PrintBuilder.Width5ScaleFactor

Returns or sets the width5 scale factor.

This number is used as a scale factor for width5 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width5ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width5ScaleFactor

Parameters:width5ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width6ScaleFactor

PrintBuilder.Width6ScaleFactor

Returns or sets the width6 scale factor.

This number is used as a scale factor for width6 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width6ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width6ScaleFactor

Parameters:width6ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width7ScaleFactor

PrintBuilder.Width7ScaleFactor

Returns or sets the width7 scale factor.

This number is used as a scale factor for width7 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width7ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width7ScaleFactor

Parameters:width7ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width8ScaleFactor

PrintBuilder.Width8ScaleFactor

Returns or sets the width8 scale factor.

This number is used as a scale factor for width8 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width8ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width8ScaleFactor

Parameters:width8ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Width9ScaleFactor

PrintBuilder.Width9ScaleFactor

Returns or sets the width9 scale factor.

This number is used as a scale factor for width9 lines. It cannot be less than 0.0.

-------------------------------------

Getter Method

Signature Width9ScaleFactor

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Width9ScaleFactor

Parameters:width9ScaleFactor (float) –

New in version NX8.5.0.

License requirements: None.

Method Detail

Validate

PrintBuilder.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.