DecalBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# DecalBuilder Class

class `NXOpen.Display.``DecalBuilder`

  Bases: `NXOpen.Builder`

  Represents a `NXOpen.Display.DecalBuilder`

  This class is restricted to being called from a program running during an Interactive NX session. If run from a non-interactive session it will return None.

  New in version NX6.0.0.

# Properties

Property | Description
--- | ---
AnchorType | Returns or sets the anchor type
AspectRatio | Returns or sets the decal image aspect ratio
DecalName | Returns or sets the decal name
DecalReflectivity | Returns or sets the decal reflectivity
EnableEngraving | Returns or sets the engraving enable toggle
EngravingAmplitude | Returns or sets the decal engraving amplitude
EngravingSoftness | Returns or sets the engraving softness
HeightScale | Returns or sets the decal height scale
IlluminationType | Returns or sets the illumination type
Image | Returns or sets the image builder
ImageFilename | Returns or sets the decal image file name
ImageSizeType | Returns or sets the image size type
NormalVector | Returns or sets the decal normal vector
NormalVectorValue | Returns or sets the decal normal vector value
Object | Returns the object(face, body and facetted body) to apply the decal to
Origin | Returns or sets the origin
OriginPosition | Returns or sets the origin_pos
OverwriteExistingFile | Returns or sets the overwrite existing file option - true to overwrite and return no error, false to return error
ReflectivityType | Returns or sets the reflectivity type
Rotation | Returns or sets the decal rotation
Scale | Returns or sets the decal scale
ScalingType | Returns or sets the scaling type
StencilPreview | Returns or sets the stencil preview toggle
Tag | Returns the Tag for this object.
TransparencyTolerance | Returns or sets the transparency tolerance
UpVector | Returns or sets the decal up vector
UpVectorValue | Returns or sets the decal up vector value
WidthScale | Returns or sets the decal width scale

# 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.
GetImagesInPart | Provide a list of names of the `NXOpen.Display.ImageData` objects saved in current part file.
GetTransparencyColor | Returns the transparency color
SetImageFromPart | Set a `NXOpen.Display.ImageData` object currently stored in the part as the image used by the builder.
SetTransparencyColor | Sets the transparency color
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

DecalBuilderAnchor Enumeration | image anchor
DecalBuilderDecalIllumination Enumeration | decal illumination type
DecalBuilderDecalReflectivities Enumeration | decal reflectivity type
DecalBuilderImageSize Enumeration | image size type
DecalBuilderScaling Enumeration | decal scaling type

# Property Detail

## AnchorType

`DecalBuilder.``AnchorType`

  Returns or sets the anchor type

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

  Getter Method

  Signature `AnchorType`

  Returns: |
  Return type: | `NXOpen.Display.DecalBuilderAnchor`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `AnchorType`

  Parameters: | anchorType (`NXOpen.Display.DecalBuilderAnchor`) –

  New in version NX6.0.0.

  License requirements: None.

## AspectRatio

`DecalBuilder.``AspectRatio`

  Returns or sets the decal image aspect ratio

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

  Getter Method

  Signature `AspectRatio`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `AspectRatio`

  Parameters: | aspectRatio (float) –

  New in version NX6.0.0.

  License requirements: None.

## DecalName

`DecalBuilder.``DecalName`

  Returns or sets the decal name

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

  Getter Method

  Signature `DecalName`

  Returns: |
  Return type: | str

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `DecalName`

  Parameters: | decalName (str) –

  New in version NX6.0.0.

  License requirements: None.

## DecalReflectivity

`DecalBuilder.``DecalReflectivity`

  Returns or sets the decal reflectivity

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

  Getter Method

  Signature `DecalReflectivity`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `DecalReflectivity`

  Parameters: | decalReflectivity (float) –

  New in version NX6.0.0.

  License requirements: None.

## EnableEngraving

`DecalBuilder.``EnableEngraving`

  Returns or sets the engraving enable toggle

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

  Getter Method

  Signature `EnableEngraving`

  Returns: |
  Return type: | bool

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `EnableEngraving`

  Parameters: | enableEngraving (bool) –

  New in version NX6.0.0.

  License requirements: None.

## EngravingAmplitude

