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

Represents an NXOpen::AttributeTemplatesBuilder to be used when creating attribute templates. More...

Inheritance diagram for NXOpen::AttributeTemplatesBuilder:
NXOpen::Builder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder

Public Types

enum  AccessKey {
  AccessKeyPart, AccessKeyReferenceSet, AccessKeyComponentInstance, AccessKeyComponentOccurrence,
  AccessKeyObjects
}
 Specifies the available access keys that determine which objects will have access to this attribute template. More...
 
enum  ConstraintOptions {
  ConstraintOptionsNone, ConstraintOptionsUpperLimit, ConstraintOptionsLowerLimit, ConstraintOptionsUpperAndLowerLimit,
  ConstraintOptionsList
}
 Specifies the constraint data associated with the template. More...
 
enum  DefaultBooleanOptions { DefaultBooleanOptionsTrue, DefaultBooleanOptionsFalse }
 Specifies the default value for a template of type Boolean. More...
 
enum  TemplatesOptions { TemplatesOptionsPart, TemplatesOptionsCatalog }
 Specifies the templates option when setting or displaying templates. More...
 

Public Member Functions

void AddAccessKey (NXOpen::AttributeTemplatesBuilder::AccessKey accessKey)
 Add a new access key to the list of access keys. More...
 
NXString Alias ()
 Returns the Alias. More...
 
bool AllowMultipleValues ()
 Returns the flag specifying if an attribute can contain multiple values. More...
 
NXString CatalogFilename ()
 Returns the catalog filename. More...
 
NXString Category ()
 Returns the category. More...
 
NXOpen::AttributeTemplatesBuilder::ConstraintOptions Constraint ()
 Returns the constraint. More...
 
bool CopyAttributeOnObjectCopy ()
 Returns the flag specifying whether the attribute should be copied when the object is copied. More...
 
NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions DataType ()
 Returns the data type. More...
 
NXOpen::DateBuilderDateConstraint ()
 Returns the date constraint. More...
 
NXOpen::AttributeTemplatesBuilder::DefaultBooleanOptions DefaultBoolean ()
 Returns the default boolean. More...
 
NXOpen::DateBuilderDefaultDate ()
 Returns the default date. More...
 
int DefaultInteger ()
 Returns the default integer. More...
 
double DefaultNumber ()
 Returns the default number. More...
 
NXString DefaultString ()
 Returns the default string. More...
 
bool Delete (const NXString &title, NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions type)
 Delete an attribute template by specifying the title and type of the template. More...
 
bool Delete (const char *title, NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions type)
 Delete an attribute template by specifying the title and type of the template. More...
 
bool EnforcedConstraints ()
 Returns the enforced constraints. More...
 
void ExportCatalog ()
 Exports templates to a specified external catalog. More...
 
std::vector
< NXOpen::AttributeTemplatesBuilder::AccessKey
GetAccessKeys ()
 Get the access keys. More...
 
std::vector< NXStringGetIntegerList ()
 Returns the integer list. More...
 
std::vector< NXStringGetNote ()
 Returns the note. More...
 
std::vector< NXStringGetNumberList ()
 Returns the number list. More...
 
std::vector< NXStringGetStringList ()
 Returns the string list. More...
 
void ImportCatalog ()
 Imports templates from a specified external catalog. More...
 
bool LockOnSave ()
 Returns the flag specifying if the attribute should be locked on save. More...
 
int MaxInteger ()
 Returns the max integer. More...
 
double MaxNumber ()
 Returns the max number. More...
 
NXString MaxString ()
 Returns the max string. More...
 
int MinInteger ()
 Returns the min integer. More...
 
double MinNumber ()
 Returns the min number. More...
 
NXString MinString ()
 Returns the min string. More...
 
bool Persistent ()
 Returns the persistent flag. More...
 
NXString ProxyAttributeForLocking ()
 Returns the proxy attribute for locking. More...
 
