CGMBuilder Class¶
-
class
NXOpen.
CGMBuilder
¶ Bases:
NXOpen.Builder
Represents a
NXOpen.CGMBuilder
to be used when exporting the Current Display or drawing sheets to a CGM.This class is created using
NXOpen.PlotManager
.All sheets provided must be in the displayed part.
The user must specify the sheets to be exported by setting the appropriate fields through the
NXOpen.PlotSourceBuilder
.If running in native mode, use the Filenames field to specify the full path location of the CGM(s).
If running Teamcenter, there are several options: 1. Exporting a single CGM. More than one sheet can be exported to one CGM if the Multiple option is set to Single. The Dataset Name field must be filled with one dataset name. 2. Exporting multiple CGMs. This requires the Dataset Names field to be filled with the same number of dataset names as sheets selected for export. The Multiple option needs to be set to Individual for this functionality. 3. Overwriting an existing CGM. This requires the Dataset Name field to be filled with the dataset name that is to be overwritten. 4. Export CGM(s) locally. This is possible by setting the Action option to File Browser. If exporting locally then the Filenames field must be set with full path filenames. All options when exporting to Teamcenter require the Dataset Type and Named Reference Type fields to be set.
To create a new instance of this class, use
NXOpen.PlotManager.CreateCgmBuilder()
Default values.
Property Value Action CreateNew Colors AsDisplayed ImageResolution Draft Multiple Individual OutputText Text RasterImages 0 Scale 1 ShadedGeometry 0 Size FullScale Units Metric VdcCoordinates Real Widths StandardWidths XDimension 0 YDimension 0 New in version NX6.0.0.
Properties¶
Property | Description |
---|---|
Action | Returns or sets the action option to be used when exporting the CGM file when in Teamcenter mode. |
Colors | Returns or sets the color option to be used when creating the CGM. |
CustomSymbolsInForeground | Returns or sets the plotting custom symbols in the foreground option. |
DatasetType | Returns or sets the dataset type to be used when exporting a CGM to Teamcenter |
ImageResolution | Returns or sets the resolution of images created for export of shaded views. |
Multiple | Returns or sets the multiple option is used when more than one drawing is exported. |
NamedReferenceType | Returns or sets the named reference type to be used when exporting a CGM to Teamcenter |
OutputText | Returns or sets the output text of the CGM. |
RasterImages | Returns or sets the Raster Images option. |
Relation | Returns or sets the relation to be used when exporting a CGM to Teamcenter |
Scale | Returns or sets the scale factor to be used when creating a CGM. |
ShadedGeometry | Returns or sets the Shaded Geometry as Wireframe option. |
Size | Returns or sets the size of the CGM. |
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. |
VdcCoordinates | Returns or sets the Virtual Display Coordinates. |
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 |
---|---|
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. |
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. |
GetDatasetNames | Gets the dataset names to be used when creating CGMs in a Teamcenter environment. |
GetFilenames | Gets all the CGM filenames. |
GetObject | Returns the object currently being edited by this builder. |
GetWidthDefinition | Returns a NXOpen.WidthDefinition object representing the Width Palette. |
SetDatasetNames | Sets all the dataset names to be used when creating CGMs in a Teamcenter environment. |
SetFilenames | Sets all the CGM filenames. |
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¶
CGMBuilderActionOption Enumeration | Specifies the action option to be used when running Teamcenter |
CGMBuilderColor Enumeration | Specifies the color option to use when creating the CGM |
CGMBuilderImageResolutionOption Enumeration | Specifies the image resolution when exporting a raster image |
CGMBuilderMultipleOption Enumeration | Specifies how to export multiple drawing sheets in Native mode |
CGMBuilderOutputTextOption Enumeration | Specifies the text option, as either text or polylines |
CGMBuilderRelationOption Enumeration | Specifies the relation to use when exporting a CGM to Teamcenter |
CGMBuilderSizeOption Enumeration | Specifies the size option of the CGM. |
CGMBuilderUnitsOption Enumeration | Specifies which units are associated to the dimensions |
CGMBuilderVdc Enumeration | Specifies the VDC coordinates to use when creating the CGM |
CGMBuilderWidth Enumeration | Specifies the primary selection of which type of width assignment to use. |
Property Detail¶
Action¶
-
CGMBuilder.
Action
¶ Returns or sets the action option to be used when exporting the CGM file when in Teamcenter mode.
File Browser allows for the CGM to be saved locally. Overwrite allows for the newly created CGM to overwrite a given existing CGM dataset in Teamcenter. Create New allows for the CGM(s) to be created and imported as new datasets. If File Browser is selected, the Filenames field must be filled with full path filenames, other wise the Dataset Names field must be filled.
-------------------------------------
Getter Method
Signature
Action
Returns: Return type: NXOpen.CGMBuilderActionOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Action
Parameters: action ( NXOpen.CGMBuilderActionOption
) –New in version NX6.0.0.
License requirements: None.
Colors¶
-
CGMBuilder.
Colors
¶ Returns or sets the color option to be used when creating the CGM.
If the color option is set to Custom Palette or Colors By Width then the CGM will be created with the user defined color attributes belonging to the CDF object.
-------------------------------------
Getter Method
Signature
Colors
Returns: Return type: NXOpen.CGMBuilderColor
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Colors
Parameters: colors ( NXOpen.CGMBuilderColor
) –New in version NX6.0.0.
License requirements: None.
CustomSymbolsInForeground¶
-
CGMBuilder.
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.
DatasetType¶
-
CGMBuilder.
DatasetType
¶ Returns or sets the dataset type to be used when exporting a CGM to Teamcenter
-------------------------------------
Getter Method
Signature
DatasetType
Returns: Return type: str New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DatasetType
Parameters: datasetType (str) – New in version NX6.0.0.
License requirements: None.
ImageResolution¶
-
CGMBuilder.
ImageResolution
¶ Returns or sets the resolution of images created for export of shaded views.
-------------------------------------
Getter Method
Signature
ImageResolution
Returns: Return type: NXOpen.CGMBuilderImageResolutionOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ImageResolution
Parameters: imageResolution ( NXOpen.CGMBuilderImageResolutionOption
) –New in version NX6.0.0.
License requirements: None.
Multiple¶
-
CGMBuilder.
Multiple
¶ Returns or sets the multiple option is used when more than one drawing is exported.
If it is set to individual, then each drawing will be saved as an individual CGM. In this case, the number of filenames must equal the number of sheets selected. If it is set to single, then all drawings will be appended to one CGM file. In this case, only one filename is needed.
-------------------------------------
Getter Method
Signature
Multiple
Returns: Return type: NXOpen.CGMBuilderMultipleOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Multiple
Parameters: multiple ( NXOpen.CGMBuilderMultipleOption
) –New in version NX6.0.0.
License requirements: None.
NamedReferenceType¶
-
CGMBuilder.
NamedReferenceType
¶ Returns or sets the named reference type to be used when exporting a CGM to Teamcenter
-------------------------------------
Getter Method
Signature
NamedReferenceType
Returns: Return type: str New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
NamedReferenceType
Parameters: namedReferenceType (str) – New in version NX6.0.0.
License requirements: None.
OutputText¶
-
CGMBuilder.
OutputText
¶ Returns or sets the output text of the CGM.
This will determine whether the drawing text will be exported as text or as polylines.
-------------------------------------
Getter Method
Signature
OutputText
Returns: Return type: NXOpen.CGMBuilderOutputTextOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
OutputText
Parameters: outputText ( NXOpen.CGMBuilderOutputTextOption
) –New in version NX6.0.0.
License requirements: None.
RasterImages¶
-
CGMBuilder.
RasterImages
¶ Returns or sets the Raster Images option.
This option determines whether or not raster images will be exported to the CGM.
-------------------------------------
Getter Method
Signature
RasterImages
Returns: Return type: bool New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
RasterImages
Parameters: rasterImages (bool) – New in version NX6.0.0.
License requirements: None.
Relation¶
-
CGMBuilder.
Relation
¶ Returns or sets the relation to be used when exporting a CGM to Teamcenter
-------------------------------------
Getter Method
Signature
Relation
Returns: Return type: NXOpen.CGMBuilderRelationOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Relation
Parameters: relation ( NXOpen.CGMBuilderRelationOption
) –New in version NX6.0.0.
License requirements: None.
Scale¶
-
CGMBuilder.
Scale
¶ Returns or sets the scale factor to be used when creating a CGM.
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 NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Scale
Parameters: scale (float) – New in version NX6.0.0.
License requirements: None.
ShadedGeometry¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ShadedGeometry
Parameters: shadedGeometry (bool) – New in version NX6.0.0.
License requirements: None.
Size¶
-
CGMBuilder.
Size
¶ Returns or sets the size of the CGM.
If the size is set to Scale, then the CGM will use the user-defined Scale Factor. If the size is set to dimension, then the CGM will use the user-defined X and Y dimensions.
-------------------------------------
Getter Method
Signature
Size
Returns: Return type: NXOpen.CGMBuilderSizeOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Size
Parameters: size ( NXOpen.CGMBuilderSizeOption
) –New in version NX6.0.0.
License requirements: None.
SourceBuilder¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
Units¶
-
CGMBuilder.
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.CGMBuilderUnitsOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Units
Parameters: units ( NXOpen.CGMBuilderUnitsOption
) –New in version NX6.0.0.
License requirements: None.
VdcCoordinates¶
-
CGMBuilder.
VdcCoordinates
¶ Returns or sets the Virtual Display Coordinates.
This option determines whether the CGM will be created with real or integer vdc coordinates.
-------------------------------------
Getter Method
Signature
VdcCoordinates
Returns: Return type: NXOpen.CGMBuilderVdc
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
VdcCoordinates
Parameters: vdc ( NXOpen.CGMBuilderVdc
) –New in version NX6.0.0.
License requirements: None.
Widths¶
-
CGMBuilder.
Widths
¶ Returns or sets the width option.
If the width option is set to Single Width, Custom Three Widths, or Custom Palette then the CGM will be created with the user defined width attributes belonging to the WidthDefinition object.
-------------------------------------
Getter Method
Signature
Widths
Returns: Return type: NXOpen.CGMBuilderWidth
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Widths
Parameters: widths ( NXOpen.CGMBuilderWidth
) –New in version NX6.0.0.
License requirements: None.
XDimension¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
XDimension
Parameters: xDimension (float) – New in version NX6.0.0.
License requirements: None.
YDimension¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
YDimension
Parameters: yDimension (float) – New in version NX6.0.0.
License requirements: None.
Method Detail¶
CreateCdf¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
CreateWidthDefinition¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
GetCdf¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
GetDatasetNames¶
-
CGMBuilder.
GetDatasetNames
¶ Gets the dataset names to be used when creating CGMs in a Teamcenter environment.
There will be one dataset name for each CGM.
Signature
GetDatasetNames()
Returns: Return type: list of str New in version NX6.0.0.
License requirements: None.
GetFilenames¶
-
CGMBuilder.
GetFilenames
¶ Gets all the CGM filenames.
This list will contain the full path for each CGM to be created.
Signature
GetFilenames()
Returns: Return type: list of str New in version NX6.0.0.
License requirements: None.
GetWidthDefinition¶
-
CGMBuilder.
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 NX6.0.0.
License requirements: None.
SetDatasetNames¶
-
CGMBuilder.
SetDatasetNames
¶ Sets all the dataset names to be used when creating CGMs in a Teamcenter environment.
The exact contents of this list will be used as the dataset names, one for each CGM.
Signature
SetDatasetNames(datasetNames)
Parameters: datasetNames (list of str) – New in version NX6.0.0.
License requirements: None.
SetFilenames¶
-
CGMBuilder.
SetFilenames
¶ Sets all the CGM filenames.
This list will contain the full path for each CGM to be created. If the Multiple option is set to Single, then only one filename is needed. If the Multiple option is set to Individual, then the number of filenames must equal the number of sheets selected for export.
Signature
SetFilenames(filenames)
Parameters: filenames (list of str) – New in version NX6.0.0.
License requirements: None.
Validate¶
-
CGMBuilder.
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.