public interface AttributePropertiesBaseBuilder extends Builder
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 AttributeTemplatesBuilder
.
The attribute will be distributed to all objects supplied in the selected object list.
Modifier and Type | Interface and Description |
---|---|
static class |
AttributePropertiesBaseBuilder.BooleanValueOptions
The value choices for an attribute of type Boolean
|
static class |
AttributePropertiesBaseBuilder.DataTypeOptions
Specifies the data type of the attribute, this cannot be changed once the attribute
has been created
|
static class |
AttributePropertiesBaseBuilder.ObjectOptions
Deprecated.
Deprecated in NX8.5.0. Use
setAttributeObjects(nxopen.NXObject[]) instead.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyUnits()
Apply the units currently set on the builder to any objects that have a value set for the
current attribute.
|
int |
arrayIndex()
Returns the array index.
|
AttributePropertiesBaseBuilder.BooleanValueOptions |
booleanValue()
Returns the boolean value.
|
String |
category()
Returns the category.
|
boolean |
createAttribute()
Create the attribute from the data set in the builder.
|
AttributePropertiesBaseBuilder.DataTypeOptions |
dataType()
Returns the data type, which determines the type of attribute to be created.
|
DateBuilder |
dateValue()
Returns the date value.
|
void |
delete(NXObject object)
Delete the attribute from the given object.
|
void |
deleteArray(NXObject object)
Delete the attribute array from the given object.
|
Expression |
expression()
Returns the expression referenced from this attribute.
|
int |
integerValue()
Returns the integer value.
|
boolean |
isArray()
Returns the 'is array' flag is set for attributes that have more than one value.
|
boolean |
isReferenceType()
Returns the 'is reference type' flag is set for attributes that are linked to system expressions.
|
boolean |
lockOnSave()
Returns the 'LockOnSave' flag is set for attributes that will be locked once the part is saved (and reloaded)
License requirements: None. |
double |
numberValue()
Returns the number value.
|
AttributePropertiesBaseBuilder.ObjectOptions |
objectPicker()
Deprecated.
Deprecated in NX10.0.0. Use
setAttributeObjects(nxopen.NXObject[]) instead.
|
SelectNXObjectList |
selectedObjects()
Returns the selected object(s) list.
|
void |
setArray(boolean isArray)
License requirements: None. |
void |
setArrayIndex(int arrayIndex)
License requirements: None. |
void |
setAttributeObjects(NXObject[] objects)
Sets the array of objects that have this attribute
License requirements: None. |
void |
setBooleanValue(AttributePropertiesBaseBuilder.BooleanValueOptions boolValue)
License requirements: None. |
void |
setCategory(String category)
License requirements: None. |
void |
setDataType(AttributePropertiesBaseBuilder.DataTypeOptions dataType)
License requirements: None. |
void |
setExpression(Expression expression)
License requirements: None. |
void |
setIntegerValue(int integerValue)
License requirements: None. |
void |
setLockOnSave(boolean lockOnSave)
License requirements: None. |
void |
setNumberValue(double numberValue)
License requirements: None. |
void |
setObjectPicker(AttributePropertiesBaseBuilder.ObjectOptions objectPicker)
Deprecated.
Deprecated in NX10.0.0. Use
setAttributeObjects(nxopen.NXObject[]) instead.
|
void |
setReferenceType(boolean isReferenceType)
License requirements: None. |
void |
setStringValue(String stringValue)
License requirements: None. |
void |
setTitle(String title)
License requirements: None. |
void |
setUnits(String units)
License requirements: None. |
void |
setValueAlias(String valueAlias)
License requirements: None. |
String |
stringValue()
Returns the string value.
|
String |
title()
Returns the attribute title.
|
String |
units()
Returns the units associated with an attribute of type Number.
|
String |
valueAlias()
Returns the value alias.
|
commit, destroy, getCommittedObjects, getObject, showResults
printTestData, printTestData, tag, tagValue
validate
SelectNXObjectList selectedObjects() throws NXException, RemoteException
NXException
RemoteException
AttributePropertiesBaseBuilder.ObjectOptions objectPicker() throws NXException, RemoteException
setAttributeObjects(nxopen.NXObject[])
instead.
NXException
RemoteException
void setObjectPicker(AttributePropertiesBaseBuilder.ObjectOptions objectPicker) throws NXException, RemoteException
setAttributeObjects(nxopen.NXObject[])
instead.
objectPicker
- NXException
RemoteException
String category() throws NXException, RemoteException
NXException
RemoteException
void setCategory(String category) throws NXException, RemoteException
category
- NXException
RemoteException
String title() throws NXException, RemoteException
NXException
RemoteException
void setTitle(String title) throws NXException, RemoteException
title
- NXException
RemoteException
AttributePropertiesBaseBuilder.DataTypeOptions dataType() throws NXException, RemoteException
NXException
RemoteException
void setDataType(AttributePropertiesBaseBuilder.DataTypeOptions dataType) throws NXException, RemoteException
dataType
- NXException
RemoteException
String units() throws NXException, RemoteException
NXException
RemoteException
void setUnits(String units) throws NXException, RemoteException
units
- NXException
RemoteException
String stringValue() throws NXException, RemoteException
NXException
RemoteException
void setStringValue(String stringValue) throws NXException, RemoteException
stringValue
- NXException
RemoteException
String valueAlias() throws NXException, RemoteException
NXException
RemoteException
void setValueAlias(String valueAlias) throws NXException, RemoteException
valueAlias
- NXException
RemoteException
int integerValue() throws NXException, RemoteException
NXException
RemoteException
void setIntegerValue(int integerValue) throws NXException, RemoteException
integerValue
- NXException
RemoteException
double numberValue() throws NXException, RemoteException
NXException
RemoteException
void setNumberValue(double numberValue) throws NXException, RemoteException
numberValue
- NXException
RemoteException
AttributePropertiesBaseBuilder.BooleanValueOptions booleanValue() throws NXException, RemoteException
NXException
RemoteException
void setBooleanValue(AttributePropertiesBaseBuilder.BooleanValueOptions boolValue) throws NXException, RemoteException
boolValue
- NXException
RemoteException
DateBuilder dateValue() throws NXException, RemoteException
NXException
RemoteException
Expression expression() throws NXException, RemoteException
NXException
RemoteException
void setExpression(Expression expression) throws NXException, RemoteException
expression
- NXException
RemoteException
boolean isReferenceType() throws NXException, RemoteException
NXException
RemoteException
void setReferenceType(boolean isReferenceType) throws NXException, RemoteException
isReferenceType
- NXException
RemoteException
boolean lockOnSave() throws NXException, RemoteException
NXException
RemoteException
void setLockOnSave(boolean lockOnSave) throws NXException, RemoteException
lockOnSave
- NXException
RemoteException
boolean isArray() throws NXException, RemoteException
NXException
RemoteException
void setArray(boolean isArray) throws NXException, RemoteException
isArray
- NXException
RemoteException
int arrayIndex() throws NXException, RemoteException
NXException
RemoteException
void setArrayIndex(int arrayIndex) throws NXException, RemoteException
arrayIndex
- NXException
RemoteException
void delete(NXObject object) throws NXException, RemoteException
object
- The object containing the attributeNXException
RemoteException
void deleteArray(NXObject object) throws NXException, RemoteException
object
- The object containing the attributeNXException
RemoteException
boolean createAttribute() throws NXException, RemoteException
NXException
RemoteException
boolean applyUnits() throws NXException, RemoteException
createAttribute()
should be
used for doing that.
NXException
RemoteException
void setAttributeObjects(NXObject[] objects) throws NXException, RemoteException
objects
- the array of objectsNXException
RemoteException
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.