`DecalBuilder.``EngravingAmplitude`

  Returns or sets the decal engraving amplitude

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

  Getter Method

  Signature `EngravingAmplitude`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `EngravingAmplitude`

  Parameters: | engravingAmplitude (float) –

  New in version NX6.0.0.

  License requirements: None.

## EngravingSoftness

`DecalBuilder.``EngravingSoftness`

  Returns or sets the engraving softness

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

  Getter Method

  Signature `EngravingSoftness`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `EngravingSoftness`

  Parameters: | engravingSoftness (float) –

  New in version NX6.0.0.

  License requirements: None.

## HeightScale

`DecalBuilder.``HeightScale`

  Returns or sets the decal height scale

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

  Getter Method

  Signature `HeightScale`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `HeightScale`

  Parameters: | heightScale (float) –

  New in version NX6.0.0.

  License requirements: None.

## IlluminationType

`DecalBuilder.``IlluminationType`

  Returns or sets the illumination type

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

  Getter Method

  Signature `IlluminationType`

  Returns: |
  Return type: | `NXOpen.Display.DecalBuilderDecalIllumination`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `IlluminationType`

  Parameters: | illuminationType (`NXOpen.Display.DecalBuilderDecalIllumination`) –

  New in version NX6.0.0.

  License requirements: None.

## Image

`DecalBuilder.``Image`

  Returns or sets the image builder

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

  Getter Method

  Signature `Image`

  Returns: |
  Return type: | `NXOpen.Display.Image`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Image`

  Parameters: | imageBuilder (`NXOpen.Display.Image`) –

  New in version NX6.0.0.

  License requirements: None.

## ImageFilename

`DecalBuilder.``ImageFilename`

  Returns or sets the decal image file name

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

  Getter Method

  Signature `ImageFilename`

  Returns: |
  Return type: | str

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ImageFilename`

  Parameters: | imageFileName (str) –

  New in version NX6.0.0.

  License requirements: None.

## ImageSizeType

`DecalBuilder.``ImageSizeType`

  Returns or sets the image size type

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

  Getter Method

  Signature `ImageSizeType`

  Returns: |
  Return type: | `NXOpen.Display.DecalBuilderImageSize`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ImageSizeType`

  Parameters: | imageSizeType (`NXOpen.Display.DecalBuilderImageSize`) –

  New in version NX6.0.0.

  License requirements: None.

## NormalVector

`DecalBuilder.``NormalVector`

  Returns or sets the decal normal vector

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

  Getter Method

  Signature `NormalVector`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `NormalVector`

  Parameters: | normalVector (`NXOpen.Direction`) –

  New in version NX6.0.0.

  License requirements: None.

## NormalVectorValue

`DecalBuilder.``NormalVectorValue`

  Returns or sets the decal normal vector value

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

  Getter Method

  Signature `NormalVectorValue`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `NormalVectorValue`

  Parameters: | normalVectorValue (`NXOpen.Vector3d`) –

  New in version NX6.0.0.

  License requirements: None.

## Object

`DecalBuilder.``Object`

  Returns the object(face, body and facetted body) to apply the decal to

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

  Getter Method

  Signature `Object`

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

  New in version NX6.0.0.

  License requirements: None.

## Origin

`DecalBuilder.``Origin`

  Returns or sets the origin

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

  Getter Method

  Signature `Origin`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Origin`

  Parameters: | origin (`NXOpen.Point`) –

  New in version NX6.0.0.

  License requirements: None.

## OriginPosition

`DecalBuilder.``OriginPosition`

  Returns or sets the origin_pos

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

  Getter Method

  Signature `OriginPosition`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `OriginPosition`

  Parameters: | originPosition (`NXOpen.Point3d`) –

  New in version NX6.0.0.

  License requirements: None.

## OverwriteExistingFile

`DecalBuilder.``OverwriteExistingFile`

  Returns or sets the overwrite existing file option - true to overwrite and return no error, false to return error

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

  Getter Method

  Signature `OverwriteExistingFile`

  Returns: |
  Return type: | bool

  New in version NX10.0.3.

  License requirements: None.

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

  Setter Method

  Signature `OverwriteExistingFile`

  Parameters: | overwriteExistingFile (bool) –

  New in version NX10.0.3.

  License requirements: None.

