NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::AttributePropertiesBaseBuilder Class Reference

Represents an NXOpen::AttributePropertiesBaseBuilder to be used for creating attributes. More...

Inheritance diagram for NXOpen::AttributePropertiesBaseBuilder:
NXOpen::Builder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder NXOpen::AttributePropertiesBuilder NXOpen::PDM::PartCreationObjectAttributePropertiesBuilder NXOpen::PDM::PartOperationAttributePropertiesBuilder NXOpen::PDM::PartOperationValidationPropertiesBuilder

Public Types

enum  BooleanValueOptions { BooleanValueOptionsFalse, BooleanValueOptionsTrue }
 The value choices for an attribute of type Boolean. More...
 
enum  DataTypeOptions {
  DataTypeOptionsNull, DataTypeOptionsBoolean, DataTypeOptionsInteger, DataTypeOptionsNumber,
  DataTypeOptionsString, DataTypeOptionsDate
}
 Specifies the data type of the attribute, this cannot be changed once the attribute has been created. More...
 
enum  ObjectOptions {
  ObjectOptionsObject, ObjectOptionsFeature, ObjectOptionsOccurrence, ObjectOptionsComponentInstance,
  ObjectOptionsReferenceSet, ObjectOptionsObjectInComponentPart, ObjectOptionsComponentAsPartAttribute, ObjectOptionsEmpty
}
 Specifies which object will be used when applying attributes. More...
 

Public Member Functions

bool ApplyUnits ()
 Apply the units currently set on the builder to any objects that have a value set for the current attribute. More...
 
int ArrayIndex ()
 Returns the array index. More...
 
NXOpen::AttributePropertiesBaseBuilder::BooleanValueOptions BooleanValue ()
 Returns the boolean value. More...
 
NXString Category ()
 Returns the category. More...
 
bool CreateAttribute ()
 Create the attribute from the data set in the builder. More...
 
NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions DataType ()
 Returns the data type, which determines the type of attribute to be created. More...
 
NXOpen::DateBuilderDateValue ()
 Returns the date value. More...
 
void Delete (NXOpen::NXObject *object)
 Delete the attribute from the given object. More...
 
void DeleteArray (NXOpen::NXObject *object)
 Delete the attribute array from the given object. More...
 
NXOpen::ExpressionExpression ()
 Returns the expression referenced from this attribute. More...
 
int IntegerValue ()
 Returns the integer value. More...
 
bool IsArray ()
 Returns the 'is array' flag is set for attributes that have more than one value. More...
 
bool IsReferenceType ()
 Returns the 'is reference type' flag is set for attributes that are linked to system expressions. More...
 
bool LockOnSave ()
 Returns the 'LockOnSave' flag is set for attributes that will be locked once the part is saved (and reloaded)
Created in NX8.0.0. More...
 
double NumberValue ()
 Returns the number value. More...
 
NXOpen::AttributePropertiesBaseBuilder::ObjectOptions ObjectPicker ()
 Returns the object picker. More...
 
NXOpen::SelectNXObjectListSelectedObjects ()
 Returns the selected object(s) list. More...
 
void SetArray (bool isArray)
 Sets the 'is array' flag is set for attributes that have more than one value. More...
 
void SetArrayIndex (int arrayIndex)
 Sets the array index. More...
 
void SetAttributeObjects (const std::vector< NXOpen::NXObject * > &objects)
 Sets the array of objects that have this attribute
Created in NX8.5.0. More...
 
void SetBooleanValue (NXOpen::AttributePropertiesBaseBuilder::BooleanValueOptions boolValue)
 Sets the boolean value. More...
 
void SetCategory (const NXString &category)
 Sets the category. More...
 
void SetCategory (const char *category)
 Sets the category. More...
 
void SetDataType (NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions dataType)
 Sets the data type, which determines the type of attribute to be created. More...
 
void SetExpression (NXOpen::Expression *expression)
 Sets the expression referenced from this attribute. More...
 