void RemoveAccessKey (NXOpen::AttributeTemplatesBuilder::AccessKey accessKey)
 Remove an access key from the list of access keys. More...
 
void SetAccessKeys (const std::vector< NXOpen::AttributeTemplatesBuilder::AccessKey > &accessKeys)
 Set the access keys. More...
 
void SetAlias (const NXString &alias)
 Sets the Alias. More...
 
void SetAlias (const char *alias)
 Sets the Alias. More...
 
void SetAllowMultipleValues (bool array)
 Sets the flag specifying if an attribute can contain multiple values. More...
 
void SetCatalogFilename (const NXString &catalogFilename)
 Sets the catalog filename. More...
 
void SetCatalogFilename (const char *catalogFilename)
 Sets the catalog filename. More...
 
void SetCategory (const NXString &category)
 Sets the category. More...
 
void SetCategory (const char *category)
 Sets the category. More...
 
void SetConstraint (NXOpen::AttributeTemplatesBuilder::ConstraintOptions constraint)
 Sets the constraint. More...
 
void SetCopyAttributeOnObjectCopy (bool copyAttributeOnObjectCopy)
 Sets the flag specifying whether the attribute should be copied when the object is copied. More...
 
void SetDataType (NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions dataType)
 Sets the data type. More...
 
void SetDefaultBoolean (NXOpen::AttributeTemplatesBuilder::DefaultBooleanOptions defaultBoolean)
 Sets the default boolean. More...
 
void SetDefaultInteger (int defaultInteger)
 Sets the default integer. More...
 
void SetDefaultNumber (double defaultNumber)
 Sets the default number. More...
 
void SetDefaultString (const NXString &defaultString)
 Sets the default string. More...
 
void SetDefaultString (const char *defaultString)
 Sets the default string. More...
 
void SetEnforcedConstraints (bool enforcedConstraints)
 Sets the enforced constraints. More...
 
void SetIntegerList (const std::vector< NXString > &integerList)
 Sets the integer list. More...
 
void SetLockOnSave (bool lockOnSave)
 Sets the flag specifying if the attribute should be locked on save. More...
 
void SetMaxInteger (int maxInteger)
 Sets the max integer. More...
 
void SetMaxNumber (double maxNumber)
 Sets the max number. More...
 
void SetMaxString (const NXString &maxString)
 Sets the max string. More...
 
void SetMaxString (const char *maxString)
 Sets the max string. More...
 
void SetMinInteger (int minInteger)
 Sets the min integer. More...
 
void SetMinNumber (double minNumber)
 Sets the min number. More...
 
void SetMinString (const NXString &minString)
 Sets the min string. More...
 
void SetMinString (const char *minString)
 Sets the min string. More...
 
void SetNote (const std::vector< NXString > &note)
 Sets the note. More...
 
void SetNumberList (const std::vector< NXString > &numberList)
 Sets the number list. More...
 
void SetPersistent (bool persistent)
 Sets the persistent flag. More...
 
void SetProxyAttributeForLocking (const NXString &proxyAttributeForLocking)
 Sets the proxy attribute for locking. More...
 
void SetProxyAttributeForLocking (const char *proxyAttributeForLocking)
 Sets the proxy attribute for locking. More...
 
void SetStringList (const std::vector< NXString > &stringList)
 Sets the string list. More...
 
void SetTemplates (NXOpen::AttributeTemplatesBuilder::TemplatesOptions dataType)
 Sets the templates option. More...
 
void SetTitle (const NXString &title)
 Sets the title. More...
 
void SetTitle (const char *title)
 Sets the title. More...
 
void SetUnits (const NXString &units)
 Sets the units. More...
 
void SetUnits (const char *units)
 Sets the units. More...
 
NXOpen::AttributeTemplatesBuilder::TemplatesOptions Templates ()
 Returns the templates option. More...
 
NXString Title ()
 Returns the title. More...
 
NXString Units ()
 Returns the units. More...
 
