Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

Naming Rule
[Properties]


Detailed Description

Naming Rules allow the site to provide naming pattern validation for various user input fields.

The set of ITK given here accesses NameRule, NameField and NameCounter classes, which can be used to validate and generate ids based on specific patterns.

NameRule Class attributesNameField Class attributesNameCounter Class attributes
rule_name type_name counter_name
patterns[] property_name no_of_chars
autogen field_case char_type
counter_tags rule_tag start_pos
init_value
max_value
next_id

Modules

Naming Rule Checker

The Naming Rule Checker enables the Assign buttons for Item IDs and Revisions and Dataset IDs and Revisions, to use the Naming rule patterns as templates. Also, the i-Man components for Name Rule and NameField will be created to allow Portal to access the Naming Rules.

Defines

Functions


Define Documentation

#define NR_CASE_LOWER   1

Definition at line 41 of file nr.h.

#define NR_CASE_MIXED   0

Definition at line 40 of file nr.h.

#define NR_CASE_UPPER   2

Definition at line 42 of file nr.h.


Function Documentation

PROPERTY_API int NR_ask_counter_details ( tag_t  counter_tag,
char **  counter_name,
int *  no_of_chars,
int *  start_pos,
char **  char_type,
char **  start_value,
char **  max_value 
)

Get all of the values of a NameCounter.

Parameters:
counter_tag  (I) The tag of the NameCounter to retrieve values from
counter_name  (OF) The name of the counter
no_of_chars  (O) The width of this counter
start_pos  (O) The starting position (offset) of this counter in its parent pattern
char_type  (OF) Type of counter
start_value  (OF) The initial value for this counter
max_value  (OF) The maximum value for this counter

PROPERTY_API int NR_ask_counter_values ( tag_t  counter_tag,
char **  counter_name,
int *  no_of_chars,
int *  start_pos,
char **  char_type,
char **  start_value,
char **  max_value,
char **  next_id 
)

Returns all of the values of a NameCounter.

Deprecated:
This function is not supported after TC2008. Use NR_ask_counter_details.
Parameters:
counter_tag  (I) The tag of the NameCounter to retrieve values from
counter_name  (OF) The name of the counter
no_of_chars  (O) The width of this counter
start_pos  (O) The starting position (offset) of this counter in its parent pattern
char_type  (OF) Type of counter
start_value  (OF) The initial value for this counter
max_value  (OF) The maximum value for this counter
next_id  (OF) The next id value that will be returned by this counter

PROPERTY_API int NR_ask_revision_naming_rule_and_case ( char *  type_name,
tag_t rule_tag,
int *  field_case 
)

Get the field case and the corresponding rule tag of the attachment

Parameters:
type_name  (I) The Item Type that the rule applies to
rule_tag  (O) Tag of Revision Naming Rule object
field_case  (O) The case to automatically translate the property fields contents

(NR_CASE_MIXED, NR_CASE_LOWER, NR_CASE_UPPER)

PROPERTY_API int NR_ask_rule_and_case ( char *  type_name,
char *  property_name,
tag_t rule_tag,
int *  field_case 
)

Get the rule tag and field case value for the Teamcenter Engineering type and property name combination.

Parameters:
type_name  (I) The IMANTYPE that the rule applies to
property_name  (I) The property field in this IMANTYPE that the rule applies to
rule_tag  (O) Tag of NameRules object containing the rule patterns
field_case  (O) The case to automatically translate the property fields contents (NR_CASE_MIXED, NR_CASE_LOWER, NR_CASE_UPPER)

PROPERTY_API int NR_field_desc ( tag_t  field_tag,
char **  type_name,
char **  property_name,
tag_t rule_tag,
int *  field_case 
)

Get all rule fields.

Parameters:
field_tag  (I) Tag of NameFields object
type_name  (OF) The IMANTYPE that the rule applies to
property_name  (OF) The property field in this IMANTYPE that the rule applies to
rule_tag  (O) Tag of NameRules object containing the rule patterns
field_case  (O) The case to automatically translate the property fields contents (NR_CASE_MIXED, NR_CASE_LOWER, NR_CASE_UPPER)

PROPERTY_API int NR_field_extent ( int *  n_tags,
tag_t **  field_tags 
)

Returns an array of all of the NameFields objects.

Parameters:
n_tags  (O) Number of NameFields objects
field_tags  (OF) n_tags Array of NameFields tags

PROPERTY_API int NR_find ( char *  rule_name,
tag_t rule_tag 
)