void SetIntegerValue (int integerValue)
 Sets the integer value. More...
 
void SetLockOnSave (bool lockOnSave)
 Sets the 'LockOnSave' flag is set for attributes that will be locked once the part is saved (and reloaded)
Created in NX8.0.0. More...
 
void SetNumberValue (double numberValue)
 Sets the number value. More...
 
void SetObjectPicker (NXOpen::AttributePropertiesBaseBuilder::ObjectOptions objectPicker)
 Sets the object picker. More...
 
void SetReferenceType (bool isReferenceType)
 Sets the 'is reference type' flag is set for attributes that are linked to system expressions. More...
 
void SetStringValue (const NXString &stringValue)
 Sets the string value. More...
 
void SetStringValue (const char *stringValue)
 Sets the string value. More...
 
void SetTitle (const NXString &title)
 Sets the attribute title. More...
 
void SetTitle (const char *title)
 Sets the attribute title. More...
 
void SetUnits (const NXString &units)
 Sets the units associated with an attribute of type Number. More...
 
void SetUnits (const char *units)
 Sets the units associated with an attribute of type Number. More...
 
void SetValueAlias (const NXString &valueAlias)
 Sets the value alias. More...
 
void SetValueAlias (const char *valueAlias)
 Sets the value alias. More...
 
NXString StringValue ()
 Returns the string value. More...
 
NXString Title ()
 Returns the attribute title. More...
 
NXString Units ()
 Returns the units associated with an attribute of type Number. More...
 
NXString ValueAlias ()
 Returns the value alias. More...
 
- Public Member Functions inherited from NXOpen::Builder
NXOpen::NXObjectCommit ()
 Commits any edits that have been applied to the builder. More...
 
void Destroy ()
 Deletes the builder, and cleans up any objects created by the builder. More...
 
std::vector< NXOpen::NXObject * > GetCommittedObjects ()
 For builders that create more than one object, this method returns the objects that are created by commit. More...
 
NXOpen::NXObjectGetObject ()
 Returns the object currently being edited by this builder. More...
 
void ShowResults ()
 Updates the model to reflect the result of an edit to the model for all builders that support showing results. More...
 
virtual bool Validate ()
 Validate whether the inputs to the component are sufficient for commit to be called. More...
 
- Public Member Functions inherited from NXOpen::TaggedObject
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Represents an NXOpen::AttributePropertiesBaseBuilder to be used for creating attributes.

A basic attribute consists of a title, a type, and a value. There are six types of attributes: Null, Boolean, Integer, Number, String, and Date. The type detemines which value field will be read during creation. An attribute may reference an expression instead of setting a value. In this case, the referenced expression's value will also serve as the attribute's value and will update when the expression changes.

If an attribute template exists with the same title as the attribute, then the attribute will assume all characteristics of the cooresponding template including the type. Attribute templates reside at the part level and provide extra information for referencing attributes. They are created using NXOpen::AttributeTemplatesBuilder .

The attribute will be distributed to all objects supplied in the selected object list.
This is an abstract class, and cannot be instantiated.

Created in NX8.0.0.

Member Enumeration Documentation

The value choices for an attribute of type Boolean.

Enumerator
BooleanValueOptionsFalse 

False.

BooleanValueOptionsTrue 

True.

Specifies the data type of the attribute, this cannot be changed once the attribute has been created.

Enumerator
DataTypeOptionsNull 

Null, the attribute will have no value.

DataTypeOptionsBoolean 

Boolean, the value will be true or false.

DataTypeOptionsInteger 

Integer, the value is a whole number.

DataTypeOptionsNumber 

Number, the value is a floating point number and may contain units.

DataTypeOptionsString 

String, the value will be a textual string.

DataTypeOptionsDate 

Date, the value will be date and time.

Specifies which object will be used when applying attributes.

The options available are determined by the objects passed in. These options will not be used if the object passed in is a part.