void UpdateTemplates ()
 Update templates in the part from the external catalog defined in customer defaults. 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::AttributeTemplatesBuilder to be used when creating attribute templates.

An attribute template is optional for an attribute and lives in the depository. It's main purpose is to provide extra data to further describe a referencing attribute. All attributes that are created from a template will take on the characteristics of the template, most notable the title, type, and units (for templates of type number only). The template contains other data, such as input assisting data (ranges and lists of values) to be used when creating a value on the attribute. The template may also contain a category, which allows attributes to be grouped together and easily sorted. A note may also be set on a template to provide further description about a referencing attribute.

Each template must contain a unique title and a type. If the type is number, then the units must also be set. All other data is optional.

There are six types of attribute templates: Null, Boolean, Integer, Number, String, and Date. Each type requires a title, type, and can optionally contain a note and a category. Other data varies depending on the type. Below describes the differences betweeen the types.

Null - No other data can be set for a template of type Null.

Boolean - A default boolean can be set to True or False. This can be set by calling SetDefaultBoolean.

Integer - A default integer can be set to assist when creating an attribute referencing an integer template. The integer type also allows for constraints to be set. If the constraint is set to Range, then the min integer and max integer need to be set to define the range. If the constraint is set to List, then the value integer list will need to be set to define the acceptable list of values. If constraint is set to None, then no constraints will be enforced. The default value must comply with all constraints in order for the template to be created successfully.

Number - A default floating point number and constraints can be set in the exact same fashion as with the integer, the only difference being that the number fields will be used instead of the integer fields. The units must be set to define the template's measure. Only the measure (Length, Area, Volume, etc) is considered required information, the units themselves (mm, kg, etc) will only be used along with the default value as input assistance when creating an attribute referencing a number template.

String - A default string can be set. The string type also allows for a list of values to be set as input assistance. To do this, the constraint must be set to List and the string list will need to be populated with the desired values. The string type does not allow for the constraint to be set to Range, it must be set to either List or None. The default string must be contained in the list of values if Constraint is set to List.

Date - No other data can be set for a template of type Date. The current date will always be used as input assistance when creating an attribute referencing a date template.

This class will also allow for the import and export of attribute templates. The export feature will save all templates currently in the depository to an external catalog file so they can be imported at a later time to another part file. To use this feature, the catalog filename must be set to specify the external file. Similarly, the import feature will take all templates contained in the specified catalog file and instantiate them in the part. If the title, type, or measure of an imported template conflicts with a template already in the depository, then the template will not be imported. If the optional data of an imported template conflicts with a template already in the depository, then the data from the imported template will overwrite the data in the depository.
To create a new instance of this class, use NXOpen::PropertiesManager::CreateAttributeTemplatesBuilder
Default values.

Property Value

Constraint

None

CopyAttributeOnObjectCopy

True

DataType

String

DefaultBoolean

True

DefaultInteger

0

DefaultNumber

0

MaxInteger

0

MaxNumber

0

MinInteger

0

MinNumber

0

ProxyAttributeForLocking


Created in NX8.0.0.

Member Enumeration Documentation

Specifies the available access keys that determine which objects will have access to this attribute template.

Enumerator
AccessKeyPart 

This attribute template will be accessible by parts.

AccessKeyReferenceSet 

This attribute template will be accessible by reference sets.

AccessKeyComponentInstance 

This attribute template will be accessible by component instances.

AccessKeyComponentOccurrence 

This attribute template will be accessible by component occurrences.

AccessKeyObjects 

This attribute template will be accessible by all non-part related objects including solids, features, etc.

Specifies the constraint data associated with the template.

All constraints are enabled for templates of type integer, number, string, and date.

Enumerator
ConstraintOptionsNone 

No constraint data, no further action is needed.

ConstraintOptionsUpperLimit 

This template has an upper limit but no lower limit.

The max value must be set. Available for integer, number, string, and date types.