Finds a NameRules object by its name.

Parameters:
rule_name  (I) The unique name of a rule
rule_tag  (O) Tag of NameRules object

PROPERTY_API int NR_find_revision_naming_rule ( char *  rule_name,
tag_t rule_tag 
)

Finds a Revision Naming Rule object by its name.

Parameters:
rule_name  (I) The unique name of a revision name rule
rule_tag  (O) Tag of RevisionNameRules object

PROPERTY_API int NR_get_rev_rule_attach ( const char *  type_name,
tag_t revNameRuleAttachTag 
)

Parameters:
type_name  (I) The Item Type that the rule applies to
revNameRuleAttachTag  (O) Tag of Revision Naming Rule Attach object

PROPERTY_API int NR_is_name_matching_pattern ( const char *  pattern,
const char *  string,
logical is_matched 
)

PROPERTY_API logical NR_match_revid_altrule ( const char *  type_name,
const char *  revid,
const char *  suffixrule 
)

Matches the given revision id and determines if the revid matches the altrule or not. For baseline pattern matching, the the suffix rule should be passed as "PDR"

Parameters:
type_name  (I) Item Type Name
revid  (I) Id for which the patten matching needs to be done
suffixrule  (I) For Baseline, its PDR

PROPERTY_API int NR_next_alt_id ( const char *  preferred_type_name,
const char *  default_type_name,
tag_t  parent_tag,
char **  next_id 
)

Gets the next alt id generated from the pattern in rule

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
preferred_type_name  (I)
default_type_name  (I)
parent_tag  (I)
next_id  (OF)

PROPERTY_API int NR_next_dataset_id ( const char *  ds_type,
char **  next_id 
)

Gets the next dataset id generated from the first pattern in the associated Naming Rule. If a Naming Rule is not attached to this Type for pubr_object_id or automatic generation is disabled for this type/field pair, then a NULL will be returned for next_id.

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
ds_type  (I) The Type name for this id field
next_id  (OF) The next revision id or NULL

PROPERTY_API int NR_next_dataset_rev_id ( const char *  ds_type,
const char *  ds_id,
char **  next_id 
)

Gets the next dataset revision id generated from the first pattern in the associated Naming Rule. If a Naming Rule is not attached to this Type for rev and automatic generation is disabled for this type/field pair, then a NULL will be returned for next_id.

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
ds_type  (I) The Item Type name for this id field
ds_id  (I) The dataset id that will be the parent of this revision
next_id  (OF) The next revision id or NULL

PROPERTY_API int NR_next_item_id ( const char *  type_name,
char **  next_id 
)

Gets the next item id generated from the first pattern in the associated Naming Rule. If a Naming Rule is not attached to this Type for item_id or automatic generation is disabled for this type/field pair, then a NULL will be returned for next_id.

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
type_name  (I) The Item Type name for this id field
next_id  (OF) The next revision id or NULL

PROPERTY_API int NR_next_rev_id ( const char *  type_name,
tag_t  item_tag,
char **  next_id 
)

Gets the next revision id generated from the first pattern in the associated Naming Rule. If a Naming Rule is not attached to this Type for item_revision_id and automatic generation is disabled for this type/field pair, then a NULL will be returned for next_id.

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
type_name  (I) The Item Type name for this id field
item_tag  (I) The tag of the parent item
next_id  (OF) The next revision id or NULL

PROPERTY_API int NR_next_rev_id_from_alt_rule ( const char *  type_name,
const char *  rule_suffix,
tag_t  item_tag,
const char *  base_rev_id,
char **  next_id 
)

Gets the next revision id generated from the pattern in the alt rule

Deprecated:
This function is not supported after TC2008. Use NR_next_value.
Parameters:
type_name  (I)
rule_suffix  (I)
item_tag  (I)
base_rev_id  (I)
next_id  (OF)

PROPERTY_API int NR_next_rev_options ( char *  item_type,
tag_t  item_rev,
char **  init_rev_option,
char **  sec_rev_option,
char **  suppl_rev_option 
)

Get all the available next revision option

Parameters:
item_type  (I)
item_rev  (I)
init_rev_option  (OF)
sec_rev_option  (OF)
suppl_rev_option  (OF)

PROPERTY_API int NR_next_value ( const char *  typeName,
const char *  propertyName,
const tag_t  itemTag,
const char *  dsId,
const char *  preferredTypeName,
const char *  defaultTypeName,
const tag_t  parentTag,
const char *  ruleSuffix,
const char *  baseRevId,
char **  nextId 
)