Deprecated:
Deprecated in NX8.5.0. Use NXOpen::AttributePropertiesBaseBuilder::SetAttributeObjects instead.
Enumerator
ObjectOptionsObject 

Apply attribute to the object in the select object list.

ObjectOptionsFeature 

Apply attribute to the feature in the select object list.

ObjectOptionsOccurrence 

Apply attribute to the occurrence only.

ObjectOptionsComponentInstance 

Apply attribute to the instance of the component.

All occurrences of the instance will inherit this attribute.

ObjectOptionsReferenceSet 

Apply attribute to the reference set.

ObjectOptionsObjectInComponentPart 

Apply attribute to the object in the component part.

ObjectOptionsComponentAsPartAttribute 

Apply attribute to the component as a part attribute.

ObjectOptionsEmpty 

No objects are contained in the select object list.

Member Function Documentation

bool NXOpen::AttributePropertiesBaseBuilder::ApplyUnits ( )

Apply the units currently set on the builder to any objects that have a value set for the current attribute.

This method does not apply the current value set on the builder. NXOpen::AttributePropertiesBaseBuilder::CreateAttribute should be used for doing that.

Returns
True if attributes were updated successfully
Created in NX11.0.0.

License requirements : None
int NXOpen::AttributePropertiesBaseBuilder::ArrayIndex ( )

Returns the array index.

Required if modifying an attribute that has more than one value. The IsArray flag must also be set.
Created in NX8.0.0.

License requirements : None

NXOpen::AttributePropertiesBaseBuilder::BooleanValueOptions NXOpen::AttributePropertiesBaseBuilder::BooleanValue ( )

Returns the boolean value.

Required if creating an attribute of type Boolean.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributePropertiesBaseBuilder::Category ( )

Returns the category.

The category is an optional, user-defined string that allows attributes to be grouped together.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributePropertiesBaseBuilder::CreateAttribute ( )

Create the attribute from the data set in the builder.

Unlike calling commit, this method will not perform an update.

Returns
True if the attribute was created/edited successfully
Created in NX8.0.0.

License requirements : None
NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions NXOpen::AttributePropertiesBaseBuilder::DataType ( )

Returns the data type, which determines the type of attribute to be created.

Once the attribute is created, the data type cannot be modified.
Created in NX8.0.0.

License requirements : None

NXOpen::DateBuilder* NXOpen::AttributePropertiesBaseBuilder::DateValue ( )

Returns the date value.

The Date object will contain the value for an attribute of type Date.
Created in NX8.0.0.

License requirements : None

void NXOpen::AttributePropertiesBaseBuilder::Delete ( NXOpen::NXObject object)

Delete the attribute from the given object.


Created in NX8.0.0.

License requirements : None

Parameters
objectThe object containing the attribute
void NXOpen::AttributePropertiesBaseBuilder::DeleteArray ( NXOpen::NXObject object)

Delete the attribute array from the given object.


Created in NX8.0.0.

License requirements : None

Parameters
objectThe object containing the attribute
NXOpen::Expression* NXOpen::AttributePropertiesBaseBuilder::Expression ( )

Returns the expression referenced from this attribute.

Only used for attributes of type Number, Integer, Boolean, and String. If an expression is referenced, no value fields need to be set, as the attribute uses the value from the expression.
Created in NX8.0.0.

License requirements : None

int NXOpen::AttributePropertiesBaseBuilder::IntegerValue ( )

Returns the integer value.

Required if creating an attribute of type Integer.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributePropertiesBaseBuilder::IsArray ( )

Returns the 'is array' flag is set for attributes that have more than one value.

When this is set, the index needs to be provided to indicate which element will be modified.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributePropertiesBaseBuilder::IsReferenceType ( )

Returns the 'is reference type' flag is set for attributes that are linked to system expressions.

The type must also be set to String for the Reference attribut to be created/edited. If a Reference attribute is no longer linked to a system expression, it will become a String attribute.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributePropertiesBaseBuilder::LockOnSave ( )