ConstraintOptionsLowerLimit 

This template has a lower limit but no upper limit.

The min value must be set. Available for integer, number, string, and date types.

ConstraintOptionsUpperAndLowerLimit 

This template has a lower limit and an upper limit.

The min and max must also be set. Available for integer, number, string, and date types.

ConstraintOptionsList 

List of values, the value list must also be set.

Only available for integer, number, and string types.

Specifies the default value for a template of type Boolean.

Enumerator
DefaultBooleanOptionsTrue 

True.

DefaultBooleanOptionsFalse 

False.

Specifies the templates option when setting or displaying templates.

Enumerator
TemplatesOptionsPart 

Templates currently residing in the part.

TemplatesOptionsCatalog 

Templates currently residing in the loaded catalog.

These are initially loaded from the external file specified in customer defaults and can be managed using Import and Export. Each template in the catalog can be defined as persistent or transient. A persistent template will be copied into the part when an attribute is created. A transient template will assist in the creation of an attribute but will not be stored in the part.

Member Function Documentation

void NXOpen::AttributeTemplatesBuilder::AddAccessKey ( NXOpen::AttributeTemplatesBuilder::AccessKey  accessKey)

Add a new access key to the list of access keys.

If this access key alreadys exists, it will not be added.
Created in NX8.0.0.

License requirements : None

Parameters
accessKeyaccesskey
NXString NXOpen::AttributeTemplatesBuilder::Alias ( )

Returns the Alias.

This is the alias or synonym for the title of the template and must be unique.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributeTemplatesBuilder::AllowMultipleValues ( )

Returns the flag specifying if an attribute can contain multiple values.

If true, then any attributes created from this template will be treated as a VLA (variable length array) and will support multiple values.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::CatalogFilename ( )

Returns the catalog filename.

Used during import and export of catalogs. This should be set to a full path location on disk.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::Category ( )

Returns the category.

Optional category for templates of all types. This allows for templates to be grouped together.
Created in NX8.0.0.

License requirements : None

NXOpen::AttributeTemplatesBuilder::ConstraintOptions NXOpen::AttributeTemplatesBuilder::Constraint ( )

Returns the constraint.

Informs the template which method of constraints to use. If constraints are used the default value must satisfy the given constraints. Constraints are supported by templates of type Integer, Number, String, and Date.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributeTemplatesBuilder::CopyAttributeOnObjectCopy ( )

Returns the flag specifying whether the attribute should be copied when the object is copied.

If false, the attribute copy is disallowed.
Created in NX8.0.0.

License requirements : None

NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions NXOpen::AttributeTemplatesBuilder::DataType ( )

Returns the data type.

Must be set for each template and cannot be changed once the template has been created.
Created in NX8.0.0.

License requirements : None

NXOpen::DateBuilder* NXOpen::AttributeTemplatesBuilder::DateConstraint ( )

Returns the date constraint.

Only used if the data type is Date. The default date must satisfy the constraints defined by this object.
Created in NX8.0.0.

License requirements : None

NXOpen::AttributeTemplatesBuilder::DefaultBooleanOptions NXOpen::AttributeTemplatesBuilder::DefaultBoolean ( )

Returns the default boolean.

Optional default value for a template of type Boolean.
Created in NX8.0.0.

License requirements : None

NXOpen::DateBuilder* NXOpen::AttributeTemplatesBuilder::DefaultDate ( )

Returns the default date.

Optional if no date constraints exists, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

int NXOpen::AttributeTemplatesBuilder::DefaultInteger ( )

Returns the default integer.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

double NXOpen::AttributeTemplatesBuilder::DefaultNumber ( )

Returns the default number.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::DefaultString ( )

Returns the default string.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributeTemplatesBuilder::Delete ( const NXString title,
NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions  type 
)

Delete an attribute template by specifying the title and type of the template.

The template will be deleted from the depository specified by the current Templates Option. The deleted flag will return true if the template was successfully deleted.

