NXObjectAttributeInformation_Struct Struct

NXOpen.NXObject.AttributeInformation is an alias for NXOpen.NXObjectAttributeInformation_Struct

class NXOpen.NXObjectAttributeInformation_Struct

Bases: object

Contains attribute information.

All the data members of this struct are updated with values from the attribute (some possibly to None) when an attribute is read.

The following data members of this struct are not used (they are ignored) when setting an attribute: Alias Inherited Override Required Unset Locked OwnedBySystem PdmBased

The following data of an attribute cannot be edited once the attribute is set: Type Title TitleAlias Array ArrayElementIndex The dimensionality of the Unit specification (cannot change from mm to microA, but from mm to cm is fine)

The following data of an attribute can be set and modified if and only if the attribute is not associated with a template: Category

The following data of an attribute can be set if and only if the attribute is not associated with a template. It cannot be modified once set. Array

Fields

Field Description
Type Attribute type
Category Attribute category (may be None)
Title Attribute title (for arrays, this is the array title without an appended index)
TitleAlias Attribute title alias (may be None) (for arrays, this is the array title alias, without an appended index)
BooleanValue Boolean (logical) attribute value (the default value is returned when reading templates of non-set attributes)
IntegerValue Integer attribute value (the default value is returned when reading templates of non-set attributes)
RealValue Real attribute value (the default value is returned when reading templates of non-set attributes) If the attribute has units, it is returned in the display units of the attribute
StringValue String attribute value (the default value is returned when reading templates of non-set attributes).
TimeValue Time/Date attribute value (the default value is returned when reading templates of non-set attributes).
CompTimeValue Time/Date attribute value (the default value is returned when reading templates of non-set attributes).
ReferenceValue Reference string of a string type attribute (it is None if it is a ‘normal’ string attribute).
Inherited The attribute is inherited from another object and not overridden
IsOverride The attribute is overriding an inherited attribute
Locked The attribute is locked.
OwnedBySystem This attribute is a reserved system attribute.
Required The attribute is required on the given object
Unset The attribute has not been set (i.
Array The attribute is an array attribute
PdmBased The attribute is PDM-based
NotSaved The attribute is transient - it will not be saved on part save
ArrayElementIndex If this struct represents an array attribute element, this is the index (numerical, starting with 0).
Unit The display units, if any, if the attribute is a real-type attribute
Expression The expresssion referenced by the attribute (only supported if the referenceValue is None)

Type

NXObjectAttributeInformation_Struct.Type

Attribute type -------------------------------------

Getter Method Signature Type()

Returns:
Return type:NXOpen.NXObjectAttributeType

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

Setter Method

Signature Type(value)

Parameters:value (NXOpen.NXObjectAttributeType) –

Category

NXObjectAttributeInformation_Struct.Category

Attribute category (may be None) -------------------------------------

Getter Method Signature Category()

Returns:
Return type:str

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

Setter Method

Signature Category(value)

Parameters:value (str) –

Title

NXObjectAttributeInformation_Struct.Title

Attribute title (for arrays, this is the array title without an appended index) -------------------------------------

Getter Method Signature Title()

Returns:
Return type:str

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

Setter Method

Signature Title(value)

Parameters:value (str) –

TitleAlias

NXObjectAttributeInformation_Struct.TitleAlias

Attribute title alias (may be None) (for arrays, this is the array title alias, without an appended index) -------------------------------------

Getter Method Signature TitleAlias()

Returns:
Return type:str

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

Setter Method

Signature TitleAlias(value)

Parameters:value (str) –

BooleanValue

NXObjectAttributeInformation_Struct.BooleanValue

Boolean (logical) attribute value (the default value is returned when reading templates of non-set attributes) -------------------------------------

Getter Method Signature BooleanValue()

Returns:
Return type:bool

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

Setter Method

Signature BooleanValue(value)

Parameters:value (bool) –

IntegerValue

NXObjectAttributeInformation_Struct.IntegerValue

Integer attribute value (the default value is returned when reading templates of non-set attributes) -------------------------------------

Getter Method Signature IntegerValue()

Returns:
Return type:int

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

Setter Method

Signature IntegerValue(value)

Parameters:value (int) –

RealValue

NXObjectAttributeInformation_Struct.RealValue

Real attribute value (the default value is returned when reading templates of non-set attributes) If the attribute has units, it is returned in the display units of the attribute -------------------------------------

Getter Method Signature RealValue()

Returns:
Return type:float

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

Setter Method

Signature RealValue(value)

Parameters:value (float) –

StringValue

NXObjectAttributeInformation_Struct.StringValue

String attribute value (the default value is returned when reading templates of non-set attributes).

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

Getter Method Signature StringValue()

Returns:
Return type:str

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

Setter Method

Signature StringValue(value)

Parameters:value (str) –

TimeValue

NXObjectAttributeInformation_Struct.TimeValue

Time/Date attribute value (the default value is returned when reading templates of non-set attributes).

See NXOpen.NXObjectDateAndTimeFormat for valid formats. The time value held here is in the current time zone of the machine running the program. NOTE: if both TimeValue and CompTimeValue are unset (None and (0,0), respectively) when the attribute is set, then the attribute will be set to current time and date. -------------------------------------

Getter Method Signature TimeValue()

Returns:
Return type:str

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

Setter Method

Signature TimeValue(value)

Parameters:value (str) –

CompTimeValue

NXObjectAttributeInformation_Struct.CompTimeValue

Time/Date attribute value (the default value is returned when reading templates of non-set attributes).

The time value held here is in the current time zone of the machine running the program. -------------------------------------

Getter Method Signature CompTimeValue()

Returns:
Return type:NXOpen.NXObjectComputationalTime_Struct

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

Setter Method

Signature CompTimeValue(value)

Parameters:value (NXOpen.NXObjectComputationalTime_Struct) –

ReferenceValue

NXObjectAttributeInformation_Struct.ReferenceValue

Reference string of a string type attribute (it is None if it is a ‘normal’ string attribute).

Only supported if the expression reference is None. -------------------------------------

Getter Method Signature ReferenceValue()

Returns:
Return type:str

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

Setter Method

Signature ReferenceValue(value)

Parameters:value (str) –

Inherited

NXObjectAttributeInformation_Struct.Inherited

The attribute is inherited from another object and not overridden -------------------------------------

Getter Method Signature Inherited()

Returns:
Return type:bool

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

Setter Method

Signature Inherited(value)

Parameters:value (bool) –

IsOverride

NXObjectAttributeInformation_Struct.IsOverride

The attribute is overriding an inherited attribute -------------------------------------

Getter Method Signature IsOverride()

Returns:
Return type:bool

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

Setter Method

Signature IsOverride(value)

Parameters:value (bool) –

Locked

NXObjectAttributeInformation_Struct.Locked

The attribute is locked.

When an existing attribute is read, this flag indicates that the attribute cannot currently be modified. The flag is set if the attribute is created from a template that has the ‘Locked’ flag, or if it is reserved by the system or by some other mechanism. When an unset attribute template is read, this flag indicates whether attributes created from the template will be locked when the part is saved and reloaded. -------------------------------------

Getter Method Signature Locked()

Returns:
Return type:bool

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

Setter Method

Signature Locked(value)

Parameters:value (bool) –

OwnedBySystem

NXObjectAttributeInformation_Struct.OwnedBySystem

This attribute is a reserved system attribute.

When this flag is set, the attribute can be set and removed only by the system. It is also created locked. It cannot be unlocked. -------------------------------------

Getter Method Signature OwnedBySystem()

Returns:
Return type:bool

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

Setter Method

Signature OwnedBySystem(value)

Parameters:value (bool) –

Required

NXObjectAttributeInformation_Struct.Required

The attribute is required on the given object -------------------------------------

Getter Method Signature Required()

Returns:
Return type:bool

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

Setter Method

Signature Required(value)

Parameters:value (bool) –

Unset

NXObjectAttributeInformation_Struct.Unset

The attribute has not been set (i.

e. has no value) on the object (used when getting attribute information) -------------------------------------

Getter Method Signature Unset()

Returns:
Return type:bool

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

Setter Method

Signature Unset(value)

Parameters:value (bool) –

Array

NXObjectAttributeInformation_Struct.Array

The attribute is an array attribute -------------------------------------

Getter Method Signature Array()

Returns:
Return type:bool

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

Setter Method

Signature Array(value)

Parameters:value (bool) –

PdmBased

NXObjectAttributeInformation_Struct.PdmBased

The attribute is PDM-based -------------------------------------

Getter Method Signature PdmBased()

Returns:
Return type:bool

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

Setter Method

Signature PdmBased(value)

Parameters:value (bool) –

NotSaved

NXObjectAttributeInformation_Struct.NotSaved

The attribute is transient - it will not be saved on part save -------------------------------------

Getter Method Signature NotSaved()

Returns:
Return type:bool

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

Setter Method

Signature NotSaved(value)

Parameters:value (bool) –

ArrayElementIndex

NXObjectAttributeInformation_Struct.ArrayElementIndex

If this struct represents an array attribute element, this is the index (numerical, starting with 0).

After reading an attribute, it is valid only if ‘Unset’ is ‘false’ and ‘Array’ is ‘true’. The array size can be resized only one element at a time (adding or removing the last element). -------------------------------------

Getter Method Signature ArrayElementIndex()

Returns:
Return type:int

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

Setter Method

Signature ArrayElementIndex(value)

Parameters:value (int) –

Unit

NXObjectAttributeInformation_Struct.Unit

The display units, if any, if the attribute is a real-type attribute -------------------------------------

Getter Method Signature Unit()

Returns:
Return type:NXOpen.Unit

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

Setter Method

Signature Unit(value)

Parameters:value (NXOpen.Unit) –

Expression

NXObjectAttributeInformation_Struct.Expression

The expresssion referenced by the attribute (only supported if the referenceValue is None) -------------------------------------

Getter Method Signature Expression()

Returns:
Return type:NXOpen.Expression

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

Setter Method

Signature Expression(value)

Parameters:value (NXOpen.Expression) –