Returns the 'LockOnSave' flag is set for attributes that will be locked once the part is saved (and reloaded)
Created in NX8.0.0.



License requirements : None

double NXOpen::AttributePropertiesBaseBuilder::NumberValue ( )

Returns the number value.

Required if creating an attribute of type Number.
Created in NX8.0.0.

License requirements : None

NXOpen::AttributePropertiesBaseBuilder::ObjectOptions NXOpen::AttributePropertiesBaseBuilder::ObjectPicker ( )

Returns the object picker.

This determines what objects the attribute will be applied to. If modified, the select object list will change based on this value.

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::AttributePropertiesBaseBuilder::SetAttributeObjects instead.


Created in NX8.0.0.

License requirements : None

NXOpen::SelectNXObjectList* NXOpen::AttributePropertiesBaseBuilder::SelectedObjects ( )

Returns the selected object(s) list.

The created attribute will be applied to all objects in this list.
Created in NX8.0.0.

License requirements : None

void NXOpen::AttributePropertiesBaseBuilder::SetArray ( bool  isArray)

Sets the 'is array' flag is set for attributes that have more than one value.

When this is set, the index needs to be provided to indicate which element will be modified.
Created in NX8.0.0.

License requirements : None

Parameters
isArrayisarray
void NXOpen::AttributePropertiesBaseBuilder::SetArrayIndex ( int  arrayIndex)

Sets the array index.

Required if modifying an attribute that has more than one value. The IsArray flag must also be set.
Created in NX8.0.0.

License requirements : None

Parameters
arrayIndexarrayindex
void NXOpen::AttributePropertiesBaseBuilder::SetAttributeObjects ( const std::vector< NXOpen::NXObject * > &  objects)

Sets the array of objects that have this attribute
Created in NX8.5.0.



License requirements : None

Parameters
objectsthe array of objects
void NXOpen::AttributePropertiesBaseBuilder::SetBooleanValue ( NXOpen::AttributePropertiesBaseBuilder::BooleanValueOptions  boolValue)

Sets the boolean value.

Required if creating an attribute of type Boolean.
Created in NX8.0.0.

License requirements : None

Parameters
boolValueboolvalue
void NXOpen::AttributePropertiesBaseBuilder::SetCategory ( const NXString category)

Sets the category.

The category is an optional, user-defined string that allows attributes to be grouped together.
Created in NX8.0.0.

License requirements : None

Parameters
categorycategory
void NXOpen::AttributePropertiesBaseBuilder::SetCategory ( const char *  category)

Sets the category.

The category is an optional, user-defined string that allows attributes to be grouped together.
Created in NX8.0.0.

License requirements : None

Parameters
categorycategory
void NXOpen::AttributePropertiesBaseBuilder::SetDataType ( NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions  dataType)

Sets the data type, which determines the type of attribute to be created.

Once the attribute is created, the data type cannot be modified.
Created in NX8.0.0.

License requirements : None

Parameters
dataTypedatatype
void NXOpen::AttributePropertiesBaseBuilder::SetExpression ( NXOpen::Expression expression)

Sets the expression referenced from this attribute.

Only used for attributes of type Number, Integer, Boolean, and String. If an expression is referenced, no value fields need to be set, as the attribute uses the value from the expression.
Created in NX8.0.0.

License requirements : None

Parameters
expressionexpression
void NXOpen::AttributePropertiesBaseBuilder::SetIntegerValue ( int  integerValue)

Sets the integer value.

Required if creating an attribute of type Integer.
Created in NX8.0.0.

License requirements : None

Parameters
integerValueintegervalue
void NXOpen::AttributePropertiesBaseBuilder::SetLockOnSave ( bool  lockOnSave)

Sets the 'LockOnSave' flag is set for attributes that will be locked once the part is saved (and reloaded)
Created in NX8.0.0.



License requirements : None

Parameters
lockOnSavelockonsave
void NXOpen::AttributePropertiesBaseBuilder::SetNumberValue ( double  numberValue)

Sets the number value.