Returns

Created in NX8.0.0.

License requirements : None
Parameters
titletitle
typetype
bool NXOpen::AttributeTemplatesBuilder::Delete ( const char *  title,
NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions  type 
)

Delete an attribute template by specifying the title and type of the template.

The template will be deleted from the depository specified by the current Templates Option. The deleted flag will return true if the template was successfully deleted.

Returns

Created in NX8.0.0.

License requirements : None
Parameters
titletitle
typetype
bool NXOpen::AttributeTemplatesBuilder::EnforcedConstraints ( )

Returns the enforced constraints.

Determines if the template constraints will be enforced.
Created in NX8.0.0.

License requirements : None

void NXOpen::AttributeTemplatesBuilder::ExportCatalog ( )

Exports templates to a specified external catalog.

All templates from the loaded catalog will be saved to disk at the location specified by the catalog filename. Any templates the previously existed in the external catalog will be deleted.

The catalog filename must be set to the location of the external catalog on disk.
Created in NX8.0.0.

License requirements : None

std::vector<NXOpen::AttributeTemplatesBuilder::AccessKey> NXOpen::AttributeTemplatesBuilder::GetAccessKeys ( )

Get the access keys.

The access keys define which objects will have access to this attribute template.

Returns

Created in NX8.0.0.

License requirements : None
std::vector<NXString> NXOpen::AttributeTemplatesBuilder::GetIntegerList ( )

Returns the integer list.

Only valid if the type is Integer and the contraint is set to list.

Returns

Created in NX8.0.0.

License requirements : None
std::vector<NXString> NXOpen::AttributeTemplatesBuilder::GetNote ( )

Returns the note.

Optional data for templates of all types.

Returns

Created in NX8.0.0.

License requirements : None
std::vector<NXString> NXOpen::AttributeTemplatesBuilder::GetNumberList ( )

Returns the number list.

Only valid if the type is Number and the contraint is set to list.

Returns

Created in NX8.0.0.

License requirements : None
std::vector<NXString> NXOpen::AttributeTemplatesBuilder::GetStringList ( )

Returns the string list.

Only valid if the type is String and the contraint is set to list.

Returns

Created in NX8.0.0.

License requirements : None
void NXOpen::AttributeTemplatesBuilder::ImportCatalog ( )

Imports templates from a specified external catalog.

The current catalog of templates will be erased and replaced with the templates from the external catalog. Import will not instantiate templates in the part, it only modifies what templates are currently available in the loaded catalog.

The catalog filename must be set to the location of the external catalog on disk.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributeTemplatesBuilder::LockOnSave ( )

Returns the flag specifying if the attribute should be locked on save.

If true, then any attributes created from this template will become locked when the part is saved (and reloaded).
Created in NX8.0.0.

License requirements : None

int NXOpen::AttributeTemplatesBuilder::MaxInteger ( )

Returns the max integer.

Only to be set if the data type is Integer and the constraint specifies an upper limit. The default integer value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

double NXOpen::AttributeTemplatesBuilder::MaxNumber ( )

Returns the max number.

Only to be set if the data type is Number and the constraint specifies an upper limit. The default number value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::MaxString ( )

Returns the max string.

Only to be set if the data type is String and the constraint specifies an upper limit. The default string value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

int NXOpen::AttributeTemplatesBuilder::MinInteger ( )

Returns the min integer.

Only to be set if the data type is Integer and the constraint specifies a lower limit. The default integer value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

double NXOpen::AttributeTemplatesBuilder::MinNumber ( )

Returns the min number.

Only to be set if the data type is Number and the constraint specifies a lower limit. The default number value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::MinString ( )

Returns the min string.

Only to be set if the data type is String and the constraint specifies a lower limit. The default string value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

bool NXOpen::AttributeTemplatesBuilder::Persistent ( )

Returns the persistent flag.