Gets the next id generated for a particular pattern in the Naming Rule This ITK is a generalized ITK for generating next id in case of :

  1. next item id (usage example: NR_next_item_id(type_name, next_id) -> NR_next_value(type_name, "item_id", NULLTAG,"", "", "", NULLTAG, ""," ", next_id);)
  2. next revision id (usage example: NR_next_rev_id(type_name, item_tag, next_id) -> NR_next_value(type_name, "item_revision_id", item_tag,"","","",NULLTAG,"","", next_id );)
  3. next revision id generated from the pattern in the alt rule (usage example: NR_next_rev_id_from_alt_rule(type_name, rule_suffix, item_tag, base_rev_id, next_id) -> NR_next_value(type_name, "", item_tag, "", "", "", NULLTAG, rule_suffix, base_rev_id, next_id );)
  4. next alt id generated from the pattern in rule (usage example: NR_next_alt_id(preferred_type_name, default_type_name, parent_tag, next_id) -> NR_next_value("", "", NULLTAG, "", preferred_type_name, default_type_name, parent_tag, "", "", next_id );)
  5. next dataset id (usage example: NR_next_dataset_id(ds_type, next_id) -> NR_next_value(ds_type, "pubr_object_id", NULLTAG, "", "","",NULLTAG, "", "", next_id );)
  6. next dataset revision id (usage example: NR_next_dataset_rev_id(ds_type, ds_id, next_id) -> NR_next_value(ds_type, "rev", NULLTAG, ds_id, "", "", NULLTAG, "", "", next_id );)
  7. For any String attribute on a type.

This generates the next id corresponding to the pattern of a Naming Rule that is set as a last used pattern in the prefernce "TC_LAST_USED_PATTERNS". This preference is used to store the user’s last selected naming pattern for a given property of a business object in the context of a condition.This is a multi valued User preference.There is not default setting for this preference. If this preference is not set then next id will be generated for the first pattern of the Naming Rule. If the nextId is returned as NULL; either no Naming Rule is defined, or a Naming Rule without any counters is defined for the given input. The ITK will return ITK_ok in this case.

Parameters:
typeName  (I) Teamcenter Engineering type name, i.e. "Item"
propertyName  (I) Property name, i.e. "item_id", "item_revision_id", "object_name"
itemTag  (I) The tag of the parent item
dsId  (I) Dataser Id
preferredTypeName  (I) Prefrerred type Name
defaultTypeName  (I) Default type Name
parentTag  (I) Used in case of next alt id
ruleSuffix  (I) Used in case of next revision id generated from the pattern in the alt rule
baseRevId  (I) Used in case of next revision id generated from the pattern in the alt rule
nextId  (OF)Generated next id

PROPERTY_API int NR_next_value2 ( const char *  typeName,
const char *  propertyName,
const tag_t  itemTag,
const char *  dsId,
const char *  preferredTypeName,
const char *  defaultTypeName,
const tag_t  parentTag,
const char *  ruleSuffix,
const char *  baseRevId,
char **  nextId,
logical isNRWithoutAutogen 
)

Gets the next id generated for a particular pattern in the Naming Rule. This ITK is a generalized ITK for generating next id in case of :

  1. next item id (usage example: NR_next_item_id(type_name, next_id) -> NR_next_value(type_name, "item_id", NULLTAG,"", "", "", NULLTAG, ""," ", next_id);)
  2. next revision id (usage example: NR_next_rev_id(type_name, item_tag, next_id) -> NR_next_value(type_name, "item_revision_id", item_tag,"","","",NULLTAG,"","", next_id );)
  3. next revision id generated from the pattern in the alt rule (usage example: NR_next_rev_id_from_alt_rule(type_name, rule_suffix, item_tag, base_rev_id, next_id) -> NR_next_value(type_name, "", item_tag, "", "", "", NULLTAG, rule_suffix, base_rev_id, next_id );)
  4. next alt id generated from the pattern in rule (usage example: NR_next_alt_id(preferred_type_name, default_type_name, parent_tag, next_id) -> NR_next_value("", "", NULLTAG, "", preferred_type_name, default_type_name, parent_tag, "", "", next_id );)
  5. next dataset id (usage example: NR_next_dataset_id(ds_type, next_id) -> NR_next_value(ds_type, "pubr_object_id", NULLTAG, "", "","",NULLTAG, "", "", next_id );)
  6. next dataset revision id (usage example: NR_next_dataset_rev_id(ds_type, ds_id, next_id) -> NR_next_value(ds_type, "rev", NULLTAG, ds_id, "", "", NULLTAG, "", "", next_id );)
  7. For any String attribute on a type.