Required if creating an attribute of type Number.
Created in NX8.0.0.

License requirements : None

Parameters
numberValuenumbervalue
void NXOpen::AttributePropertiesBaseBuilder::SetObjectPicker ( NXOpen::AttributePropertiesBaseBuilder::ObjectOptions  objectPicker)

Sets the object picker.

This determines what objects the attribute will be applied to. If modified, the select object list will change based on this value.

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::AttributePropertiesBaseBuilder::SetAttributeObjects instead.


Created in NX8.0.0.

License requirements : None

Parameters
objectPickerobjectpicker
void NXOpen::AttributePropertiesBaseBuilder::SetReferenceType ( bool  isReferenceType)

Sets the 'is reference type' flag is set for attributes that are linked to system expressions.

The type must also be set to String for the Reference attribut to be created/edited. If a Reference attribute is no longer linked to a system expression, it will become a String attribute.
Created in NX8.0.0.

License requirements : None

Parameters
isReferenceTypeisreferencetype
void NXOpen::AttributePropertiesBaseBuilder::SetStringValue ( const NXString stringValue)

Sets the string value.

Required if creating an attribute of type String.
Created in NX8.0.0.

License requirements : None

Parameters
stringValuestringvalue
void NXOpen::AttributePropertiesBaseBuilder::SetStringValue ( const char *  stringValue)

Sets the string value.

Required if creating an attribute of type String.
Created in NX8.0.0.

License requirements : None

Parameters
stringValuestringvalue
void NXOpen::AttributePropertiesBaseBuilder::SetTitle ( const NXString title)

Sets the attribute title.

The title is required for creating an attribute and must be unique on the given object. Once the attribute is created, the title cannot be modified.
Created in NX8.0.0.

License requirements : None

Parameters
titletitle
void NXOpen::AttributePropertiesBaseBuilder::SetTitle ( const char *  title)

Sets the attribute title.

The title is required for creating an attribute and must be unique on the given object. Once the attribute is created, the title cannot be modified.
Created in NX8.0.0.

License requirements : None

Parameters
titletitle
void NXOpen::AttributePropertiesBaseBuilder::SetUnits ( const NXString units)

Sets the units associated with an attribute of type Number.

Once the attribute is created, the unit measure (length, area, etc) cannot be changed. However the units (mm, ft, etc) within the measure can be changed.
Created in NX8.0.0.

License requirements : None

Parameters
unitsunits
void NXOpen::AttributePropertiesBaseBuilder::SetUnits ( const char *  units)

Sets the units associated with an attribute of type Number.

Once the attribute is created, the unit measure (length, area, etc) cannot be changed. However the units (mm, ft, etc) within the measure can be changed.
Created in NX8.0.0.

License requirements : None

Parameters
unitsunits
void NXOpen::AttributePropertiesBaseBuilder::SetValueAlias ( const NXString valueAlias)

Sets the value alias.

Optional for any attribute.
Created in NX10.0.0.

License requirements : None

Parameters
valueAliasvaluealias
void NXOpen::AttributePropertiesBaseBuilder::SetValueAlias ( const char *  valueAlias)

Sets the value alias.

Optional for any attribute.
Created in NX10.0.0.

License requirements : None

Parameters
valueAliasvaluealias
NXString NXOpen::AttributePropertiesBaseBuilder::StringValue ( )

Returns the string value.

Required if creating an attribute of type String.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributePropertiesBaseBuilder::Title ( )

Returns the attribute title.

The title is required for creating an attribute and must be unique on the given object. Once the attribute is created, the title cannot be modified.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributePropertiesBaseBuilder::Units ( )

Returns the units associated with an attribute of type Number.

Once the attribute is created, the unit measure (length, area, etc) cannot be changed. However the units (mm, ft, etc) within the measure can be changed.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributePropertiesBaseBuilder::ValueAlias ( )

Returns the value alias.

Optional for any attribute.
Created in NX10.0.0.

License requirements : None


The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.