If a template is marked as persistent, then the template will be saved with the part when a template attribute is created. This flag is only used when editing templates in the catalog file, during which the default is false. If editing templates in the part, the template will be created in the part, making it persistent by definition.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::ProxyAttributeForLocking ( )

Returns the proxy attribute for locking.

This must be PDM attribute available in the Access Control List. This functionality is available only in managed mode. Specify relevent proxy attribute based on NXOpen::AttributeTemplatesBuilder::TemplatesOptions .


Created in NX8.0.0.

License requirements : None

void NXOpen::AttributeTemplatesBuilder::RemoveAccessKey ( NXOpen::AttributeTemplatesBuilder::AccessKey  accessKey)

Remove an access key from the list of access keys.


Created in NX8.0.0.

License requirements : None

Parameters
accessKeyaccesskey
void NXOpen::AttributeTemplatesBuilder::SetAccessKeys ( const std::vector< NXOpen::AttributeTemplatesBuilder::AccessKey > &  accessKeys)

Set the access keys.

The access keys define which objects will have access to this attribute template. If no access keys are provided, the attribute template will be visible to all objects.
Created in NX8.0.0.

License requirements : None

Parameters
accessKeysaccesskeys
void NXOpen::AttributeTemplatesBuilder::SetAlias ( const NXString alias)

Sets the Alias.

This is the alias or synonym for the title of the template and must be unique.
Created in NX8.0.0.

License requirements : None

Parameters
aliasalias
void NXOpen::AttributeTemplatesBuilder::SetAlias ( const char *  alias)

Sets the Alias.

This is the alias or synonym for the title of the template and must be unique.
Created in NX8.0.0.

License requirements : None

Parameters
aliasalias
void NXOpen::AttributeTemplatesBuilder::SetAllowMultipleValues ( bool  array)

Sets the flag specifying if an attribute can contain multiple values.

If true, then any attributes created from this template will be treated as a VLA (variable length array) and will support multiple values.
Created in NX8.0.0.

License requirements : None

Parameters
arrayarray
void NXOpen::AttributeTemplatesBuilder::SetCatalogFilename ( const NXString catalogFilename)

Sets the catalog filename.

Used during import and export of catalogs. This should be set to a full path location on disk.
Created in NX8.0.0.

License requirements : None

Parameters
catalogFilenamecatalogfilename
void NXOpen::AttributeTemplatesBuilder::SetCatalogFilename ( const char *  catalogFilename)

Sets the catalog filename.

Used during import and export of catalogs. This should be set to a full path location on disk.
Created in NX8.0.0.

License requirements : None

Parameters
catalogFilenamecatalogfilename
void NXOpen::AttributeTemplatesBuilder::SetCategory ( const NXString category)

Sets the category.

Optional category for templates of all types. This allows for templates to be grouped together.
Created in NX8.0.0.

License requirements : None

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

Sets the category.

Optional category for templates of all types. This allows for templates to be grouped together.
Created in NX8.0.0.

License requirements : None

Parameters
categorycategory
void NXOpen::AttributeTemplatesBuilder::SetConstraint ( NXOpen::AttributeTemplatesBuilder::ConstraintOptions  constraint)

Sets the constraint.

Informs the template which method of constraints to use. If constraints are used the default value must satisfy the given constraints. Constraints are supported by templates of type Integer, Number, String, and Date.
Created in NX8.0.0.

License requirements : None

Parameters
constraintconstraint
void NXOpen::AttributeTemplatesBuilder::SetCopyAttributeOnObjectCopy ( bool  copyAttributeOnObjectCopy)

Sets the flag specifying whether the attribute should be copied when the object is copied.

If false, the attribute copy is disallowed.
Created in NX8.0.0.

License requirements : None

Parameters
copyAttributeOnObjectCopycopyattributeonobjectcopy
void NXOpen::AttributeTemplatesBuilder::SetDataType ( NXOpen::AttributePropertiesBaseBuilder::DataTypeOptions  dataType)

Sets the data type.