This generates the next id corresponding to the pattern of a Naming Rule that is set as a last used pattern in the prefernce "TC_LAST_USED_PATTERNS". This preference is used to store the user’s last selected naming pattern for a given property of a business object in the context of a condition.This is a multi valued User preference.There is not default setting for this preference. If this preference is not set then next id will be generated for the first pattern of the Naming Rule. If the nextId is returned as NULL either no Naming Rule is defined, or a Naming Rule without any counters is defined for the given input. If no Naming Rule is defined, isNRWithoutAutogen will be false. If a Naming Rule without counters is defined, isNRWithoutAutogen will be true. In both the above cases ITK_ok will be returned.

Parameters:
typeName  (I) Teamcenter Engineering type name, i.e. "Item"
propertyName  (I) Property name, i.e. "item_id", "item_revision_id", "object_name"
itemTag  (I) The tag of the parent item
dsId  (I) Dataser Id
preferredTypeName  (I) Prefrerred type Name
defaultTypeName  (I) Default type Name
parentTag  (I) Used in case of next alt id
ruleSuffix  (I) Used in case of next revision id generated from the pattern in the alt rule
baseRevId  (I) Used in case of next revision id generated from the pattern in the alt rule
nextId  (OF) Generated next id
isNRWithoutAutogen  (OF) isNRWithoutAutogen is true if a valid naming rule was found but no counters were found, false otherwise.

PROPERTY_API int NR_next_values ( const char *  typeName,
int  quantity,
const char *  propertyName,
const tag_t  itemTag,
const char *  dsId,
const char *  preferredTypeName,
const char *  defaultTypeName,
const tag_t  parentTag,
const char *  ruleSuffix,
const char *  baseRevId,
char ***  nextId,
logical isNRWithoutAutogen 
)

Description : Gets the next item ids generated of the specified quantity for a particular pattern in the Naming Rule for item_id property only. This ITK is a generalized ITK for generating single next id in case of: 2).next revision id 3) next revision id generated from the pattern in the alt rule 4) next alt id generated from the pattern in rule 5) next dataset id 6).next dataset revision id 7) For any String attribute on a type.

This generates the next ids for item_ids corresponding to the pattern of a Naming Rule that is set as a last used pattern in the prefernce "TC_LAST_USED_PATTERNS". This preference is used to store the user’s last selected naming pattern for a given property of a business object in the context of a condition.This is a multi valued User preference.There is not default setting for this preference. If this preference is not set then next id will be generated for the first pattern of the Naming Rule.

Parameters:
typeName  (I) Teamcenter Engineering type name, i.e. "Item"
quantity  (I) no of instances of the specified type to be created
propertyName  (I) Property name, i.e. "item_id", "item_revision_id", "object_name"
itemTag  (I) The tag of the parent item
dsId  (I) Dataser Id
preferredTypeName  (I) Prefrerred type Name
defaultTypeName  (I) Default type Name
parentTag  (I) Used in case of next alt id
ruleSuffix  (I) Used in case of next revision id generated from the pattern in the alt rule
baseRevId  (I) Used in case of next revision id generated from the pattern in the alt rule
nextId  (OF)Generated next id
isNRWithoutAutogen  OF>

PROPERTY_API int NR_pattern_next_value ( const char *  typeName,
const char *  propertyName,
const tag_t  itemTag,
const char *  dsId,
const char *  preferredTypeName,
const char *  defaultTypeName,
const tag_t  parentTag,
const char *  ruleSuffix,
const char *  baseRevId,
const char *  pattern,
char **  nextId 
)

Gets the next id generated for a particular input pattern in the Naming Rule This ITK is a generalized ITK for generating next id in case of : 1).next item id 2).next revision id 3) next revision id generated from the pattern in the alt rule 4) next alt id generated from the pattern in rule 5) next dataset id 6).next dataset revision id 7) For any String attribute on a type.

If pattern doesnot exist then next id will be NULL