## ReflectivityType

`DecalBuilder.``ReflectivityType`

  Returns or sets the reflectivity type

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

  Getter Method

  Signature `ReflectivityType`

  Returns: |
  Return type: | `NXOpen.Display.DecalBuilderDecalReflectivities`

  New in version NX10.0.2.

  License requirements: None.

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

  Setter Method

  Signature `ReflectivityType`

  Parameters: | reflectivityType (`NXOpen.Display.DecalBuilderDecalReflectivities`) –

  New in version NX10.0.2.

  License requirements: None.

## Rotation

`DecalBuilder.``Rotation`

  Returns or sets the decal rotation

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

  Getter Method

  Signature `Rotation`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Rotation`

  Parameters: | rotation (float) –

  New in version NX6.0.0.

  License requirements: None.

## Scale

`DecalBuilder.``Scale`

  Returns or sets the decal 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.

## ScalingType

`DecalBuilder.``ScalingType`

  Returns or sets the scaling type

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

  Getter Method

  Signature `ScalingType`

  Returns: |
  Return type: | `NXOpen.Display.DecalBuilderScaling`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ScalingType`

  Parameters: | scalingType (`NXOpen.Display.DecalBuilderScaling`) –

  New in version NX6.0.0.

  License requirements: None.

## StencilPreview

`DecalBuilder.``StencilPreview`

  Returns or sets the stencil preview toggle

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

  Getter Method

  Signature `StencilPreview`

  Returns: |
  Return type: | bool

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `StencilPreview`

  Parameters: | stencilPreview (bool) –

  New in version NX6.0.0.

  License requirements: None.

## TransparencyTolerance

`DecalBuilder.``TransparencyTolerance`

  Returns or sets the transparency tolerance

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

  Getter Method

  Signature `TransparencyTolerance`

  Returns: |
  Return type: | int

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `TransparencyTolerance`

  Parameters: | transparencyTolerance (int) –

  New in version NX6.0.0.

  License requirements: None.

## UpVector

`DecalBuilder.``UpVector`

  Returns or sets the decal up vector

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

  Getter Method

  Signature `UpVector`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `UpVector`

  Parameters: | upVector (`NXOpen.Direction`) –

  New in version NX6.0.0.

  License requirements: None.

## UpVectorValue

`DecalBuilder.``UpVectorValue`

  Returns or sets the decal up vector value

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

  Getter Method

  Signature `UpVectorValue`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `UpVectorValue`

  Parameters: | upVectorValue (`NXOpen.Vector3d`) –

  New in version NX6.0.0.

  License requirements: None.

## WidthScale

`DecalBuilder.``WidthScale`

  Returns or sets the decal width scale

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

  Getter Method

  Signature `WidthScale`

  Returns: |
  Return type: | float

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `WidthScale`

  Parameters: | widthScale (float) –

  New in version NX6.0.0.

  License requirements: None.

# Method Detail

## GetImagesInPart

`DecalBuilder.``GetImagesInPart`

  Provide a list of names of the `NXOpen.Display.ImageData` objects saved in current part file.

  Signature `GetImagesInPart()`

  Returns: | Array of `NXOpen.Display.ImageData` names
  Return type: | list of str

  New in version NX10.0.0.

  License requirements: None.

## GetTransparencyColor

`DecalBuilder.``GetTransparencyColor`

  Returns the transparency color

  Signature `GetTransparencyColor()`

  Returns: |
  Return type: | list of float

  New in version NX6.0.0.

  License requirements: None.

## SetImageFromPart

`DecalBuilder.``SetImageFromPart`

  Set a `NXOpen.Display.ImageData` object currently stored in the part as the image used by the builder.

  Signature `SetImageFromPart(imageName)`

  Parameters: | imageName (str) – Name of `NXOpen.Display.ImageData` object

  New in version NX10.0.0.

  License requirements: None.

## SetTransparencyColor

`DecalBuilder.``SetTransparencyColor`

  Sets the transparency color

  Signature `SetTransparencyColor(transparencyColor)`

  Parameters: | transparencyColor (list of float) –

  New in version NX6.0.0.

  License requirements: None.

## Validate

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