Must be set for each template and cannot be changed once the template has been created.
Created in NX8.0.0.

License requirements : None

Parameters
dataTypedatatype
void NXOpen::AttributeTemplatesBuilder::SetDefaultBoolean ( NXOpen::AttributeTemplatesBuilder::DefaultBooleanOptions  defaultBoolean)

Sets the default boolean.

Optional default value for a template of type Boolean.
Created in NX8.0.0.

License requirements : None

Parameters
defaultBooleandefaultboolean
void NXOpen::AttributeTemplatesBuilder::SetDefaultInteger ( int  defaultInteger)

Sets the default integer.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

Parameters
defaultIntegerdefaultinteger
void NXOpen::AttributeTemplatesBuilder::SetDefaultNumber ( double  defaultNumber)

Sets the default number.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

Parameters
defaultNumberdefaultnumber
void NXOpen::AttributeTemplatesBuilder::SetDefaultString ( const NXString defaultString)

Sets the default string.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

Parameters
defaultStringdefaultstring
void NXOpen::AttributeTemplatesBuilder::SetDefaultString ( const char *  defaultString)

Sets the default string.

Optional if the constraint is set to None, otherwise it must satisfy the constraint data.
Created in NX8.0.0.

License requirements : None

Parameters
defaultStringdefaultstring
void NXOpen::AttributeTemplatesBuilder::SetEnforcedConstraints ( bool  enforcedConstraints)

Sets the enforced constraints.

Determines if the template constraints will be enforced.
Created in NX8.0.0.

License requirements : None

Parameters
enforcedConstraintsenforcedconstraints
void NXOpen::AttributeTemplatesBuilder::SetIntegerList ( const std::vector< NXString > &  integerList)

Sets the integer list.

Must be set if the type is Integer and the contraint is set to list. The default integer value must be contained in this list.
Created in NX8.0.0.

License requirements : None

Parameters
integerListintegerlist
void NXOpen::AttributeTemplatesBuilder::SetLockOnSave ( bool  lockOnSave)

Sets the flag specifying if the attribute should be locked on save.

If true, then any attributes created from this template will become locked when the part is saved (and reloaded).
Created in NX8.0.0.

License requirements : None

Parameters
lockOnSavelockonsave
void NXOpen::AttributeTemplatesBuilder::SetMaxInteger ( int  maxInteger)

Sets the max integer.

Only to be set if the data type is Integer and the constraint specifies an upper limit. The default integer value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
maxIntegermaxinteger
void NXOpen::AttributeTemplatesBuilder::SetMaxNumber ( double  maxNumber)

Sets the max number.

Only to be set if the data type is Number and the constraint specifies an upper limit. The default number value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
maxNumbermaxnumber
void NXOpen::AttributeTemplatesBuilder::SetMaxString ( const NXString maxString)

Sets the max string.

Only to be set if the data type is String and the constraint specifies an upper limit. The default string value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
maxStringmaxstring
void NXOpen::AttributeTemplatesBuilder::SetMaxString ( const char *  maxString)

Sets the max string.

Only to be set if the data type is String and the constraint specifies an upper limit. The default string value must be less than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
maxStringmaxstring
void NXOpen::AttributeTemplatesBuilder::SetMinInteger ( int  minInteger)

Sets the min integer.

Only to be set if the data type is Integer and the constraint specifies a lower limit. The default integer value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
minIntegermininteger
void NXOpen::AttributeTemplatesBuilder::SetMinNumber ( double  minNumber)

Sets the min number.

Only to be set if the data type is Number and the constraint specifies a lower limit. The default number value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
minNumberminnumber
void NXOpen::AttributeTemplatesBuilder::SetMinString ( const NXString minString)

Sets the min string.

Only to be set if the data type is String and the constraint specifies a lower limit. The default string value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
minStringminstring
void NXOpen::AttributeTemplatesBuilder::SetMinString ( const char *  minString)

Sets the min string.

