WidthDefinition Class

class NXOpen.WidthDefinition

Bases: NXOpen.TaggedObject

Represents a NXOpen.WidthDefinition, which is a representation of an NX width palette.

It gives the units in which all the widths are stored, single width information, the 3 custom width definitions, and an entry for each color.

New in version NX5.0.0.

Properties

Property Description
Single Returns or sets the single width type selection
SingleSource Returns or sets the single source.
SingleWidth Returns or sets the single width.
Tag Returns the Tag for this object.
Units Returns or sets the units.
Use Returns or sets the ‘use’ member.

Methods

Method Description
GetColorWidths Gets the color widths.
GetCustomWidths Gets the custom widths array.

Property Detail

Single

WidthDefinition.Single

Returns or sets the single width type selection

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

Getter Method

Signature Single

Returns:
Return type:int

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Single

Parameters:single (int) –

New in version NX5.0.0.

License requirements: None.

SingleSource

WidthDefinition.SingleSource

Returns or sets the single source.

The ‘single_source’ member contains a value when the ‘single’ member is CGME_width_std or CGME_width_custom. The value is the index in the ‘custom’ width array or the standard width index value. Both are assumed to be in internal order, normal, thick, and thin for 0, 1, and 2, respectively.

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

Getter Method

Signature SingleSource

Returns:
Return type:int

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature SingleSource

Parameters:singleSource (int) –

New in version NX5.0.0.

License requirements: None.

SingleWidth

WidthDefinition.SingleWidth

Returns or sets the single width.

The ‘single_width’ member contains the last-typed value for the user-defined width to use when CGME_width_user is selected for member ‘single’.

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

Getter Method

Signature SingleWidth

Returns:
Return type:float

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature SingleWidth

Parameters:singleWidth (float) –

New in version NX5.0.0.

License requirements: None.

Units

WidthDefinition.Units

Returns or sets the units.

All the widths are stored in these units.

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

Getter Method

Signature Units

Returns:
Return type:int

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Units

Parameters:units (int) –

New in version NX5.0.0.

License requirements: None.

Use

WidthDefinition.Use

Returns or sets the ‘use’ member.

The use member specifies the primary selection of which type of width assignment to use.

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

Getter Method

Signature Use

Returns:
Return type:int

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Use

Parameters:use (int) –

New in version NX5.0.0.

License requirements: None.

Method Detail

GetColorWidths

WidthDefinition.GetColorWidths

Gets the color widths.

The ‘widths’ array is indexed by the color index straight out of the database, or 1-216. Therefore the array is one longer than the actual number of colors, or 217.

Signature GetColorWidths()

Returns:Array of ColorWidth objects.
Return type:list of NXOpen.ColorWidth

New in version NX5.0.0.

License requirements: None.

GetCustomWidths

WidthDefinition.GetCustomWidths

Gets the custom widths array.

There will be 3 CustomWidth objects.

Signature GetCustomWidths()

Returns:Array of CustomWidth objects.
Return type:list of NXOpen.CustomWidth

New in version NX5.0.0.

License requirements: None.