|
ITK Function Reference
(V10000.1.0.60_20160308.00) |
Modules | |
| Variant Rule Errors | |
Macros | |
| #define | VRULE_vrule_class_name_c "VariantRule" |
Functions | |
| PS_API int | VRULE_ask_rule_text (tag_t vrule, tag_t bom_window, int *n_entries, char ***items, char ***options, char ***descriptions, char ***values) |
| PS_API int | VRULE_create (const char *name, const char *description, tag_t *vrule) |
| PS_API int | VRULE_create_from_bom (const char *name, const char *description, tag_t bom_window, int n_options, const tag_t *options, tag_t *vrule) |
| PS_API int | VRULE_create_from_variant_rule (const char *name, const char *description, tag_t bomvariantrule, int n_options, const tag_t *options, tag_t *vrule) |
| PS_API int | VRULE_set_from_bom (tag_t vrule, tag_t bom_window, logical update_only, int n_options, const tag_t *options) |
| PS_API int | VRULE_set_from_variant_rule (tag_t vrule, tag_t bomvariantrule, logical update_only, int n_options, const tag_t *options) |
Common Return Values
| Return Value | Description |
| VRULE_empty_rule | The supplied variant rule contains no options. This is an information message rather than an error. |
| VRULE_invalid_bom_window | The supplied BOM Window is not valid. |
| VRULE_invalid_rule | The supplied variant rule is not valid. |
| VRULE_unable_to_create | Teamcenter Engineering could not create the variant rule. This should be accompanied by a more specific reason. |
| PS_API int VRULE_ask_rule_text | ( | tag_t | vrule, |
| tag_t | bom_window, | ||
| int * | n_entries, | ||
| char *** | items, | ||
| char *** | options, | ||
| char *** | descriptions, | ||
| char *** | values | ||
| ) |
Returns the contents of a Variant Rule in text format. The BOM Window can be used to context. If it is set to NULLTAG, a BOM Window will be created with a default configuration.
The user is responsible to free each string returned in the array individually before freeing up the array itself. Use MEM_free to free up the memory.
| vrule | (I) Variant rule to query |
| bom_window | (I) BOM Window that supplies variant option values |
| n_entries | (O) Number of options defined in the rule |
| items | (OF) n_entries Array of Item IDs on which the options are defined |
| options | (OF) n_entries Array of names of the options stored in the rule |
| descriptions | (OF) n_entries Array of descriptions of the options stored in the rule |
| values | (OF) n_entries Array of values of the options stored in the rule |
| PS_API int VRULE_create | ( | const char * | name, |
| const char * | description, | ||
| tag_t * | vrule | ||
| ) |
Creates an empty Variant Rule, with the given name and description
| name | (I) Name for the new variant rule |
| description | (I) Description for the new variant rule |
| vrule | (O) Newly created variant rule |
| PS_API int VRULE_create_from_bom | ( | const char * | name, |
| const char * | description, | ||
| tag_t | bom_window, | ||
| int | n_options, | ||
| const tag_t * | options, | ||
| tag_t * | vrule | ||
| ) |
Creates a Variant Rule with the given name and description. This new rule is populated with the supplied list of options, with the values being taken from the given BOM window. If n_options is set to zero, then all set options (by user or rule) are saved.
| name | (I) Name for the new variant rule |
| description | (I) Description for the new variant rule |
| bom_window | (I) BOM Window that supplies variant option values |
| n_options | (I) Number of variant options in the supplied option array. Setting this value to zero will result in all options that are set in the BOM Window being saved. |
| options | (I) n_options Array of variant options to save to the new Rule. If any of these options were not set by the user or by a rule, their entry in here will be ignored. |
| vrule | (O) Newly created variant rule |
| PS_API int VRULE_create_from_variant_rule | ( | const char * | name, |
| const char * | description, | ||
| tag_t | bomvariantrule, | ||
| int | n_options, | ||
| const tag_t * | options, | ||
| tag_t * | vrule | ||
| ) |
Creates a new variant rule and populates it using option values set in the given BOM variant rule. Only those options which have been manually set (either by the user or by another variant rule) are stored in the new rule.
| name | (I) The name for the new variant rule |
| description | (I) The description for the new rule |
| bomvariantrule | (I) The BOM variant rule that supplies the variant option values |
| n_options | (I) Number of options in the supplied option array. Setting this value to zero will result in all options that are set in the BOM variant rule being saved. |
| options | (I) n_options Array of variant options to save to the new variant rule. If any of these options were not set by the user or by a rule, their entry in here will be ignored. |
| vrule | (O) The tag of the newly created variant rule |
| PS_API int VRULE_set_from_bom | ( | tag_t | vrule, |
| tag_t | bom_window, | ||
| logical | update_only, | ||
| int | n_options, | ||
| const tag_t * | options | ||
| ) |
Saves a given set of option values to an existing variant rule. Only those options which have been manually set (either by the user or by another variant rule) are stored in the rule.
| vrule | (I) Variant rule to save the values to |
| bom_window | (I) BOM Window that supplies variant option values |
| update_only | (I) Controls whether the supplied option values will replace the rule's existing options or simply update the existing values. true - Only save the values of those options that are already defined in the rule. false - Save all the options that are set in the BOM Window and listed in the option array. |
| n_options | (I) Number of variant options in the supplied option array. Setting this value to zero will result in all options that are set in the BOM Window being saved. |
| options | (I) n_options Array of variant options to save to the new Rule. If any of these options were not set by the user or by a rule, their entry in here will be ignored. |
| PS_API int VRULE_set_from_variant_rule | ( | tag_t | vrule, |
| tag_t | bomvariantrule, | ||
| logical | update_only, | ||
| int | n_options, | ||
| const tag_t * | options | ||
| ) |
Saves the given list of options (with their values being taken from the BOM Variant Rule) to the given existing Variant Rule. If n_options is zero, then all set options (by user or rule) are saved. If update_only is set to TRUE, then only those options which are already in the rule are saved.
| vrule | (I) The variant rule to save the values to |
| bomvariantrule | (I) The BOM variant rule that supplies the variant option values |
| update_only | (I) Controls whether the supplied option values will replace the rule's existing options or simply update the existing values. Set this to true to only save the values of those options that are already defined in the rule. Set this to false to save all options that are set in the BOM variant rule and listed in the option array. |
| n_options | (I) Number of options in the supplied option array. Setting this value to zero will result in all options that are set in the BOM variant rule being saved. |
| options | (I) n_options Array of variant options to save to the new variant rule. If any of these options were not set by the user or by a rule, their entry in here will be ignored. |