Only to be set if the data type is String and the constraint specifies a lower limit. The default string value must be greater than or equal to this value.
Created in NX8.0.0.

License requirements : None

Parameters
minStringminstring
void NXOpen::AttributeTemplatesBuilder::SetNote ( const std::vector< NXString > &  note)

Sets the note.

Optional data for templates of all types.
Created in NX8.0.0.

License requirements : None

Parameters
notenote
void NXOpen::AttributeTemplatesBuilder::SetNumberList ( const std::vector< NXString > &  numberList)

Sets the number list.

Must be set if the type is Number and the contraint is set to list. The default number value must be contained in this list.
Created in NX8.0.0.

License requirements : None

Parameters
numberListnumberlist
void NXOpen::AttributeTemplatesBuilder::SetPersistent ( bool  persistent)

Sets the persistent flag.

If a template is marked as persistent, then the template will be saved with the part when a template attribute is created. This flag is only used when editing templates in the catalog file, during which the default is false. If editing templates in the part, the template will be created in the part, making it persistent by definition.
Created in NX8.0.0.

License requirements : None

Parameters
persistentpersistent
void NXOpen::AttributeTemplatesBuilder::SetProxyAttributeForLocking ( const NXString proxyAttributeForLocking)

Sets the proxy attribute for locking.

This must be PDM attribute available in the Access Control List. This functionality is available only in managed mode. Specify relevent proxy attribute based on NXOpen::AttributeTemplatesBuilder::TemplatesOptions .


Created in NX8.0.0.

License requirements : None

Parameters
proxyAttributeForLockingproxyattributeforlocking
void NXOpen::AttributeTemplatesBuilder::SetProxyAttributeForLocking ( const char *  proxyAttributeForLocking)

Sets the proxy attribute for locking.

This must be PDM attribute available in the Access Control List. This functionality is available only in managed mode. Specify relevent proxy attribute based on NXOpen::AttributeTemplatesBuilder::TemplatesOptions .


Created in NX8.0.0.

License requirements : None

Parameters
proxyAttributeForLockingproxyattributeforlocking
void NXOpen::AttributeTemplatesBuilder::SetStringList ( const std::vector< NXString > &  stringList)

Sets the string list.

Must be set if the type is String and the contraint is set to list. The default string value must be contained in this list.
Created in NX8.0.0.

License requirements : None

Parameters
stringListstringlist
void NXOpen::AttributeTemplatesBuilder::SetTemplates ( NXOpen::AttributeTemplatesBuilder::TemplatesOptions  dataType)

Sets the templates option.

This option determines which set of templates will be modified.
Created in NX8.0.0.

License requirements : None

Parameters
dataTypedatatype
void NXOpen::AttributeTemplatesBuilder::SetTitle ( const NXString title)

Sets the title.

This is the identifier of the template and must be unique.
Created in NX8.0.0.

License requirements : None

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

Sets the title.

This is the identifier of the template and must be unique.
Created in NX8.0.0.

License requirements : None

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

Sets the units.

Represents the units associated with a template of type Number.
Created in NX8.0.0.

License requirements : None

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

Sets the units.

Represents the units associated with a template of type Number.
Created in NX8.0.0.

License requirements : None

Parameters
unitsunits
NXOpen::AttributeTemplatesBuilder::TemplatesOptions NXOpen::AttributeTemplatesBuilder::Templates ( )

Returns the templates option.

This option determines which set of templates will be modified.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::Title ( )

Returns the title.

This is the identifier of the template and must be unique.
Created in NX8.0.0.

License requirements : None

NXString NXOpen::AttributeTemplatesBuilder::Units ( )

Returns the units.

Represents the units associated with a template of type Number.
Created in NX8.0.0.

License requirements : None

void NXOpen::AttributeTemplatesBuilder::UpdateTemplates ( )

Update templates in the part from the external catalog defined in customer defaults.

The title and type must match for the update to take place.
Created in NX8.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.