Parameters:
typeName  (I) Teamcenter Engineering type name, i.e. "Item"
propertyName  (I) Property name, i.e. "item_id", "item_revision_id", "object_name"
itemTag  (I) The tag of the parent item
dsId  (I) Dataser Id
preferredTypeName  (I) Prefrerred type Name
defaultTypeName  (I) Default type Name
parentTag  (I) Used in case of next alt id
ruleSuffix  (I) Used in case of next revision id generated from the pattern in the alt rule
baseRevId  (I) Used in case of next revision id generated from the pattern in the alt rule
pattern  (I) The input pattern for which the next id to be generated
nextId  (OF)Generated next id

PROPERTY_API int NR_pattern_next_values ( const char *  typeName,
int  quantity,
const char *  propertyName,
const tag_t  itemTag,
const char *  dsId,
const char *  preferredTypeName,
const char *  defaultTypeName,
const tag_t  parentTag,
const char *  ruleSuffix,
const char *  baseRevId,
const char *  pattern,
char ***  nextIds 
)

Description : Gets the next item ids generated of the specified quantity for a particular pattern in the Naming Rule for item_id property only. This ITK is a generalized ITK for generating single next id in case of: 2).next revision id 3) next revision id generated from the pattern in the alt rule 4) next alt id generated from the pattern in rule 5) next dataset id 6).next dataset revision id 7) For any String attribute on a type.

If pattern doesnot exist then next id will be NULL

Parameters:
typeName  (I) Teamcenter Engineering type name, i.e. "Item"
quantity  (I) no of instances of the specified type to be created
propertyName  (I) Property name, i.e. "item_id", "item_revision_id", "object_name"
itemTag  (I) The tag of the parent item
dsId  (I) Dataser Id
preferredTypeName  (I) Prefrerred type Name
defaultTypeName  (I) Default type Name
parentTag  (I) Used in case of next alt id
ruleSuffix  (I) Used in case of next revision id generated from the pattern in the alt rule
baseRevId  (I) Used in case of next revision id generated from the pattern in the alt rule
pattern  (I) The input pattern for which the next id to be generated
nextIds  (OF)Generated next id

PROPERTY_API int NR_revision_name_rule_attach_desc ( tag_t  attach_tag,
char **  type_name,
tag_t rule_tag,
int *  field_case 
)

Get all revision rule attach description.

Parameters:
attach_tag  (I) Tag of Revision Rule Attach object
type_name  (OF) The IMANTYPE that the rule applies to
rule_tag  (O) Tag of Revision Rule Attach object
field_case  (O) The case to automatically translate the property fields contents (NR_CASE_MIXED, NR_CASE_LOWER, NR_CASE_UPPER)

PROPERTY_API int NR_revision_naming_rule_attach_extent ( int *  n_tags,
tag_t **  field_tags 
)

Returns an array of all of the Revision Name Rule Attach objects.

Parameters:
n_tags  (O) Number of RevisionNameRuleAttach objects
field_tags  (OF) n_tags Array of RevisionNameRuleAttach tags

