NX Open C++ Reference Guide
|
Represents an NXOpen::AttributePropertiesBaseBuilder to be used for creating attributes. More...
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::DateBuilder * | DateValue () |
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::Expression * | Expression () |
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::SelectNXObjectList * | SelectedObjects () |
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::NXObject * | Commit () |
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::NXObject * | GetObject () |
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... | |
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.
Specifies the data type of the attribute, this cannot be changed once the attribute has been created.
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.
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.
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.
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
object | The 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
object | The 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.
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
isArray | isarray |
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
arrayIndex | arrayindex |
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
objects | the 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
boolValue | boolvalue |
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
category | category |
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
category | category |
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
dataType | datatype |
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
expression | expression |
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
integerValue | integervalue |
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
lockOnSave | lockonsave |
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
numberValue | numbervalue |
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.
Created in NX8.0.0.
License requirements : None
objectPicker | objectpicker |
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
isReferenceType | isreferencetype |
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
stringValue | stringvalue |
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
stringValue | stringvalue |
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
title | title |
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
title | title |
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
units | units |
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
units | units |
void NXOpen::AttributePropertiesBaseBuilder::SetValueAlias | ( | const NXString & | valueAlias | ) |
Sets the value alias.
Optional for any attribute.
Created in NX10.0.0.
License requirements : None
valueAlias | valuealias |
void NXOpen::AttributePropertiesBaseBuilder::SetValueAlias | ( | const char * | valueAlias | ) |
Sets the value alias.
Optional for any attribute.
Created in NX10.0.0.
License requirements : None
valueAlias | valuealias |
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