PROPERTY_API int NR_revision_naming_rule_desc ( tag_t  rule_tag,
char  rule_name[WSO_name_size_c+1],
logical exclude_skip_letters,
int *  init_rev_type,
char **  init_rev_start,
char **  init_rev_desc,
int *  sec_rev_type,
char **  sec_rev_start,
char **  sec_rev_desc,
int *  suppl_rev_format,
char **  suppl_rev_desc 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use NR_revision_naming_rule_desc2
Get all revision name rule fields.
Parameters:
rule_tag  (I)
rule_name  (O)
exclude_skip_letters  (O)
init_rev_type  (O)
init_rev_start  (OF)
init_rev_desc  (OF)
sec_rev_type  (O)
sec_rev_start  (OF)
sec_rev_desc  (OF)
suppl_rev_format  (O)
suppl_rev_desc  (OF)

PROPERTY_API int NR_revision_naming_rule_desc2 ( tag_t  rule_tag,
char **  rule_name,
logical exclude_skip_letters,
int *  init_rev_type,
char **  init_rev_start,
char **  init_rev_desc,
int *  sec_rev_type,
char **  sec_rev_start,
char **  sec_rev_desc,
int *  suppl_rev_format,
char **  suppl_rev_desc 
)

Get all revision name rule fields.

Parameters:
rule_tag  (I)
rule_name  (OF)
exclude_skip_letters  (O)
init_rev_type  (O)
init_rev_start  (OF)
init_rev_desc  (OF)
sec_rev_type  (O)
sec_rev_start  (OF)
sec_rev_desc  (OF)
suppl_rev_format  (O)
suppl_rev_desc  (OF)

PROPERTY_API int NR_revision_naming_rule_extent ( int *  n_tags,
tag_t **  rule_tags 
)

Returns an array of all of the Revision Naming Rules objects.

Parameters:
n_tags  (O) Number of Revision Name Rule objects
rule_tags  (OF) n_tags Array of Revision Name Rule tags

PROPERTY_API int NR_rule_desc ( tag_t  rule_tag,
char  rule_name[WSO_name_size_c+1],
int *  n_patterns,
char ***  patterns,
logical autogen,
int *  n_counters,
tag_t **  counter_tags 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use NR_rule_desc2
Get all rule fields.
Deprecated:
This function is not supported after TC2008. Use NR_rule_desc_with_counters.
Parameters:
rule_tag  (I) Tag of NameRules object
rule_name  (O) The unique name for this rule
n_patterns  (O) Number of patterns for this rule
patterns  (OF) n_patterns Array of pattern strings
autogen  (O) Indicates whether the counters are used for automatic generation of name fields. This can be TRUE only if the n_patterns is greater than 0 (zero). First pattern will be used for auto generation.
n_counters  (O) Number of counters for this rule
counter_tags  (OF) n_counters Array of counter tags

PROPERTY_API int NR_rule_desc2 ( tag_t  rule_tag,
char **  rule_name,
int *  n_patterns,
char ***  patterns,
logical autogen,
int *  n_counters,
tag_t **  counter_tags 
)

Get all rule fields.

Deprecated:
This function is not supported after TC2008. Use NR_rule_desc_with_counters.
Parameters:
rule_tag  (I) Tag of NameRules object
rule_name  (OF) The unique name for this rule
n_patterns  (O) Number of patterns for this rule
patterns  (OF) n_patterns Array of pattern strings
autogen  (O) Indicates whether the counters are used for automatic generation of name fields. This can be TRUE only if the n_patterns is greater than 0 (zero). First pattern will be used for auto generation.
n_counters  (O) Number of counters for this rule
counter_tags  (OF) n_counters Array of counter tags

PROPERTY_API int NR_rule_desc_with_counters ( tag_t  rule_tag,
char  rule_name[WSO_name_size_c+1],
int *  n_patterns,
char ***  patterns,
logical **  autogen,
int **  n_counters,
tag_t ***  counter_tags 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use NR_rule_desc_with_counters2
Get all rule fields.
Parameters:
rule_tag  (I) Tag of NameRules object
rule_name  (O) The unique name for this rule
n_patterns  (O) Number of patterns for this rule
patterns  (OF) n_patterns Array of pattern strings
autogen  (OF) autogen Array of autogen for each pattern string ( true or false )
n_counters  (OF) Number of counters for this rule
counter_tags  (OF) n_counters Array of counter tags

PROPERTY_API int NR_rule_desc_with_counters2 ( tag_t  rule_tag,
char **  rule_name,
int *  n_patterns,
char ***  patterns,
logical **  autogen,
int **  n_counters,
tag_t ***  counter_tags 
)

Get all rule fields.

Parameters:
rule_tag  (I) Tag of NameRules object
rule_name  (OF) The unique name for this rule
n_patterns  (O) Number of patterns for this rule
patterns  (OF) n_patterns Array of pattern strings
autogen  (OF) autogen Array of autogen for each pattern string ( true or false )
n_counters  (OF) Number of counters for this rule
counter_tags  (OF) n_counters Array of counter tags

PROPERTY_API int NR_rule_extent ( int *  n_tags,
tag_t **  rule_tags 
)

Returns an array of all of the NameRules objects.

Parameters:
n_tags  (O) Number of NameRules objects
rule_tags  (OF) n_tags Array of NameRules tags

PROPERTY_API int NR_validate_field ( const char *  type_name,
const char *  property_name,
char *  field_value 
)

Validates the field value against the specified type/property combination.

Return Values:

NR_never_matched - field_value does not match any of the valid patterns

Parameters:
type_name  (I) Teamcenter Engineering type name, i.e. "Item", "UGMASTER".
property_name  (I) Property name, i.e. "item_id", "item_revision_id", "object_name".
field_value  (I) The field to be tested and, if the case is wrong, converted to the rules field_case specification.

PROPERTY_API int NR_validate_rev_id_field ( const char *  type_name,
const char *  property_name,
char *  field_value,
const char *  item_id 
)

PROPERTY_API int NR_validate_rev_id_field2 ( const char *  type_name,
const char *  property_name,
char *  field_value,
const tag_t  item_tag 
)