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

Bill of Materials


Detailed Description

The Bill of Material (BOM) module is intended to give a consistent interface to the separate elements that make up a line in a BOM. The design assumes that you have a BOM window (this can be a printed report or a screen window) showing a BOM made up of BOM lines. Each BOM line shows attributes derived from Items, Item Revision, occurrences, and so on along with some attributes belonging to the BOM line itself and not any of the individual objects the line represents (i.e., is_packed).

The names of these attributes give a clue as to which object they have been derived from. The programmer using them can ignore this and treat them all as BOM line attributes. Although some attributes are standard (and listed in bom_attr.h) others are defined at run time (i.e., the note types on occurrences) and have to be found by inquiry.

Since the BOM module keeps all of its windows synchronized, it is possible for changes to structure in one window to cause a BOM line in some other window to disappear. Therefore, be careful about storing BOM line tags when using multiple windows onto the same structure if that structure is open to editing.

Common Return Values

Return Value Description
BOM_compare_invalid_destThe output parameter is set to an illegal value.
BOM_compare_invalid_modeThe mode parameter is not set to one of the legal values.
BOM_compare_nested_rootsThe specified BOM lines are nested (i.e., one is an ancestor of the other).
BOM_compare_no_report No report output was generated because a report was not requested by BOM_compare.
VRULE_invalid_rule The supplied variant rule is not valid.

Modules

BOM Setup Functions

BOM Window Functions

BOM Line Functions

BOM Occurrence Sequencing

BOM Attribute Functions

Used to ask about attributes of a BOM line, and update some of them. After updating the attribute, BOM_save_window must be called to commit the change.

BOM Substitute Functions

BOM Window Variation Functions

Common Return Values

BOM_variant_error_condition - The new variant data triggered a variant rule check in one (or more) of the BOM windows being updated.

BOM Variant Data Functions

BOM Variant Rule Functions

BOM Variant Clause List Functions

Common Return Values

BOM_variant_invalid_cond_clause - The specified clause position is not valid.
BOM_variant_invalid_operation - This operation cannot be performed on the given list of clauses.

BOM Modular Variants Functions

Configuration

This is the set of ITK functions required to configure a structure.

BOM_line_ask_sos
BOM_line_clear_sos
BOM_sos_apply
BOM_sos_apply_list
BOM_sos_free
BOM_window_ask_ove_messages
BOM_line_ove_validate
BOM_sos_ask_entries
BOM_sos_ask_entry_<type>
BOM_sos_set_entry_<type>
BOM_sos_unset_entry
BOM_option_ask_allowed_ints
BOM_option_ask_allowed_reals
BOM_option_ask_allowed_strings

Authoring ITK

The following ITKs deal with the creation and editing of Modular Variants. It essentially provides a way to getting and setting MVL. MVL has 2 distinct areas - the option declaration statements and the language expressions. These are dealt with via separate functions in the ITK.

BOM_line_ask_mvl_condition
BOM_line_set_mvl_condition
BOM_line_ask_mvl
BOM_line_set_mvl
BOM_module_list_options
BOM_module_ask_option_text
BOM_line_delete_option
BOM_line_define_option

Additional ITK

BOM_option_where_declared
BOM_option_where_used

SOS Storage and Retrieval

BOM Variant configuration functions

BOM Compare Functions

Common Return Values

BOM_no_current_compare - The BOMCompare has not yet been supplied to BOM_compare_execute (or BOM_compare, for the standard internal compare), or an error occurred during the last such call that invalidated the comparison.
BOM_no_such_bom_compare_mode - No mode by that name yet registered.

BOM Snapshot Folder creation functions

BOM Baseline Functions

BOM Post-Configuration functions

BOM Publish Functions

Functions


Function Documentation

BOM_API int BOM_add_option_rev_value ( tag_t  option_rev,
const char *  value,
int *  an_index 
)

Adds a new allowed value to the option revision.

Parameters:
option_rev  (I) Tag of the option revision
value  (I) New text value
an_index  (O) Index for the new value

BOM_API int BOM_ask_index_of_opt_rev_value ( tag_t  option_rev,
const char *  value,
int *  an_index 
)

Converts a specified text string into an index value.

Restrictions:

If the value is not valid for the option revision, it returns an index value of -1.

Parameters:
option_rev  (I) Tag of the option revision
value  (I) Text value to look up
an_index  (O) Index for that value

BOM_API int BOM_ask_option_data ( tag_t  option,
tag_t owning_item,
char **  name,
char **  description 
)

Returns the data stored in an option. See also BOM_list_option_rev_values for option_rev data.

Parameters:
option  (I) Tag of the option
owning_item  (O) Item that owns the option
name  (OF) Option name
description  (OF) Option description

BOM_API int BOM_ask_option_of_rev ( tag_t  option_rev,
tag_t option 
)

Specified an option revision returns its option.

Parameters:
option_rev  (I) Tag of the revision
option  (O) Tag of the corresponding option

BOM_API int BOM_ask_option_path ( int  option,
char **  path 
)

Parameters:
option  (I)
path  (OF)

BOM_API int BOM_ask_option_rev_mode ( tag_t  option_rev,
int *  mode 
)

Returns the mode of the specified option revision.

Restrictions:

At present all options are of mode BOM_option_mode_enum.

Parameters:
option_rev  (I) Tag of the option revision
mode  (O) Its current mode

BOM_API int BOM_ask_option_rev_value ( tag_t  option_rev,
int  an_index,
char **  value 
)

Translates the specified index value into the corresponding text.

Parameters:
option_rev  (I) Tag of the option revision
an_index  (I) Index value
value  (OF) Text equivalent

BOM_API int BOM_ask_publishlink_for_source ( tag_t  source_line,
tag_t publish_link 
)

Returns PublishLink where the input line is source

Parameters:
source_line  (I) Tag of source BOMLine
publish_link  (O) Tag of PublishLink

BOM_API int BOM_ask_publishlink_for_target ( tag_t  target_line,
tag_t publish_link 
)

Returns PublishLink where the input line is a target

Parameters:
target_line  (I) Tag of target BOMLine
publish_link  (O) Tag of PublishLink

BOM_API int BOM_ask_variant_config ( tag_t  bom_variant_config,
tag_t bom_vrule,
int *  count,
tag_t **  bomsoslist 
)

Parameters:
bom_variant_config  (I)
bom_vrule  (O)
count  (O)
bomsoslist  (OF) count

BOM_API int BOM_ask_variant_config_context ( tag_t  bom_variant_config,
tag_t bom_window,
tag_t root_bom_line 
)

Parameters:
bom_variant_config  (I)
bom_window  (O)
root_bom_line  (O)

BOM_API int BOM_ask_variant_e_block ( tag_t  block,
int *  n,
tag_t **  exprs 
)

Reads the expressions from a variant expression block.

Parameters:
block  (I) Tag of the expression block
n  (O) The number of expressions
exprs  (OF) n The array of variant expressions

BOM_API int BOM_ask_variant_expression ( tag_t  expr,
tag_t v1,
int *  opcode,
tag_t v2,
char **  str 
)

Returns the contents of a variant expression.

Parameters:
expr  (I) Tag of the expression
v1  (O) The left hand operand
opcode  (O) An operator from the BOM_variant_operator_xxx values defined in bom_tokens.h
v2  (O) The right hand operand
str  (OF) A string alternative to v2

BOM_API int BOM_ask_window_active_arrangement ( tag_t  bom_window,
tag_t arrangement 
)

Parameters:
bom_window  (I)
arrangement  (O)

BOM_API int BOM_ask_window_config_rule ( tag_t  window,
tag_t config_rule 
)

Returns the tag of the Revision (configuration) Rule used by the window. To change the contents of the Revision Rule, edit it using the CFM functions.

By default, the window will have been created with the user's default Revision Rule.

Parameters:
window  (I) Window to be modified
config_rule  (O) Window's configuration rule

BOM_API int BOM_ask_window_ignore_ove_errors_on_expand ( tag_t  bom_window,
logical ignore 
)

Set or get whether OVE problems should be ignored when we expand lines. If you get errors, then ignore them, expand the lines and solve the problems

Parameters:
bom_window  (I)
ignore  (O)

BOM_API int BOM_ask_window_ove_message_error_level ( tag_t  bom_window,
int *  level 
)

Set or get the level of OVE error check that generates actual errors

level can be:

BOM_OVE_INFO - All will generate errors
BOM_OVE_WARN - Warnings and above
BOM_OVE_ERROR - Only errors (default)
BOM_OVE_IGNORE_ALL - Ignore all

Parameters:
bom_window  (I)
level  (O)

BOM_API int BOM_ask_window_top_line ( tag_t  window,
tag_t top_bom_line 
)

Returns the tag of the top line of the window. This will be NULLTAG if no top line has been set.

Parameters:
window  (I) Tag of window
top_bom_line  (O) Returns the tag of the top line in this window

BOM_API int BOM_close_window ( tag_t  window  ) 

Close the BOM window.

Note:
Any changes to the structure of the bill in the window will be lost unless the BOM_save_window function is called first.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_compare ( tag_t  line1,
tag_t  line2,
int  mode,
int  output 
)

Compares the specified BOM lines. Supports all three compare modes. Compare output can be directed to the BOM line compare columns, which can be accessed via the BOM line attribute functions. Report output can also be obtained. Alternatively, the BOM compare user exit functions can be used. All of these output mechanisms can be used simultaneously,

The scope of the compare can be controlled via the BOM line stop flag ITK functions. These allow a flag to be set on a BOM line which will prevent the BOM compare from comparing anything below that BOM line.

Restrictions:

Compare does not allow nested BOM lines to be compared.

Parameters:
line1  (I) Tag of the first BOM line to be compared
line2  (I) Tag of the second BOM line to be compared
mode  (I) Compare mode to be used. Can be one of the following:
BOM_compare_singlelevel
BOM_compare_lowestlevel
BOM_compare_multilevel
output  (I) Output mechanism to be used. Constructed by adding the following values as required:
BOM_compare_output_bomline
BOM_compare_output_userexit
BOM_compare_output_report

BOM_API int BOM_compare_ask_difference ( tag_t  cmp_item,
int *  diff_flags 
)

Returns a bit encoded representation of the changes which occurred in a particular compare item between the two compared BOMs. Macros are provided to extract the individual flags from the returned value.

Note:
The compare item required as an input parameter to this function is not the same as a Teamcenter Engineering Item. The tag of the compare item is passed to the BOM compare user exit functions. It can also be obtained via BOM_compare_report.
Parameters:
cmp_item  (I) Tag of a compare item
diff_flags  (O) Differences between the two BOMs relating to the compare item

BOM_API int BOM_compare_ask_engine_root_bomlines ( tag_t  bomcompareengine,
tag_t bomline1,
tag_t bomline2 
)

Returns the root BOMLines of the given BOM Compare engine.

Parameters:
bomcompareengine  (I) BOM Compare Engine object
bomline1  (O) Root BOMLine of the first BOM being compared
bomline2  (O) Root BOMLine of the second BOM being compared

BOM_API int BOM_compare_ask_mode ( tag_t  bomcompare,
char **  mode_name 
)

Returns the name of the mode of the given BOM Compare.

Parameters:
bomcompare  (I) BOM Compare object, or NULLTAG for the standard internal BOMCompare.
mode_name  (OF) Name of the BOM Compare's mode

BOM_API int BOM_compare_ask_mode_info ( const char *  mode_name,
int *  traversal_mode,
tag_t compare_desc,
logical visible,
logical autopack,
logical virtualunpack 
)

Returns details of the named BOM Compare mode.

Parameters:
mode_name  (I) Name of the new compare mode
traversal_mode  (O) Single level, lowest level, or multi level.
compare_desc  (O) Compare engine descriptor
visible  (O) For future expansion. Ignore this value.
autopack  (O) Autopacking flag
virtualunpack  (O) Autounpacking flag

BOM_API int BOM_compare_ask_modes ( logical  visible_only,
int *  n_modes,
char ***  mode_names 
)

Returns an array of valid compare mode names. Compare modes can set a visibility flag to control whether a specific mode will show up in the user interface or not.

Parameters:
visible_only  (I) This is for future expansion, and should be set false
n_modes  (O) Number of mode names returned
mode_names  (OF) n_modes Array of mode names

BOM_API int BOM_compare_ask_output_mode ( tag_t  bomcompare,
int *  output_mode 
)

Returns the output mode of the given BOM Compare.

Parameters:
bomcompare  (I) BOM Compare object, or NULLTAG for the standard internal BOMCompare.
output_mode  (O) BOM Compare's output mode

BOM_API int BOM_compare_ask_qty ( tag_t  cmp_item,
double *  qty1,
double *  qty2 
)

Returns the quantities of the specified compare item in each of the compared BOMs.

Note:
The compare item required as an input parameter to this function is not the same as a Teamcenter Engineering Item. The tag of the compare item is passed to the BOM compare user exit functions. It can also be obtained via BOM_compare_report.
Parameters:
cmp_item  (I) Tag of a compare item.
qty1  (O) Quantity of the item in the first BOM selected for compare.
qty2  (O) Quantity of the item in the first BOM selected for compare.
Note:
In the quantity output parameters, a value less than zero indicates a special case. The exact nature of this special case can be obtained using these macros:
BOM_cmp_asreq (qty)
If true, then quantity is As Required.

BOM_cmp_undef (qty)
If true, then quantity is undefined.

BOM_API int BOM_compare_ask_rev ( tag_t  cmp_item,
char **  rev1,
char **  rev2 
)

Returns the revisions of the specified compare item in each of the compared BOMs.

Note:
The compare item required as an input parameter to this function is not the same as a Teamcenter Engineering Item. The tag of the compare item is passed to the BOM compare user exit functions. It can also be obtained via BOM_compare_report.

In the revision output parameters, ??? means no revision is configured

Parameters:
cmp_item  (I) Tag of a compare item
rev1  (OF) Revision of the item in the first BOM selected for compare
rev2  (OF) Revision of the item in the first BOM selected for compare

BOM_API int BOM_compare_ask_root_bomlines ( tag_t  bomcompare,
tag_t bomline1,
tag_t bomline2 
)

Returns the root BOMLines of the given BOM Compare.

Parameters:
bomcompare  (I) BOM Compare object, or NULLTAG for the standard internal BOMCompare
bomline1  (O) Root BOMLine of the first BOM being compared
bomline2  (O) Root BOMLine of the second BOM being compared

BOM_API int BOM_compare_ask_seqno ( tag_t  cmp_item,
char **  seqno 
)

Returns the sequence number of the specified compare item in the compared BOMs.

Note:
In single-level mode and multi-level mode, the sequence number will be the same in both BOMs.
In lowest-level mode, items with many different sequence numbers can be bundled together, and the return value from this function could be any one of them.

The compare item required as an input parameter to this function is not the name as a Teamcenter Engineering Item. The tag of the compare item is passed to the BOM compare user exit functions. It can also be obtained via BOM_compare_report.

Parameters:
cmp_item  (I) Tag of a compare item
seqno  (OF) Sequence number of the item in the both BOMs. (except in lowest-level mode).

BOM_API int BOM_compare_clear ( tag_t  compare_context  ) 

Clears the compare columns from all BOM lines relating to the last compare.

Parameters:
compare_context  (I) Tag of the compare object (when using BOM_compare_create/execute), or NULLTAG (or a relevant bomline tag) to access the global compare object (when using BOM_compare).

BOM_API int BOM_compare_create ( tag_t bomcompare  ) 

Creates a new BOM Compare object. This new compare object can then be used in preference to the internal pre-defined object used by the BOM_compare call and the User Interface. This allows multiple BOM Compares to be performed simultaneously.

Parameters:
bomcompare  (O) New empty BOM Compare object that can be passed into BOM_compare_execute

BOM_API int BOM_compare_define_mode ( const char *  mode_name,
int  traversal_mode,
tag_t  compare_desc,
logical  visible,
logical  autopack,
logical  virtualunpack 
)

Creates a new BOM Compare mode.

  • Use auto-pack for any multi-level compare based on the same comparison as packing (by default, item ID and sequence number).
  • Use virtual-unpack for comparisons with primary elements that aren't closely related to the packing condition.
  • For multi-level compares based on a comparison that is not closely related to the packing condition, you're on your own: recommendation is to fully unpack the structure before you compare it.
Six standard modes are pre-defined to support the modes offered by the old BOM_compare() function.

Primary keys: item id; Aggregate keys: revision and quantity.

BOM_std_compare_single_level_name
BOM_std_compare_lowest_level_name
BOM_std_compare_var_level_name

Primary keys: item id and sequence number; Aggregate keys: revision and quantity.

BOM_std_compare_single_level_seq_name
BOM_std_compare_lowest_level_seq_name
BOM_std_compare_var_level_seq_name

All six have special support for the old style of text report output and bomline properties, which can be enabled by setting the preferences BOM_compare_legacy_report and BOM_compare_legacy_properties respectively. User-defined modes cannot have this legacy support.

Return Values:

BOM_duplicate_bom_compare_mode - A mode by that name already exists.

Parameters:
mode_name  (I) Name of the new compare mode
traversal_mode  (I) Will this compare mode be single level (BOM_compare_singlelevel), lowest (leaf) level (BOM_compare_lowestlevel), or multi-level (BOM_compare_multilevel)?
compare_desc  (I) Compare engine descriptor to be used
visible  (I) This is for future expansion. Set it to false.
autopack  (I) Set this to true if this mode should perform auto-packing
virtualunpack  (I) Set this to true if this mode should perform virtual-unpacking

BOM_API int BOM_compare_delete ( tag_t  bomcompare  ) 

Deletes a BOM Compare object.

Parameters:
bomcompare  (I) BOM Compare object to be deleted

BOM_API int BOM_compare_execute ( tag_t  bomcompare,
tag_t  bomline1,
tag_t  bomline2,
const char *  mode_name,
int  output_to 
)

Compares the two BOMs defined by the given BOMLines.

Parameters:
bomcompare  (I) BOM Compare object to be used to perform the comparison. Set this to NULLTAG to use the standard internal BOMCompare.
bomline1  (I) Root BOMLine of the first BOM to be compared
bomline2  (I) Root BOMLine of the second BOM to be compared
mode_name  (I) Name of the compare mode to be used (see BOM_compare_define_mode)
output_to  (I) Where to send the compare results (see BOM_compare for details)

BOM_API int BOM_compare_list_bomlines ( tag_t  cmp_item,
int *  count1,
tag_t **  bomline_list1,
int *  count2,
tag_t **  bomline_list2 
)

Returns two lists which contain the BOM lines relating to a particular compare item.

Note:
The compare item required as an input parameter to this function is not the same as a Teamcenter Engineering Item. The tag of the compare item is passed to the BOM compare user exit functions. It can also be obtained via BOM_compare_report.
Parameters:
cmp_item  (I) Tag of a compare item
count1  (O) Number of BOM lines in first list
bomline_list1  (OF) count1 Array of BOM line tags from the first compared BOM
count2  (O) Number of BOM lines in second list
bomline_list2  (OF) count2 Array of BOM line tags from the second compared BOM

BOM_API int BOM_compare_list_diffs ( tag_t  line,
int *  diff_count,
tag_t **  diff_lines,
int **  diff_flags 
)

Returns a list which contains the BOM lines which have a difference related to them. Also returns a list of difference flags for those BOM Lines. Macros are provided to extract the individual flags from the returned values.

Parameters:
line  (I) Tag of one of the BOM lines which the compare was performed on
diff_count  (O) Number of BOM lines in the list
diff_lines  (OF) diff_count Array of BOM line tags
diff_flags  (OF) diff_count Array of BOM line difference flags

BOM_API int BOM_compare_list_diffs_context ( tag_t  line,
tag_t  context,
int *  diff_count,
tag_t **  diff_lines,
int **  diff_flags 
)

For the nominated compare context (or the default context if the compare context is NULLTAG), for the side of the compare on which the nominated bomline is the root, returns two arrays of length diff_count. One lists the different bomlines, the other holds flags indicating whether each line is added or different. For the standard (legacy) modes, additional flags indicate a change in revision and/or quantity also.

Use these macros to interrogate the flags:

        #include <bom/bom_tokens.h>

        BOM_cmp_no_diff(diff_flags[i])
        BOM_cmp_added(diff_flags[i])
        BOM_cmp_changed(diff_flags[i])
        BOM_cmp_chg_qty(diff_flags[i])
        BOM_cmp_chg_rev(diff_flags[i])
Parameters:
line  (I) The root line of one side of the compare performed in the compare context
context  (I) A compare context (obtained from BOM_compare_create) or NULLTAG for the default context
diff_count  (O) The number of lines in the following two arrays
diff_lines  (OF) diff_count Array of tags of the bomlines
diff_flags  (OF) diff_count Array of flags indicating the disposition of the bomlines compared with the other side

BOM_API int BOM_compare_report ( tag_t  compare_context,
int *  report_length,
char ***  report_lines,
tag_t **  report_items 
)

Returns a formatted text report of BOM differences. It also returns an list of the compare items which relate to each report line. These compare items can then be queried to obtain the original BOM Lines relating to that report line.

Note:
The compare item returned by this function in the report_items list is not the same as a Teamcenter Engineering item. A compare item can only be used in certain BOM compare functions.
Parameters:
compare_context  (I) Tag of the compare object (when using BOM_compare_create/execute), or NULLTAG (or a relevant bomline tag) to access the global compare object (when using BOM_compare).
report_length  (O) Number of lines in the report
report_lines  (OF) report_length Array of report lines. The first array entry (report_lines[0]) contains the column headers.
report_items  (OF) report_length Array of compare item tags. Entries which relate to report lines, but are not compare items (e.g., the column headers) will have their tag set to NULLTAG.

BOM_API int BOM_compare_report_size ( tag_t  compare_context,
int *  report_width,
int *  column_spacer,
int *  column_count,
int **  column_width 
)

Returns details of the column layout in the compare report generated via BOM_compare_report. It returns the number of columns, the width of each column, the number of spaces between the columns, and the overall width of the report.

Parameters:
compare_context  (I) Tag of the compare object (when using BOM_compare_create/execute), or NULLTAG (or a relevant bomline tag) to access the global compare object (when using BOM_compare).
report_width  (O) Width of the report
column_spacer  (O) Number of spaces between each column
column_count  (O) Number of columns
column_width  (OF) column_count Array of column widths

BOM_API int BOM_compare_reports_unchanged ( const char *  mode_name,
logical reports_unchanged 
)

Parameters:
mode_name  (I)
reports_unchanged  (O)

BOM_API int BOM_compare_set_rpt_unchanged ( const char *  mode_name,
logical  report_unchanged 
)

Parameters:
mode_name  (I)
report_unchanged  (I)

BOM_API int BOM_compare_set_visibility ( const char *  mode_name,
logical  visible 
)

Parameters:
mode_name  (I)
visible  (I)

BOM_API int BOM_compare_suppress ( tag_t  compare_context,
int  output 
)

Suppresses the specified compare output for the given context. This is only useful when used in the BOM compare user exit functions. For example, it can be used to allow a user exit generated report to replace the standard internal report window. It seems unlikely you will want to use this other than with the default context.

Restrictions:

It cannot be used to suppress all output.

Parameters:
compare_context  (I) Tag of the compare object (when using BOM_compare_create/execute), or NULLTAG (or a relevant bomline tag) to access the global compare object (when using BOM_compare).
output  (I) Output modes to be suppressed. Constructed by adding the following values as required:
BOM_compare_output_bomline
BOM_compare_output_userexit
BOM_compare_output_report

BOM_API int BOM_compare_visit_engine ( tag_t  bomcompare,
BOM_compare_engine_visitor_t enter_engine,
BOM_compare_engine_visitor_t leave_engine,
BOM_compare_set_visitor_t visit_set,
void *  user_data 
)

Performs a recursive depth-first traversal of the root compare engine and its children, calling the enter_engine callback for each engine before any of its children, and calling the leave_engine callback immediately after the final child of that engine. Apart from the topmost (depth=0) engine, compare engines have an associated compare set that you may interrogate to retrieve the root lines' key values. Only compare sets with differing sides, or engines that are the ancestors of such sets, are visited.

For all the call-back functions, returning ITK_ok indicates success. Any other value will abort the traversal and cause the function to fail with the same error code. Any error returned by your callbacks should be returned back to you by this call.

Parameters:
bomcompare  (I) BOM Compare object to be queried. Set this to NULLTAG to query the standard internal BOMCompare.
enter_engine  (Ip) Engine entry callback
leave_engine  (Ip) Engine departure callback
visit_set  (Ip) Set visiting callback
user_data  (I) A pointer for the user's use: passed to all callbacks.

BOM_API int BOM_create_baseline ( tag_t  bom_window,
const char *  name,
const char *  desc,
const char *  rel_proc_name,
const char *  jobName,
const char *  jobDescription,
tag_t baseline_rev 
)

This ITK creates a Baseline Revision for the structure represented by the input configured BOM Window. The BOMWindow would be traversed recursively to create baselines for each of the child components, and creates baselines for each of the Work in Process Item Revisions. If the child component were released then, that would be reused. Precise PSBOMView Revision would be created for new structure, if the preference Baseline_precise_bvr is set as "1" or "2". It would create a snapshot folder that is attached to the baseline_rev, based on the preference. The ITK would generate a Baseline Revision ID using USER_new_revision_id_from_alt_rule("PDR", , , , ,) for all the subcomponents. The description entered would be set as the description of the Baseline Revision. Once the creation of the Baseline Revision is completed, the Baseline Revision would undergo the release process as given by the rel_proc_name and having name and desc as jobName and jobDescription respectively.

Parameters:
bom_window  (I) Item Revision that needs to be Baselined
name  (I) The Revision Id of the Baseline Item Revision
desc  (I) Description that needs to be set on the Baseline Item Revision
rel_proc_name  (I) Name of the Release Procedure through which the Baseline Revision should under go
jobName  (I) Name of the Job
jobDescription  (I) Description of the Job
baseline_rev  (O) Item Revision Tag of the Baseline Revision created

BOM_API int BOM_create_baseline_with_baseline_label ( tag_t  bom_window,
const char *  name,
const char *  desc,
const char *  rel_proc_name,
const char *  jobName,
const char *  baseline_label_name,
const char *  jobDescription,
tag_t baseline_rev 
)

This ITK creates a Baseline Revision for the structure represented by the input configured BOM Window. The BOMWindow would be traversed recursively to create baselines for each of the child components, and creates baselines for each of the Work in Process Item Revisions. If the child component were released then, that would be reused. It would create a snapshot folder with baseline_label_name. The ITK would generate a Baseline Revision ID using USER_new_revision_id_from_alt_rule("PDR", , , , ,) for all the subcomponents. The description entered would be set as the description of the Baseline Revision. Once the creation of the Baseline Revision is completed, the Baseline Revision would undergo the release process as given by the rel_proc_name and having name and desc as jobName and jobDescription respectively.

Parameters:
bom_window  (I) Item Revision that needs to be Baselined
name  (I) The Revision Id of the Baseline Item Revision
desc  (I) Description that needs to be set on the Baseline Item Revision
rel_proc_name  (I) Name of the Release Procedure through which the Baseline Revision should under go
jobName  (I) Name of the Job
baseline_label_name  (I) Name of the Snapshot Folder
jobDescription  (I) Description of the Job
baseline_rev  (O) Item Revision Tag of the Baseline Revision created

BOM_API int BOM_create_bomline_variant_config ( tag_t  bom_line,
int  mode,
tag_t bom_variant_config 
)

Parameters:
bom_line  (I)
mode  (I)
bom_variant_config  (O)

BOM_API int BOM_create_bomsetlines_for_input_lines ( BOM_bomset_create_criteria_t  bomset_create_criteria,
tag_t input_lines,
int  input_lines_count,
int *  bomset_count,
BOM_bomset_input_info_t **  bomset_input_info 
)

Returns the array of bomsets for given bomlines. A bomset is a chunk of bomlines. Dividing a BOM structure into fixed size bomsets can help in processing them such as expansion. BomSet creation can be based on given criteria such as available system memory, maximum size or maximum size as percentage of total structure size. A bomset, by default, contains number of bomlines those can be expanded within available system memory at the point of creation.

Parameters:
bomset_create_criteria  (I) Structure having BOMSet creation criteria
input_lines  (I) Tag array of structure top lines for which bomsets to be created
input_lines_count  (I) Integer size of Tag array of input lines
bomset_count  (OF) Number of bomsets created
bomset_input_info  (OF) Structure array of bomsets

BOM_API int BOM_create_option ( tag_t  owning_item,
const char *  name,
const char *  description,
int  mode,
tag_t option,
tag_t option_rev 
)

Creates a new option with an initial empty revision.

Note:
For now mode should only be BOM_option_mode_enum
Restrictions:

At present options are only implemented for enumerated values; in the future the mode argument might allow for integer option values.

Parameters:
owning_item  (I) Item to own the new option
name  (I) Name for the new option
description  (I) Description the new option (can be NULL)
mode  (I) Declares the mode of the option, currently it can only be BOM_option_mode_enum.
option  (O) Tag of the newly-created option
option_rev  (O) Tag of the initially-created revision

BOM_API int BOM_create_publish_link ( const char *  name,
const char *  type,
tag_t  source_line,
int  target_count,
const tag_t target_lines,
tag_t publishLink 
)

Create PublishLink between absolute occurrences of source and targets.

Note:
If a PublishLink for the source occurrence exists, an error will be thrown

If any of the targets are already connected via PublishLink to a different source occurrence, an error will be thrown

Parameters:
name  (I) Name of PublishLink to be created
type  (I) Type of PublishLink to be created
source_line  (I) source tag BOM line
target_count  (I) no of of target tags
target_lines  (I) target_count
publishLink  (O) Tag of PublishLink created

BOM_API int BOM_create_snapshot ( tag_t  bom_window,
const char *  name,
const char *  desc,
tag_t snapshot_folder 
)

Parameters:
bom_window  (I)
name  (I)
desc  (I)
snapshot_folder  (O)

BOM_API int BOM_create_variant_config ( tag_t  bom_vrule,
int  count,
tag_t bomsoslist,
tag_t bom_variant_config 
)

Parameters:
bom_vrule  (I)
count  (I)
bomsoslist  (I) count
bom_variant_config  (O)

BOM_API int BOM_create_window ( tag_t window  ) 

Creates a new BOM window and returns the tag of the newly created window.

Parameters:
window  (O) Tag of the newly created window

BOM_API int BOM_create_window_from_snapshot ( tag_t  snapshot_folder,
tag_t bom_window 
)

Parameters:
snapshot_folder  (I)
bom_window  (O)

BOM_API int BOM_create_window_variant_config ( tag_t  bom_window,
int  mode,
tag_t bom_variant_config 
)

Parameters:
bom_window  (I)
mode  (I)
bom_variant_config  (O)

BOM_API int BOM_declare_option ( tag_t  itemrev,
tag_t  optionrev,
tag_t ve,
tag_t veb 
)

Declares the given option revision against the given Item Revision.

Parameters:
itemrev  (I) The Item Revision to declare the option revision against
optionrev  (I) The option revision to declare
ve  (O) Tag of the option declaration Variant Expression
veb  (O) Tag of the Item Revision's Variant Expression Block which the option declaration is contained in

BOM_API int BOM_decompose_ove_path ( const char *  path,
int *  count,
char ***  pathElements 
)

Parameters:
path  (I)
count  (O)
pathElements  (OF) count

BOM_API int BOM_delete_publishlink_for_source ( tag_t  source_line  ) 

Delets Publish Link and its targets and source for given source bom line

Note:
If absolute occurrence of any targetLines is found being referred as target in an existing PublishLink with a different source, an error is thrown.

If a PublishLink exists for source line, the link is uppdated with absolute occurrences of targetLines

If a PublishLink doesnt exist between absolute occurrence of source and targets it will be created.

Parameters:
source_line  (I) source tag of BOM line

BOM_API int BOM_delete_variant_config ( tag_t  bom_variant_config  ) 

Parameters:
bom_variant_config  (I)

BOM_API int BOM_dryrun_baseline ( tag_t  bom_window,
const char *  rel_proc_name,
char **  logFileName,
char **  fullLogFileName,
logical error_registered 
)

This ITK creates a does a dryrun of baseline creation for the input BOMWindow. It does not create the baseline but runs through all the pre-conditions, user error checks and places the results in the filename pointed by the logFileName. FullLogFileName provides the full path to the LogFileName. If there is any error from the pre-conditions or the user checks, the error_registed would be set to TRUE.

Parameters:
bom_window  (I) Tag of the BOMWindow for which we are creating the baseline
rel_proc_name  (I) Name of the Release Procedure through which the Baseline Revision should under go
logFileName  (OF) Name of the LogFile Generated
fullLogFileName  (OF) FullPath of the output logfile, including the logfilename
error_registered  (O) Flag that indicates atleast one of the bomline had errors in the validation

BOM_API int BOM_end_forced_config ( tag_t  transaction  ) 

Parameters:
transaction  (I)

BOM_API int BOM_exit_module ( void   ) 

BOM_API int BOM_expand_bomset_lines ( BOM_bomset_input_info_t  bomset_input_info,
BOM_bomset_output_info_t bomset_output_info 
)

This API expands a bomset. Returns a structure having expanded bomlines array for input bomset and its size. A bomset is a chunk of bomlines. Dividing a BOM structure into fixed size bomsets can help in processing them such as expansion. A bomset, by default, contains number of bomlines those can be expanded within available system memory at the point of creation.

Parameters:
bomset_input_info  (I) Structure of a bomset
bomset_output_info  (OF) Structure array of expanded bomlines for input bomset

BOM_API int BOM_export_configured_nx_assembly ( tag_t  bomLine,
const char *  namingFormat,
int  noOfValidExcludes,
const tag_t excludedTags,
char **  zipFileTicket,
char **  logFileTicket 
)

Export the UG assembly structure to Native NX after configuring using the given saved variant rule and revision rule This function exports packed (hidden) lines as well.

Parameters:
bomLine  (I) bomline to export
namingFormat  (I) naming format
noOfValidExcludes  (I) number of excluded items
excludedTags  (I) noOfValidExcludes An array of excluded item tag list
zipFileTicket  (OF) Returns zipfile fms ticket
logFileTicket  (OF) Returns logfile fms ticket

BOM_API int BOM_init_module ( void   ) 

Initializes the BOM module. This function must be called before using any other BOM module functions. This function will be called by the standard ITK startup code. The ITK programmer can ignore this function.

Note:
A second call is ignored.

BOM_API int BOM_item_ask_option_handle ( tag_t  window,
const tag_t  item,
const char *  name,
int *  option 
)

Returns the Option id for the given item and Option name.

Returns:
int teamcenter error code, ITK_ok on success.
Parameters:
window  (I) Tag of BOM Window
item  (I) Tag of Item from which options should be search
name  (I) Option name to find
option  (O) Option Handle

BOM_API int BOM_item_module_list_options ( tag_t  window,
tag_t  item,
int *  count,
int **  options 
)

Gets the list of option names on the item corresponding to the bom line.

Returns:
int teamcenter error code, ITK_ok on success.
Parameters:
window  (I) Tag of BOM Window
item  (I) Tag of Item from which options should be search
count  (O) Count of option found
options  (OF) Option Handles found

BOM_API int BOM_line_add ( tag_t  bom_line,
tag_t  item_folder,
tag_t  item_revision_folder,
tag_t  bv,
tag_t new_line 
)

Adds a new component to the specified parent line. As with setting the top line on an assembly, if the Item is specified as NULLTAG then the Item Revision is used instead. If the bom_view is specified as NULLTAG then the default view is used.

Parameters:
bom_line  (I) Tag of the line to add the component to
item_folder  (I) Item to add (can be NULLTAG)
item_revision_folder  (I) Item Revision to add (if Item is NULLTAG)
bv  (I) View to use (NULLTAG implies use default)
new_line  (O) Returned new BOM line

BOM_API int BOM_line_add_absocc_relation ( tag_t  lineTag,
tag_t  relType,
tag_t  secObject,
tag_t newRelation 
)

Add a secondary object to a bomline using absocc GRM override with a specific relation type. Note: Before adding, the bom window needs to be in absOccEdit mode and a valid context has to be set too.

Parameters:
lineTag  (I) Tag of bomline.
relType  (I) Tag of GRM.
secObject  (I) Tag of new secondary object.
newRelation  (O) Tag of new relation.

BOM_API int BOM_line_add_gde ( tag_t  bomline,
tag_t  childGDE,
char *  occType,
tag_t newLine 
)

Add new gde to given line. This function will return a gde line

Parameters:
bomline  (I)
childGDE  (I)
occType  (I)
newLine  (O)

BOM_API int BOM_line_add_optional_item ( tag_t  bom_line,
tag_t  item,
tag_t  rev,
tag_t  bomview 
)

Parameters:
bom_line  (I)
item  (I)
rev  (I)
bomview  (I)

BOM_API int BOM_line_add_predecessor ( tag_t  bom_line,
tag_t  predline 
)

This function is used to add a predecessor to the bom line.

Restrictions:

Both bom_line and predline share the same parent bvr.

Return Values:

PS_cyclic_pred_structure - This relationship creates a circular sequence.

Parameters:
bom_line  (I) Tag of the successor bom line
predline  (I) Tag of the predecessor bom line

BOM_API int BOM_line_add_substitute ( tag_t  bom_line,
tag_t  item,
tag_t  item_revision,
tag_t  bom_view,
tag_t new_line 
)

Adds a component, identified by the Item, Item Revision, or BOM View as a substitute to the BOM line. If the input BOMLine is a packed line, substitute will be added to the packed lines as well. Callers only need to provide enough information to unambiguously identify the proposed component. NULLTAG can be supplied instead of unnecessary input tags.

Parameters:
bom_line  (I) Tag of BOM line to add substitute to
item  (I) Tag of the Item to add as substitute
item_revision  (I) Tag of the Item Revision to add as substitute
bom_view  (I) Tag of the BOM View to add as substitute
new_line  (O) Tag of the new substitute BOM line

BOM_API int BOM_line_add_with_occ_type ( tag_t  bom_line,
tag_t  item_folder,
tag_t  item_revision_folder,
tag_t  bv,
char *  occType,
tag_t new_line 
)

Adds a new component to a given line. Only enough of item_folder, item_revision_folder, bv and bvr need be given to identify the component. The window's configuration rules will be applied to determine the rest. If item_revision_folder is given, then a precise occurrence will be created.

Parameters:
bom_line  (I)
item_folder  (I)
item_revision_folder  (I)
bv  (I)
occType  (I)
new_line  (O)

BOM_API int BOM_line_ask_absocc_relation ( tag_t  lineTag,
tag_t  sourceApn,
char *  relName,
logical  configuredOnly,
int *  relCount,
tag_t **  relations 
)

Ask relations associated to bomline

Parameters:
lineTag  (I) Tag of bomline.
sourceApn  (I) Tag of apn, can be NULLTAG which will try all possible apns that use relation.
relName  (I) Name of the relation.
configuredOnly  (I) Interested in configured relation only.
relCount  (O) Relation count.
relations  (OF) Array of tags of bomline relations of given type.

BOM_API int BOM_line_ask_all_child_lines ( tag_t  bom_line,
int *  count,
tag_t **  children 
)

This function returns all child lines (including GDELine) of a BOMLine

Parameters:
bom_line  (I)
count  (O)
children  (OF) count

BOM_API int BOM_line_ask_attribute_double ( tag_t  bom_line,
int  attribute,
double *  value 
)

Returns the value of some attribute of a BOM line.

Parameters:
bom_line  (I) Tag of the line being enquired about
attribute  (I)
value  (O) Returned result

BOM_API int BOM_line_ask_attribute_external ( int  attribute,
logical attribute_is_external 
)

Deprecated:
BOM attributes have been reimplimented to use IMAN Properties to make them more flexible and easier to extend. The concept of internal/external attributes is not meaningful in IMAN Properties. This function will therefore be removed completely in IMAN V4.0. In IMAN V3.4 and V3.5 it always returns 'true'.
Parameters:
attribute  (I)
attribute_is_external  (O)

BOM_API int BOM_line_ask_attribute_int ( tag_t  bom_line,
int  attribute,
int *  value 
)

Returns the value of some attribute of a BOM line.

Parameters:
bom_line  (I) Tag of the line being enquired about
attribute  (I)
value  (O) Returned result

BOM_API int BOM_line_ask_attribute_logical ( tag_t  bom_line,
int  attribute,
logical value 
)

Returns the value of some attribute of a BOM line.

Parameters:
bom_line  (I) Tag of the line being enquired about
attribute  (I)
value  (O) Returned result

BOM_API int BOM_line_ask_attribute_mode ( int  attribute,
int *  attribute_mode 
)

Returns the mode of a specified attribute. The mode is one of BOM_attribute_mode_<mode>, where <mode> is either string, string_intl, logical, int, tag or double. A string should not be subject to internationalization (i.e., it is a person's name). A string_intl should be translated before being presented to a user.

Parameters:
attribute  (I)
attribute_mode  (O) A value from the BOM_attribute_mode_t enumerated type

BOM_API int BOM_line_ask_attribute_name ( int  attribute,
char **  attribute_name 
)

Returns the name of the specified attribute.

Note:
This is a unique name that identifies the attribute. For a name that should be presented to the user see BOM_line_ask_attribute_uname.
Parameters:
attribute  (I)
attribute_name  (OF)

BOM_API int BOM_line_ask_attribute_ro ( int  attribute,
logical attribute_is_read_only 
)

Returns whether the attribute is a read-only attribute. You can never set a read-only attribute. The fact that it is not read-only does not necessarily mean you can set it on some particular BOM line: that line might contain released data that is protected against you.

Parameters:
attribute  (I)
attribute_is_read_only  (O) True if you can never set this attribute

BOM_API int BOM_line_ask_attribute_string ( tag_t  bom_line,
int  attribute,
char **  value 
)

Returns the display value of BOM line attribute.

Parameters:
bom_line  (I) Tag of the line being enquired about
attribute  (I)
value  (OF) Returned result

BOM_API int BOM_line_ask_attribute_tag ( tag_t  bom_line,
int  attribute,
tag_t value 
)

Returns the value of some attribute of a BOM line.

Parameters:
bom_line  (I) Tag of the line being enquired about
attribute  (I)
value  (O) Returned result

BOM_API int BOM_line_ask_attribute_uname ( int  attribute,
char **  attribute_user_name 
)

Returns the user-name of the specified attribute.

Note:
This is a name to be presented to the user, it is not necessarily unique. In PSE these names are used as keys for the internationalization lookup in iman_text.uil.
Parameters:
attribute  (I)
attribute_user_name  (OF)

BOM_API int BOM_line_ask_can_search_for_vi_from_parent ( tag_t  line,
logical reuseIdIsPossible 
)

Determines if it is possible to identify variant item reuse of the given BOM line using the parent search criteria. Reuse identification of variant items of a BOM line is only possible if all the options in the BOM line have been presented to the parent.

Parameters:
line  (I) The BOM line being queried
reuseIdIsPossible  (O) True if reuse identification is possible, otherwise false

BOM_API int BOM_line_ask_child_lines ( tag_t  bom_line,
int *  count,
tag_t **  children 
)

Lists the visible ImanItemLines below the specified parent line. The first time this function is called it will load the components from the database.

Note:
Use the ITK BOM_line_ask_all_child_lines to retrieve all children including GDELines.
Parameters:
bom_line  (I) Parent BOM line whose children are wanted
count  (O) Number of child lines returned
children  (OF) count Returned lines

BOM_API int BOM_line_ask_has_substitutes ( tag_t  bom_line,
logical has_substitutes 
)

This function returns 'true' for the 'preferred' line of a group of substitutes that represent an occurrence.

If the line is packed, this function will return 'true' if any one of the packed lines has substitutes. Note however that in order to access these substitutes you will first need to unpack this line.

Parameters:
bom_line  (I) Tag of the BOM line
has_substitutes  (O) True if the BOM line is a preferred substitute

BOM_API int BOM_line_ask_is_substitute ( tag_t  bom_line,
logical is_substitute 
)

Asks if the BOM line is a non-preferred substitute.

Parameters:
bom_line  (I) Tag of the BOM line
is_substitute  (O) True if the BOM line is a non-preferred substitute

BOM_API int BOM_line_ask_load_state ( tag_t  bom_line,
int *  load_state 
)

Flags a BOMLine representing a remote child item/rev, or one for which the user does not have read access. load_state = BOM_line_loaded | BOM_line_remote | BOM_line_no_read_access

Parameters:
bom_line  (I)
load_state  (O)

BOM_API int BOM_line_ask_mvl ( tag_t  line,
char **  mvl 
)

Gets the MVL from the item (revision) that is configured by this line

Parameters:
line  (I)
mvl  (OF)

BOM_API int BOM_line_ask_mvl_condition ( tag_t  line,
char **  condition 
)

Returns the condition string.

Parameters:
line  (I)
condition  (OF)

BOM_API int BOM_line_ask_optional_items ( tag_t  bom_line,
int *  count,
tag_t **  opt_items,
tag_t **  opt_views 
)

Parameters:
bom_line  (I)
count  (O)
opt_items  (OF) count
opt_views  (OF) count

BOM_API int BOM_line_ask_packed_lines ( tag_t  bom_line,
int *  count,
tag_t **  packed 
)

Lists any lines packed into this one. It is not an error to call this for a line that has no lines packed into it.

Note:
This function does not return the original line; it returns the 'invisible' lines.
Be aware that this function does not affect the packing of the lines, and that for example setting the sequence number of a packed line will not cause re-packing; it merely makes the existing packing inconsistent. There are side-effects of packing on the 'visible' line. Setting its sequence number updates all the packed lines, attempts to read some of its attributes (i.e., notes that can vary among the packed lines) will return NULL.

In general it is safer to unpack the lines before operating on them, but this can have unwanted side-effects such as updating a PSE display.

Parameters:
bom_line  (I) Tag of the line to ask pack lines of
count  (O) Number of `hidden' packed lines
packed  (OF) count Returned lines

BOM_API int BOM_line_ask_remote_object ( tag_t  bom_line,
tag_t remote_object 
)

For a line in load state BOM_line_remote this function returns the tag of the remote object (item, or for precise occurrence, item rev) represented by this line. For all other lines a NULLTAG value is given.

Parameters:
bom_line  (I)
remote_object  (O)

BOM_API int BOM_line_ask_sos ( tag_t  bom_line,
tag_t sos 
)

Ask the BOM line for it's current SOS - or selected option set. The SOS objects that are created are owned by a particular BOMLine. When the bomline becomes invalid this will invalidate all the SOS objects it owns. An SOS can be deleted earlier by calling BOM_sos_free.

Parameters:
bom_line  (I)
sos  (O)

BOM_API int BOM_line_ask_unit_occurrence_effectivity ( tag_t  bomline,
logical  intersectWithConfigurationEff,
logical occEffExists,
logical isAlwaysEffective,
int *  effyInfoCount,
WSOM_effectivity_info_t ***  effectivityInfo 
)

Returns the unit occurrence effectivity of a bomline. If intersectWithConfigurationEff is true, the unit occurrence effectivity is intersected with the effectivity on the BOMWindow and the intersected effectivity will be returned. The ouput flag occEffExists indicates if unit occurrence effectivity is defined or not.

The following will be the output configuration for special cases of infinite and zero effectivity : Infinite Effectivity Case ( i.e No Effectivity defined ): alwaysEffective = true; netEffyInfoCount = 0; Zero Effectivity Case ( Same as Line Not Configured ): alwaysEffective = false; netEffyInfoCount = 0;

Parameters:
bomline  (I) Tag of BOM line whose Unit Occurrence Effectivity is being asked for
intersectWithConfigurationEff  (I) if true the Occurrence Effectivity will be intersected with Effectivity on BOM Window Configuration
occEffExists  (O) True indicates the occurrence has effectivity defined on it
isAlwaysEffective  (O) true if the occurrence is effective for any End Item/Unit.
effyInfoCount  (O) Occurrence Effectivity Count
effectivityInfo  (OF) Occurrence Effectivity of the Given BOMLine

BOM_API int BOM_line_ask_used_arrangement ( tag_t  bomline,
tag_t arrangement 
)

Parameters:
bomline  (I)
arrangement  (O)

BOM_API int BOM_line_ask_variant_e_block ( tag_t  line,
tag_t block 
)

Returns the variant expression block associated with some BOM line. A NULLTAG block implies none set.

Parameters:
line  (I) Tag of the BOM line
block  (O) The associated variant expression block

BOM_API int BOM_line_ask_window ( tag_t  bom_line,
tag_t window 
)

Returns the BOM window that contains the specified BOM line.

Parameters:
bom_line  (I) Tag of the BOM line
window  (O) Tag of the BOM window

BOM_API int BOM_line_assign_child_line ( tag_t  line,
tag_t  sourceLine,
char *  occType,
tag_t newChildLine 
)

Assigns a child line to a BOM line, and keeps the association between the source line and the new created child line.

Parameters:
line  (I)
sourceLine  (I)
occType  (I)
newChildLine  (O)

BOM_API int BOM_line_change_to_replace ( tag_t  deletedBOMLine,
tag_t  addedBOMLine 
)

when two bom windows are side by side and when you does the bom compare, you will be knowing the added bom line and deleted bom line, select these two bom lines and then say change to replace, the occurrence thread of the added bom line is replaced with the occurrence thread of the deleted bomline

Parameters:
deletedBOMLine  (I)
addedBOMLine  (I)

BOM_API int BOM_line_clear_all_stops ( tag_t  line  ) 

Clears the stop flag on the specified BOM Line and all BOM Lines below it in the product structure. The stop flag is used to control the scope of structure traversal in a BOM compare.

Parameters:
line  (I) The root BOM line being cleared

BOM_API int BOM_line_clear_sos ( tag_t  bom_line,
logical  doUpdates 
)

Effectively applies an "empty" SOS to the bomline, so that on the next evaluation all options will be unset.

Parameters:
bom_line  (I)
doUpdates  (I)

BOM_API int BOM_line_clear_stop ( tag_t  line  ) 

This function clears the stop flag on the specified BOM Line. The stop flag is used to control the scope of structure traversal in a BOM compare.

Parameters:
line  (I) The BOM line being cleared

BOM_API int BOM_line_configure_in_vi ( tag_t  line,
tag_t  variant_item 
)

Takes the values of the stored option set contained within a variant item and uses these to populate the values of a BOM line's selected option set.

Parameters:
line  (I) The BOM line to be configured using the variant item stored option set
variant_item  (I) The variant item to be configured into the BOM line (item tag)

BOM_API int BOM_line_copy ( tag_t  new_parent,
tag_t  to_be_copied,
tag_t  view_type,
tag_t new_line 
)

Adds a copy of the BOMLine to a parent with all attached data including transform data, notes, etc. Absolute occurrence and replaces are preserved too.

Parameters:
new_parent  (I) Tag of the BOM line to be attached
to_be_copied  (I) The line to be copied
view_type  (I) The BOMView type to be used for the new child if there is none
new_line  (O) The new line

BOM_API int BOM_line_create_add_ice ( tag_t  line,
tag_t new_ice 
)

Parameters:
line  (I)
new_ice  (O)

BOM_API int BOM_line_create_remove_ice ( tag_t  line,
tag_t new_ice 
)

Parameters:
line  (I)
new_ice  (O)

BOM_API int BOM_line_create_rollup_report ( tag_t  bomline,
tag_t  rollup_template,
tag_t  folder,
const char *  name,
const char *  description,
tag_t report_dataset 
)

This method will create a new roll up report.

Returns:
ITK_ok = successful, not ITK_ok = failed
Parameters:
bomline  (I) bomline tag to be used as the root line for the report
rollup_template  (I) rollup template tag used to identify the content of the report
folder  (I)
name  (I)
description  (I)
report_dataset  (O) the dataset tag that will be versioned with revised report

BOM_API int BOM_line_create_vi ( tag_t  line,
logical  is_linked_to_generic_component,
const char *  item_id,
const char *  item_name,
const char *  type_name,
const char *  rev_id,
tag_t new_item,
tag_t new_rev 
)

Creates a variant item (VI) to store the BOM line's configuration. A VI is an item created as an instantiation of a generic component. It contains a saved selected option set (SOS) for the module that the BOM line represents. This SOS cannot be changed throughout the lifetime of the item.

Restrictions:

The BOM line must be fully configured: each option must have a value.

Parameters:
line  (I) The BOM line for which a VI will be created
is_linked_to_generic_component  (I) True if the VI structure is to be validated against the structure that it instantiates. If false, the VI structure can be altered so that it is different from that of its generic component's structure.
item_id  (I) Item identification number. No two Items can have the same identification string. A null is allowed. If null, the system will automatically generate an Item ID.
item_name  (I) Item name. A common name or short description of the Item.
type_name  (I) A null is allowed for this argument. It can be used to specify a defined Item type.
rev_id  (I) Identification string (revision ID) of the Item Revision being created. A null is allowed. If null, the system will automatically generate a revision ID
new_item  (O) Tag for identifying the Item in the current program
new_rev  (O) Tag for identifying the Item Revision in the current program

BOM_API int BOM_line_create_vi_structures ( tag_t  line,
logical  is_linked_to_generic_component,
tag_t new_item,
tag_t new_rev 
)

Parameters:
line  (I)
is_linked_to_generic_component  (I)
new_item  (O)
new_rev  (O)

BOM_API int BOM_line_cut ( tag_t  bom_line  ) 

Cuts the specified line from its parent. The parent structure must be available for the user to modify.

Parameters:
bom_line  (I) Tag of the line to cut

BOM_API int BOM_line_define_option ( tag_t  line,
const char *  text 
)

This will create or replace the modular option defined by option text - the option name will be implicit in the declaration string. String contains the option name, option values and value type.

Parameters:
line  (I)
text  (I)

BOM_API int BOM_line_delete_option ( tag_t  line,
int  option 
)

Removes the option from the module.

Parameters:
line  (I)
option  (I)

BOM_API int BOM_line_find_broken_links ( tag_t  bom_line,
logical  quick_search,
int *  count,
tag_t **  broken_links 
)

Find broken links under a BOM line

Parameters:
bom_line  (I) selected BOM line
quick_search  (I) quick search?
count  (O) number of broken links
broken_links  (OF) count the broken links found

BOM_API int BOM_line_find_candidates_with_fix_option ( int  n_broken_links,
tag_t broken_links,
int  n_scope,
tag_t scope,
int  n_properties,
char **  properties,
int  n_operators,
char **  operators,
tag_t  revision_rule,
logical  quick_search,
logical  auto_fix,
int **  n_candidates,
tag_t **  candidates 
)

Name: BOM_line_find_candidates_with_fix_option

This method will search structures for possible candidates to be used for repairing broken links.

Input: n_broken_links - number of broken links to process broken_links - broken links to process n_scope - number of structures to search in scope - structures to search in n_properties - number of properties for search criteria properties - properties for search criteria n_operators - number of operators for search criteria operators - operators for search criteria revision_rule - revision rule for configuring scope structures quick_search - logical that tells if a quick or thorough search should be conducted auto_fix - logical that indicates if broken links with only one candidate found should be fixed automatically

Output: n_candidates - number of candidates found for each broken link candidates - all candidates found for all broken links

Return: ITK_ok or some error number

Parameters:
n_broken_links  (I)
broken_links  (I) n_broken_links
n_scope  (I)
scope  (I) n_scope
n_properties  (I)
properties  (I) n_properties
n_operators  (I)
operators  (I) n_operators
revision_rule  (I)
quick_search  (I)
auto_fix  (I)
n_candidates  (OF)
candidates  (OF) candidates will equal the sum of n_candidates

BOM_API int BOM_line_find_preferred_JT_refset ( tag_t  bom_line,
tag_t  item_revision,
logical  ignore_overrides,
tag_t jtfile,
char **  refset_name,
logical jt_override 
)

Finds a preferred JT refset associated with a dataset on the given bom line. The JT_File_Priority_Refsets preference and optionally the JT_File_OverrideChildren_Refsets preference are used to determine which JT refset is preferred

Parameters:
bom_line  (I) Tag of BOM line to add substitute to
item_revision  (I) Tag of the Item Revision to add as substitute
ignore_overrides  (I) True if return should exclude assemblies that override children
jtfile  (O) Tag of the selected JT file
refset_name  (OF) Refset name of the selected JT file
jt_override  (O) True if returned JT file is an override assembly

BOM_API int BOM_line_fix_broken_links ( int  count,
const tag_t broken_links,
const tag_t candidate_lines 
)

Fix broken links

Parameters:
count  (I) number of broken links
broken_links  (I) count broken links
candidate_lines  (I) count the candidates for the broken links

BOM_API int BOM_line_force_config ( tag_t  bomline,
logical  force_parents_too,
int  override_status 
)

Parameters:
bomline  (I) BOMLine to force configure in or out
force_parents_too  (I) Set to true to force in parents too. Has no effect when forcing out, as this never effects parents.
override_status  (I) BOM_LINE_FORCE_CONFIGURE_IN or BOM_LINE_FORCE_CONFIGURE_OUT

BOM_API int BOM_line_get_child_bomlines_from_clone_stable_uid ( tag_t  bom_line,
int  countin,
char **  clone_stable_uids,
int *  count,
tag_t **  children 
)

Returns child bomline for given bomline that is the occurrence with the given clone stable uid

Parameters:
bom_line  (I) Parent BOM line whose children are wanted
countin  (I) Number of ids passed in
clone_stable_uids  (I) Clone stable id
count  (O) Number of child lines returned
children  (OF) count Returned lines

BOM_API int BOM_line_get_remote_children ( tag_t  bom_line,
int *  n_remote,
tag_t **  remote_children 
)

Lists the un-imported children, stored in a remote D-Teamcenter Engineering database, below the specified parent line.

Deprecated:
This function is deprecated, it will be removed from Teamcenter Engineering V11.0. Parent lines with remote children can now be expanded to give 'stub' lines. BOM_line_ask_remote_object should now be used to get the remote object from each such stub line. For legacy support this function continues to work for the time being by looking for any child lines of this line with load state BOM_line_remote and getting the corresponding remote objects.
Parameters:
bom_line  (I) Parent BOM line whose unloaded children are wanted
n_remote  (O) Number of child lines returned
remote_children  (OF) n_remote Returned lines

BOM_API int BOM_line_hide_substitutes ( tag_t  bom_line  ) 

Sets the preferred substitute BOM line to hide its non-preferred substitutes.

Parameters:
bom_line  (I) Tag of the BOM line

BOM_API int BOM_line_insert_level ( int  count,
tag_t bom_lines,
tag_t  item,
tag_t  view_type 
)

Insert an item as new level above selected BOM lines

Parameters:
count  (I) Number of BOM lines to which to insert a new level
bom_lines  (I) count The BOM lines above which to insert a new level
item  (I) The item to be inserted above the selected lines as new level
view_type  (I) The BOMView type to be used for the new level

BOM_API int BOM_line_is_packed ( tag_t  bom_line,
logical verdict 
)

Parameters:
bom_line  (I)
verdict  (O)

BOM_API int BOM_line_is_replaceable ( tag_t  bom_line,
logical verdict 
)

Parameters:
bom_line  (I)
verdict  (O)

BOM_API int BOM_line_is_stopped ( tag_t  line,
logical is_stopped 
)

This function returns true if the specified BOM Line has had its stop flag set. The stop flag is used to control the scope of structure traversal in a BOM compare.

Parameters:
line  (I) The BOM line being queried
is_stopped  (O) True if the specified BOM line has its stop flag set

BOM_API int BOM_line_list_attributes ( int *  count,
int **  attributes 
)

Lists all the attributes defined for BOM lines.

Parameters:
count  (O) Number of attributes
attributes  (OF) count Defined attributes

BOM_API int BOM_line_list_predecessors ( tag_t  bom_line,
int *  count,
tag_t **  pred 
)

This function returns a list of the predecessor lines of the bom line.

Parameters:
bom_line  (I) Tag of the bom line that predecessors are needed for
count  (O) Number of predecessors
pred  (OF) count MEM_alloc()ed array of the list of predecessor tags

BOM_API int BOM_line_list_related_substitutes ( tag_t  bom_line,
int *  n_items,
tag_t **  related_occs,
tag_t **  related_items 
)

Parameters:
bom_line  (I)
n_items  (O)
related_occs  (OF) n_items
related_items  (OF) n_items

BOM_API int BOM_line_list_substitutes ( tag_t  bom_line,
int *  n_substitutes,
tag_t **  substitute_lines 
)

Returns a list of substitutes for the BOM line.

Parameters:
bom_line  (I) Tag of the BOM line
n_substitutes  (O) Number of substitutes
substitute_lines  (OF) n_substitutes Array of tags for the substitute BOM lines

BOM_API int BOM_line_look_up_attribute ( const char *  attribute_name,
int *  attribute 
)

Specified the name of a BOM line attribute, this returns the attribute_id.

Parameters:
attribute_name  (I)
attribute  (O)

BOM_API int BOM_line_look_up_inherited_attr ( const char *  class_name,
const char *  attribute_name,
int *  attribute 
)

Returns the BOM line attribute which maps onto an attribute of a super class.

Parameters:
class_name  (I) Name of the super class
attribute_name  (I) Name of the super class attribute
attribute  (O) Tag of the equivalent BOM line attribute

BOM_API int BOM_line_map_vi_requirements_from_parent ( tag_t  line,
int  n,
tag_t items,
char **  options,
int *  ops,
int *  valueTypes,
char **  lowValues,
char **  highValues,
int *  n_out,
tag_t **  items_out,
char ***  options_out,
int **  ops_out,
int **  valueTypes_out,
char ***  lowValues_out,
char ***  highValues_out 
)

This method is used aid identification of component reuse within a module structure. It identifies search criteria needed to find VIs within the given BOM line from criteria defined for a VI search within the parent. Reuse identification of VIs of the BOM line is only possible if all the options in the BOM line have been presented to the parent.

Parameters:
line  (I) The BOM line (variant module) within which reuse identification is to be carried out
n  (I) Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
items  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
options  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
ops  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
valueTypes  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
lowValues  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
highValues  (I) n Search criteria used to find VIs in the parent BOM line (see ITEM_vi_find)
n_out  (O) Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
items_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
options_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
ops_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
valueTypes_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
lowValues_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.
highValues_out  (OF) n_out Search criteria that can be used to identify VIs in the BOM line passed in as argument line. If reuse identification is not possible, then an error code is returned.

BOM_API int BOM_line_modify_option ( tag_t  line,
int  option,
const char *  text 
)

Modifies an existing option

Parameters:
line  (I)
option  (I)
text  (I)

BOM_API int BOM_line_move_to ( tag_t  new_parent,
int  count,
tag_t bom_lines 
)

Cuts the pendingcut lines from its parent and move them to the new parent

Parameters:
new_parent  (I) Tag of the BOM line to be attached
count  (I) Number of BOM lines to be moved
bom_lines  (I) count The bom lines to be moved

BOM_API int BOM_line_ove_validate ( tag_t  line,
logical  recurse,
int *  count,
int **  error_types,
tag_t **  lines,
int **  options 
)

This is used to perform OVE validation on a bom line, and optionally on all structure below the line as well.

Parameters:
line  (I)
recurse  (I)
count  (O)
error_types  (OF) count
lines  (OF) count
options  (OF) count

BOM_API int BOM_line_pack ( tag_t  bom_line  ) 

Scans all sibling BOM lines in the same parent to see if any can be packed with the specified line. If they are, they are packed into this line. Subsequent calls to BOM_line_ask_child_lines on the parent only list this line; none of the ones packed into it.

It is not an error if no lines are found to pack into this one. Trying to pack the top line of a bill is not an error, but does nothing (it has no siblings).

Parameters:
bom_line  (I) Tag of the line to pack lines into

BOM_API int BOM_line_prefer_substitute ( tag_t  bom_line,
logical is_temporary 
)

Sets the non-preferred substitute BOM line to be the preferred substitute. The current preferred substitute becomes non-preferred. If the parent BOM View Revision cannot be modified, the change cannot be saved and the change is marked as temporary.

Parameters:
bom_line  (I) Tag of the BOM line
is_temporary  (O) True if the parent BVR cannot be modified

BOM_API int BOM_line_relate_substitutes ( int  num_of_lines,
tag_t bom_lines,
tag_t substitute_set 
)

Parameters:
num_of_lines  (I)
bom_lines  (I) num_of_lines
substitute_set  (O)

BOM_API int BOM_line_remove_absocc_property ( tag_t  bomLine,
char *  propertyName,
tag_t  contextBomLine 
)

Remove the absocc override of a property on a bomline that was defined by a specific bomline context.

Parameters:
bomLine  (I) Tag of bomline that has property with absocc override.
propertyName  (I) Char array of the property name that has absocc override.
contextBomLine  (I) Tag of bomline that is the context for absocc override of property, can be NULLTAG which will delete current configured property override.

BOM_API int BOM_line_remove_absocc_relation ( tag_t  lineTag,
tag_t  sourceApn,
tag_t  relation 
)

Remove absocc GRM override of a bomline by using its Appearance Path Node and GRM relation type.

Parameters:
lineTag  (I) Tag of bomline.
sourceApn  (I) Tag of apn, can be NULLTAG which will try all possible apns that use GRM.
relation  (I) Tag of GRM.

BOM_API int BOM_line_remove_incremental_changes ( tag_t  line,
int  n,
tag_t ices 
)

Removes a list of incremental changes from a bom line

Parameters:
line  (I)
n  (I)
ices  (I) n

BOM_API int BOM_line_remove_level ( int  count,
tag_t bom_lines 
)

Remove the selected lines and reparent their children to the parent of the removed lines

Parameters:
count  (I) Number of BOM lines to be removed
bom_lines  (I) count The BOM lines to be removed

BOM_API int BOM_line_remove_optional_item ( tag_t  bom_line,
tag_t  item,
tag_t  rev,
tag_t  bomview 
)

Parameters:
bom_line  (I)
item  (I)
rev  (I)
bomview  (I)

BOM_API int BOM_line_remove_predecessor ( tag_t  bom_line,
tag_t  predline 
)

This function is used to remove a predecessor from a BOM line.

Restrictions:

  1. Both bom_line and predline must share the same parent bvr.

  2. predline is already in the predecessor list of bom_line.
Parameters:
bom_line  (I) Tag of the successor bom line
predline  (I) Tag of the predecessor bom line

BOM_API int BOM_line_remove_related_substitutes ( int  n_lines,
tag_t lines 
)

Parameters:
n_lines  (I)
lines  (I) n_lines

BOM_API int BOM_line_replace ( tag_t  bom_line,
tag_t  item_folder,
tag_t  item_revision_folder,
tag_t  bv 
)

Same as add, but replaces this component instead of adding a new one. You may not change the occurrence from precise to imprecise (or vice-versa) by this routine.

The component can be specified as either an Item or an Item Revision depending on which has a non-NULLTAG value.

Parameters:
bom_line  (I) Tag of the line to replace the component in
item_folder  (I) Replacement Item (can be NULLTAG)
item_revision_folder  (I) Replacement Item Revision (if Item is NULLTAG)
bv  (I) Tag of the View for the new child line. This tag should be NULLTAG if the child line has no sub-structure. For a line with substructure, use NULLTAG to use the default bomview.

BOM_API int BOM_line_replace_absocc_relation ( tag_t  lineTag,
tag_t  sourceApn,
tag_t  relation,
tag_t  newSecondary,
tag_t newRelation 
)

Replace the secoondary object of a specified Absocc GRM override relation on a bomline.

Parameters:
lineTag  (I) Tag of bomline.
sourceApn  (I) Tag of apn, can be NULLTAG which will try all possible apns that use relation.
relation  (I) Tag of GRM.
newSecondary  (I) Tag of new secondary object.
newRelation  (O) Tag of modified relation.

BOM_API int BOM_line_replace_gde ( tag_t  gde_line,
tag_t  new_gde 
)

This function is used for replacing a GDE for a GDELine

Parameters:
gde_line  (I)
new_gde  (I)

BOM_API int BOM_line_replace_in_context ( tag_t  bom_line,
tag_t  item_rev 
)

Replace the item of the line with the given item (item revision if the original BOM is precise)

Parameters:
bom_line  (I) The line to be replace
item_rev  (I) The item revision to be used for replace

BOM_API int BOM_line_resequence ( tag_t  bom_line,
int  start_number,
int  incre_number,
logical  recursive 
)

Resequence the find numbers of the children of a line based on the predecessor relationship.

Parameters:
bom_line  (I) The parent of the BOM lines to resequence find numbers
start_number  (I) The start number of new find numbers
incre_number  (I) The incremental number of new find numbers
recursive  (I) Perform resequence on children?

BOM_API int BOM_line_revert_pending_edits ( int  bom_line_count,
tag_t bom_lines 
)

Removes any pending edits to the specified bom line(s). Restores the bomline properties (and underlying occurrence attributes) to original values. If a bomline has not yet been saved to the database and there are no unsaved modifications, then delete the unsaved occurrence. If a bomline had been marked for cut, remove that designation.

Parameters:
bom_line_count  (I) number of selected BOM Lines
bom_lines  (I) bom_line_count revert all pending edits for these lines

BOM_API int BOM_line_set_attribute_double ( tag_t  bom_line,
int  attribute,
double  value 
)

Sets the value of some attribute of a BOM line.

Parameters:
bom_line  (I)
attribute  (I)
value  (I)

BOM_API int BOM_line_set_attribute_int ( tag_t  bom_line,
int  attribute,
int  value 
)

Sets the value of some attribute of a BOM line.

Parameters:
bom_line  (I)
attribute  (I)
value  (I)

BOM_API int BOM_line_set_attribute_logical ( tag_t  bom_line,
int  attribute,
logical  value 
)

Sets the value of some attribute of a BOM line.

Parameters:
bom_line  (I)
attribute  (I)
value  (I)

BOM_API int BOM_line_set_attribute_string ( tag_t  bom_line,
int  attribute,
const char *  value 
)

Sets the value of some attribute of a BOM line.

Parameters:
bom_line  (I)
attribute  (I)
value  (I)

BOM_API int BOM_line_set_attribute_tag ( tag_t  bom_line,
int  attribute,
tag_t  value 
)

Sets the value of some attribute of a BOM line.

Parameters:
bom_line  (I)
attribute  (I)
value  (I)

BOM_API int BOM_line_set_mvl ( tag_t  line,
const char *  mvl 
)

Sets the MVL on the item (revision) that is configured by this line. Note that this will attempt to lock the item revision for modify. BOM_save_window must be called to commit this change and unlock the item rev. BOM_refresh_window will lose all changes (on all bom lines in the current window) and unlock the item rev.

Parameters:
line  (I)
mvl  (I)

BOM_API int BOM_line_set_mvl_condition ( tag_t  line,
const char *  condition 
)

Sets the MVL condition.

Parameters:
line  (I)
condition  (I)

BOM_API int BOM_line_set_precise ( tag_t  bom_line,
logical  precise 
)

Sets the specified line's BOMView Revision to be precise (precise true) or imprecise (precise false).

Parameters:
bom_line  (I) Tag of the line to set precision on
precise  (I) True if set line precise, false if imprecise

BOM_API int BOM_line_set_stop ( tag_t  line  ) 

This function sets the stop flag on the specified BOM Line. The stop flag is used to control the scope of structure traversal in a BOM compare.

Parameters:
line  (I) The BOM line being stopped

BOM_API int BOM_line_set_variant_e_block ( tag_t  line,
tag_t  block 
)

Sets the variant expression block associated with some BOM line. A NULLTAG block clears the currently set value.

Parameters:
line  (I) Tag of the BOM line
block  (I) The associated variant expression block

BOM_API int BOM_line_show_substitutes ( tag_t  bom_line  ) 

Sets the preferred substitute BOM line to display its non-preferred substitutes.

Parameters:
bom_line  (I) Tag of the BOM line

BOM_API int BOM_line_split_occurrence ( const char *  quantity,
tag_t  bom_line 
)

Split a BOM line from the selected line

Parameters:
quantity  (I) Quantity to split from the BOM line
bom_line  (I) The BOM line to be splitted

BOM_API int BOM_line_subset_child_lines_occ_notes ( tag_t  bom_line,
tag_t  occ_note_type,
int  n_note_patterns,
const char **  notes_patterns,
int *  n_child_lines,
tag_t **  children 
)

List just the subset of child lines with occurrence notes that match the given patterns (.* pattern matching).

Parameters:
bom_line  (I)
occ_note_type  (I)
n_note_patterns  (I)
notes_patterns  (I) n_note_patterns
n_child_lines  (O)
children  (OF) n_child_lines

BOM_API int BOM_line_subset_child_lines_occs ( tag_t  bom_line,
int  n_occs,
const tag_t occs,
int *  n_child_lines,
tag_t **  children 
)

List just the subset of all visible configured child lines for the given occurrence (thread) tags.

Parameters:
bom_line  (I)
n_occs  (I)
occs  (I) n_occs
n_child_lines  (O)
children  (OF) n_child_lines

BOM_API int BOM_line_unload_below ( tag_t  line  ) 

Unloads the BOMViewRevision and any loaded Variant Expressions for the specified line and any descendant BOMLines.

Parameters:
line  (I) Tag of the line to unload below

BOM_API int BOM_line_unpack ( tag_t  bom_line  ) 

Unpacks any lines packed into this line. It is not an error to call this for a line that has no lines packed into it.

Parameters:
bom_line  (I) Tag of the line to unpack lines from

BOM_API int BOM_list_option_rev_values ( tag_t  option_rev,
int *  n_values,
int **  indexes 
)

Returns the allowed index values for this option revision (if option values get deleted then their index values do not get reused so the list of index values is the list of current ones).

Parameters:
option_rev  (I) Tag of the option revision
n_values  (O) Number of allowed values
indexes  (OF) n_values List of allowed values

BOM_API int BOM_modified_bvr ( tag_t  line  ) 

Marks the BOM View Revision related to the BOM line as modified. This allows changes to client data on occurrences to be saved by BOM_save_window.

Parameters:
line  (I) Tag of the BOM line to mark as modified

BOM_API int BOM_module_ask_option_handle ( tag_t  window,
const char *  module_id,
const char *  name,
int *  option 
)

Deprecated:
BOM module ask option handle has been reimplimented to use item tag instead of item id to process unique item. This function will be completely removed in TC12.0.
Parameters:
window  (I)
module_id  (I)
name  (I)
option  (O)

BOM_API int BOM_module_ask_option_text ( int  option,
char **  text 
)

Gets the MVL declaration of the option

Parameters:
option  (I)
text  (OF)

BOM_API int BOM_module_list_options ( tag_t  window,
const char *  module_id,
int *  count,
int **  options 
)

Gets the list of option names on the module corresponding to the bom line.

Deprecated:
BOM module list options has been reimplimented to use item tag instead of item id to process unique item. This function will be completely removed in TC12.0.
Parameters:
window  (I)
module_id  (I)
count  (O)
options  (OF) count

BOM_API int BOM_new_option ( tag_t  itemrev,
const char *  optname,
const char *  optdesc,
int  mode,
tag_t option,
tag_t optionrev,
tag_t ve,
tag_t veb 
)

Creates a new classic (legacy) option with an initial empty revision, and declares the new option against the given Item Revision. After creation of options, save the newly created option and save the Item Revision by AOM_save.

Restrictions:

At present, options are only implemented for enumerated values; in the future the mode argument might allow for integer option values.

Parameters:
itemrev  (I) The Item Revision to declare the new option against. The option will actually be created against the owning Item.
optname  (I) Name for the new option
optdesc  (I) Description for the new option (may be null)
mode  (I) The mode of the option, currently it may only be BOM_option_mode_enum
option  (O) Tag of the newly created option
optionrev  (O) Tag of the initially created option revision
ve  (O) Tag of the option declaration Variant Expression
veb  (O) Tag of the Item Revision's Variant Expression Block which the option declaration is contained in

BOM_API int BOM_new_variant_e_block ( tag_t block  ) 

Returns a newly-created variant expression block. To delete it call AOM_delete, which will call itself recursively on any expressions in this block that are not referenced elsewhere.

Parameters:
block  (O) Tag of the created block

BOM_API int BOM_new_variant_expression ( tag_t  v1,
int  opcode,
tag_t  v2,
const char *  str,
tag_t expr 
)

Creates a new variant expression. This can be deleted by a call to AOM_delete. If this is the last reference to v1 or v2, then AOM_delete will call itself on v1 and v2 as well.

Parameters:
v1  (I) The left hand operand
opcode  (I) An operator from the BOM_variant_operator_xxx values defined in bom_tokens.h
v2  (I) The right hand operand
str  (I) A string alternative to v2
expr  (O) Tag of the newly-created expression

BOM_API int BOM_ok_to_modify_obj_in_ic ( tag_t  window_tag,
tag_t  object_tag,
logical modifiable 
)

Returns whether an object is modifiable in IC context or not

Note:
The AM rule 'In IC context' gets applied during operations which are tracked by IC. This method assumes that an operation being tracked by IC is being performed and returns the value accordingly.
Parameters:
window_tag  (I) BOMWindow where IC context is set
object_tag  (I) object tag whose access is to be checked
modifiable  (O) output - true means object is modifiable

BOM_API int BOM_option_ask_allowed_ints ( int  option,
int *  count,
int **  mins,
int **  maxs,
int **  range_types,
int *  default_value 
)

This asks what integer values are allowed on an option. As an option may consist of multiple discontinuous ranges each value is given as a min and max and a range_type. Range type can be as follows:

Range TypeMin containsMax containsMeans
Fixed The value N/A A single fixed value
Min Min value N/A Allow values are >min
Max N/A Max value Allow values are <max
Range Min value Max value min < value < max
Open N/A N/A Any valid integer

Parameters:
option  (I)
count  (O)
mins  (OF) count
maxs  (OF) count
range_types  (OF) count
default_value  (O)

BOM_API int BOM_option_ask_allowed_reals ( int  option,
int *  count,
double **  mins,
double **  maxs,
int **  range_types,
double *  default_value 
)

This asks what real values are allowed on an option. As an option may consist of multiple discontinuous ranges each value is given as a min and max and a range_type.

Parameters:
option  (I)
count  (O)
mins  (OF) count
maxs  (OF) count
range_types  (OF) count
default_value  (O)

BOM_API int BOM_option_ask_allowed_strings ( int  option,
int *  count,
char ***  values,
char **  default_value 
)

This asks what string values are allowed on

Parameters:
option  (I)
count  (O)
values  (OF) count
default_value  (OF)

BOM_API int BOM_option_ask_logical_default ( int  option,
logical default_value 
)

Parameters:
option  (I)
default_value  (O)

BOM_API int BOM_option_describe ( int  option,
char **  item,
char **  option_name,
char **  desc,
int *  visibility,
int *  option_type,
int *  value_type,
int *  based_on,
logical has_default 
)

Deprecated:
BOM opton describe has been reimplimented to use item tag instead of item id to process unique item. This function will be completely removed in TC12.0.
Parameters:
option  (I)
item  (OF)
option_name  (OF)
desc  (OF)
visibility  (O)
option_type  (O)
value_type  (O)
based_on  (O)
has_default  (O)

BOM_API int BOM_option_describe2 ( int  option,
tag_t item,
char **  option_name,
char **  desc,
int *  visibility,
int *  option_type,
int *  value_type,
int *  based_on,
logical has_default 
)

Returns the details for an Option defined on item.

Returns:
int teamcenter error code, ITK_ok on success.
Parameters:
option  (I) Option handle
item  (O) Tag of Item where option is defined
option_name  (OF) Option Name
desc  (OF) Option Description
visibility  (O) Option scope (Public, Private)
option_type  (O) Option Type
value_type  (O) Option Value type (String, Logical, Integer, Real)
based_on  (O) Option Handle if option is presented or external
has_default  (O) If Option has default value defined

BOM_API int BOM_option_where_declared ( const char *  item,
const char *  option,
int *  count,
tag_t **  item_revs 
)

Deprecated:
BOM Option where decalred has been reimplimented to use item tag instead of item id to process unique item. This function will be completely removed in TC12.0.
Parameters:
item  (I)
option  (I)
count  (O)
item_revs  (OF) count

BOM_API int BOM_option_where_declared2 ( const tag_t  item,
const char *  option,
int *  count,
tag_t **  item_revs 
)

For the given Item returns the item revision on which Option is declared.

Returns:
int teamcenter error code, ITK_ok on success.
Parameters:
item  (I) Tag of Item
option  (I) Option Name to find
count  (O) Count of matches
item_revs  (OF) Tags of found Item Revisions

BOM_API int BOM_option_where_used ( const char *  item,
const char *  option,
int *  count,
tag_t **  objs 
)

Deprecated:
BOM option where used has been reimplimented to use item tag instead of item id to process unique item. This function will be completely removed in TC12.0.
Parameters:
item  (I)
option  (I)
count  (O)
objs  (OF) count

BOM_API int BOM_option_where_used2 ( const tag_t  item,
const char *  option,
int *  count,
tag_t **  objs 
)

For the given Item returns the item revision on which Option is Used.

Returns:
int teamcenter error code, ITK_ok on success.
Parameters:
item  (I) Tag of Item
option  (I) Option Name to find
count  (O) Count of matches
objs  (OF) Tags of found objects

BOM_API int BOM_publish_data ( tag_t  source_line,
int  target_count,
const tag_t target_lines,
const int  data_flags,
const char *  publishLinkName,
const char *  publishLinkTypeName,
tag_t publishLink 
)

Publish will copy data from source BOMLine to the target BOMLines based on the data flags

Note:
data_flags - each bit in this denotes what data to be published Currently transform, shape, both transform and shape can be published. the flags values are: Transform (0x1), Shape (0x2).

If absolute occurrence of any targetLines is found being referred as target in an existing PublishLink with a different source, an error is thrown.

If a PublishLink exists for source line, the link is uppdated with absolute occurrences of targetLines

If a PublishLink exists for source line, publishLinkName and publishLinkTypeName are optional

If a PublishLink doesnt exist between absolute occurrence of source and targets it will be created.

Parameters:
source_line  (I) source tag of BOM line
target_count  (I) no of of target tags
target_lines  (I) target_count
data_flags  (I) data flags to denote publish data type
publishLinkName  (I) publish link name
publishLinkTypeName  (I) publish link type
publishLink  (O) Tag of PublishLink

BOM_API int BOM_publishlink_add_targets ( tag_t  source_line,
int  target_count,
const tag_t target_lines,
tag_t publishLink 
)

Add targets to given source's PublishLink.

Note:
If a PublishLink for a source doesnt exist, error is thrown

If a target already has a PublishLink with another source, error is thrown

Parameters:
source_line  (I) source tag of BOM line
target_count  (I) no of of target tags
target_lines  (I) target_count
publishLink  (O) Tag of PublishLink updated

BOM_API int BOM_publishlink_ask_source_context_bv ( tag_t  target_line,
tag_t source_bom_view 
)

From the input line, assumed to be a target of a PublishLink, BOMView of source of PublishLink is returned

Parameters:
target_line  (I) Tag of target BOMLine
source_bom_view  (O) Tag of source BOMView

BOM_API int BOM_publishlink_delete_target ( tag_t  target_line,
tag_t publishLink 
)

Deletes target from given source's PublishLink.

Note:
If the target being removed is the last one for PublishLink, then link is also deleted
Parameters:
target_line  (I) Tag of target BOM line
publishLink  (O) Tag of PublishLink created

BOM_API int BOM_publishlink_delete_targets ( tag_t  source_line,
int  target_count,
const tag_t target_lines,
tag_t publishLink 
)

Deletes targets from given source's PublishLink.

Note:
If the target being removed is the last one for PublishLink, then link is also deleted
Parameters:
source_line  (I) source tag of BOM line
target_count  (I) no of of target tags
target_lines  (I) target_count
publishLink  (O) Tag of PublishLink updated

BOM_API int BOM_publishlink_find_source_in_window ( tag_t  target_line,
tag_t  source_bom_window,
tag_t source_line 
)

Find source bom line for a given target's PublishLink in given bom window.

Parameters:
target_line  (I) Tag of target BOM line
source_bom_window  (I) Tag of source BOM Window
source_line  (O) Tags of source BOM line

BOM_API int BOM_publishlink_find_targets_in_window ( tag_t  source_line,
tag_t  target_bom_window,
int *  targets_count,
tag_t **  target_lines 
)

Find targets of a given source's PublishLink in given bom window.

Parameters:
source_line  (I) source tag of BOM line
target_bom_window  (I) target bom window
targets_count  (O) no of of target tags
target_lines  (OF) targets_count

BOM_API int BOM_refresh_window ( tag_t  window  ) 

Refresh the BOM window from the database.

Parameters:
window  (I) Tag of the window

BOM_API int BOM_remove_option_rev_value ( tag_t  option_rev,
int  an_index 
)

Deletes an allowed value from the option revision.

Parameters:
option_rev  (I) Tag of the option revision
an_index  (I) Index for the value to delete

BOM_API int BOM_revise_option ( tag_t  revision_in,
tag_t new_revision 
)

Copies an option revision to a new revision.

Restrictions:

New revisions always belong to the original option.

Parameters:
revision_in  (I) Tag of the base revision
new_revision  (O) New option revision

BOM_API int BOM_save_window ( tag_t  window  ) 

Saves any changes made to BOM lines in the window.

Note:
Any changes to the structure of the Bill in the window do not get saved to the database until this function is called.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_set_option_data ( tag_t  option,
const char *  name,
const char *  description 
)

Changes the name and description of an option.

Restrictions:

There is no way to move an option to a different item.

Parameters:
option  (I) Tag of the option
name  (I) New option name
description  (I) New option description

BOM_API int BOM_set_option_rev_value ( tag_t  option_rev,
int  an_index,
const char *  value 
)

Replaces the current text value for the specified index by a new string.

Parameters:
option_rev  (I) Tag of the option revision
an_index  (I) Index value
value  (I) New text equivalent

BOM_API int BOM_set_pack_compare ( void *  function  ) 

This function takes a logical function (tag_t line_1, tag_t line_2) argument. The function should return true if the two lines may be packed. Registers a function that compares two BOM lines to see if they can be packed for display purposes. By default, BOM lines will be packed if they contain the same Item Revision and the same sequence number. The function will never be called when two BOM lines represent different Item Revisions, thus BOM lines representing different Item Revisions can not be packed together.

The function that is registered must be a logical (tag_t bom_line1, tag_t bom_line2) function that returns true if the two lines can be packed, and false otherwise.

Note:
The function registered by BOM_set_pack_compare is called differently from Version 7.0.2. Previously, two BOM lines that showed different Item Revisions could be packed together by the registered function returning true when called with them. Now, as a significant performance improvement for some cases, the function will never be called for two BOM lines representing the same Item Revision, and hence those lines can not be made to pack together.
Parameters:
function  (I) Function to compare two BOM lines

BOM_API int BOM_set_variant_config_bomsos ( tag_t  bom_variant_config,
tag_t  bom_line,
tag_t  bom_sos,
int  mode 
)

Parameters:
bom_variant_config  (I)
bom_line  (I)
bom_sos  (I)
mode  (I)

BOM_API int BOM_set_variant_config_bomvrule ( tag_t  bom_variant_config,
tag_t  bom_vrule,
int  mode 
)

Parameters:
bom_variant_config  (I)
bom_vrule  (I)
mode  (I)

BOM_API int BOM_set_variant_e_block ( tag_t  block,
int  n,
const tag_t exprs 
)

Overwrites a variant expression block with new data.

Parameters:
block  (I) Tag of the expression block
n  (I) The number of expressions
exprs  (I) n An array of variant expressions to store

BOM_API int BOM_set_variant_expression ( tag_t  expr,
tag_t  v1,
int  opcode,
tag_t  v2,
const char *  str 
)

Overwrites a variant expression with new data.

Parameters:
expr  (I) Tag of the expression
v1  (I) The left hand operand
opcode  (I) An operator from the BOM_variant_operator_xxx values defined in bom_tokens.h
v2  (I) The right hand operand
str  (I) A string alternative to v2

BOM_API int BOM_set_window_active_arrangement ( tag_t  bom_window,
tag_t  arrangement 
)

Parameters:
bom_window  (I)
arrangement  (I)

BOM_API int BOM_set_window_config_context ( tag_t  window,
tag_t  config_context 
)

Sets the config context to this window: it will set RevisionRule and Saved VRule to the window

Parameters:
window  (I)
config_context  (I)

BOM_API int BOM_set_window_config_rule ( tag_t  window,
tag_t  config_rule 
)

Sets the Revision (configuration) Rule for the window.

By default, the window will have been created with the user's default Revision Rule. This function should be used to apply a different Revision Rule to the window. All Items in the BOM will automatically be reconfigured using the new Rule.

Parameters:
window  (I) Window for which Revision Rule is to be set
config_rule  (I) Revision Rule to apply to window

BOM_API int BOM_set_window_ignore_arrangements ( tag_t  bom_window,
logical  ignore 
)

Parameters:
bom_window  (I)
ignore  (I)

BOM_API int BOM_set_window_ignore_ove_errors_on_expand ( tag_t  bom_window,
logical  ignore 
)

Parameters:
bom_window  (I)
ignore  (I)

BOM_API int BOM_set_window_ove_message_error_level ( tag_t  bom_window,
int  level 
)

Parameters:
bom_window  (I)
level  (I)

BOM_API int BOM_set_window_pack_all ( tag_t  window,
logical  pack_all 
)

Sets a flag to say whether BOM lines are packed by default. By default all BOM lines are reported. If this function is called to set the default packing true, then packable lines will be reported as one BOM line.

Individual lines can be packed or unpacked by calling BOM_line_pack or BOM_line_unpack, respectively.

Parameters:
window  (I) Window to have its default packing set
pack_all  (I)

BOM_API int BOM_set_window_sort_compare_fn ( tag_t  window,
void *  function,
void *  client_data 
)

Registers a function to define the sort order for lines in this window. When BOM_line_ask_child_lines returns the list of components of some assembly, the list will be sorted according to this sort function. By default the compare function compares sequence numbers. If they are the same then it compares the component item names.

The supplied function must be of type int function (tag_t line1, tag_t line2, void*client_data). It should return -1, 0, +1 according to whether line1 and line 2 should be in that order; are equivalent; or should be reversed in order. client_data is an arbitrary pointer value supplied by the caller to this function and passed through to the sort function.

Parameters:
window  (I) Window to have its compare function set
function  (I) Compare function to be registered
client_data  (I) Pointer value to be passed through to the compare function, typically as a flag for ascending/descending sort, or an attribute to sort on.

BOM_API int BOM_set_window_top_line ( tag_t  window,
tag_t  item,
tag_t  item_revision,
tag_t  bv,
tag_t top_bom_line 
)

Sets the top line of the BOM window to contain the specified Item. If Item is NULLTAG, then it will use item_revision instead. If bom_view is NULLTAG, then it will take the default. Any existing BOM in this window is lost.

Parameters:
window  (I) Window to set BOM on
item  (I) Item for top line of Bill (can be NULLTAG)
item_revision  (I) Item revision for top line of Bill (if item is NULLTAG)
bv  (I) View to use (NULLTAG implies use default)
top_bom_line  (O) Returned top BOM line set on window

BOM_API int BOM_set_window_top_line_bvr ( tag_t  window,
tag_t  bvr,
tag_t top_bom_line 
)

Set a top line from a BVR. This will not work with shared BVRs (pre-v3.3 concept!): returns PS_shared_bvr

Parameters:
window  (I)
bvr  (I)
top_bom_line  (O)

BOM_API int BOM_set_window_top_line_using_occgrp ( tag_t  window,
tag_t  occGrp,
tag_t top_bom_line 
)

Sets the top line of the BOM window to contain the specified occurrence group which provide its root item and bv as input for loading the bom. Any existing BOM in this window is lost.

Parameters:
window  (I) Window to set BOM on
occGrp  (I) occurrence group tag
top_bom_line  (O) Returned top BOM line set on window

BOM_API int BOM_set_window_top_line_using_proxy ( tag_t  window,
tag_t  proxy,
tag_t top_bom_line 
)

Sets the top line of the BOM window to contain a proxy object representing a part or part use from Teamcenter BOM database. Any existing BOM in this window is lost.

Parameters:
window  (I) Window to set BOM on
proxy  (I) Teamcenter BOM proxy object
top_bom_line  (O) Returned top BOM line set on window

BOM_API int BOM_sos_apply ( tag_t  sos,
logical  doUpdates 
)

This applies the SOS to its associated BOMLine. The structure will be evaluated and any changes will be reflected in this SOS. This also makes this SOS the current one for the bom line. (i.e. calling BOM_line_ask_sos will return the same SOS object). The do updates means that the window will be updated with changes (and the UI). Otherwise an evaluation occurs, but the results are not kept.

Parameters:
sos  (I)
doUpdates  (I)

BOM_API int BOM_sos_apply_list ( int  count,
tag_t sos,
logical  doUpdates 
)

This applies the SOS to its associated BOMLine. The structure will be evaluated and any changes will be reflected in this SOS. This also makes this SOS the current one for the bom line. (i.e. calling BOM_line_ask_sos will return the same SOS object)

Parameters:
count  (I)
sos  (I) count
doUpdates  (I)

BOM_API int BOM_sos_ask_entries ( tag_t  sos,
int *  count,
int **  options,
char ***  paths 
)

Asks the current options that are in the SOS. The return is 4 lists. The item and option name define a unique option, and the type is an enum describing each option' type

  • string/real/integer/logical. The how_set list describes how the option is set (unset/default/user set/etc.)
Parameters:
sos  (I)
count  (O)
options  (OF) count
paths  (OF) count

BOM_API int BOM_sos_ask_entry_display ( tag_t  sos,
int  option,
const char *  path,
char **  value,
int *  how_set 
)

This gets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (OF)
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_ask_entry_double ( tag_t  sos,
int  option,
const char *  path,
double *  value,
int *  how_set 
)

This gets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (O)
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_ask_entry_int ( tag_t  sos,
int  option,
const char *  path,
int *  value,
int *  how_set 
)

This gets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (O)
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_ask_entry_logical ( tag_t  sos,
int  option,
const char *  path,
logical value,
int *  how_set 
)

This gets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (O)
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_db_contents ( tag_t  db_sos,
int *  count,
tag_t **  items,
char ***  options,
int **  optionTypes,
int **  valueTypes,
int **  howSet,
char ***  values 
)

Parameters:
db_sos  (I)
count  (O)
items  (OF) count
options  (OF) count
optionTypes  (OF) count
valueTypes  (OF) count
howSet  (OF) count An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h
values  (OF) count

BOM_API int BOM_sos_db_create ( const char *  db_sos_name,
tag_t  config,
tag_t db_sos 
)

Parameters:
db_sos_name  (I)
config  (I)
db_sos  (O)

BOM_API int BOM_sos_db_create_partial ( const char *  db_sos_name,
tag_t  config,
int  count,
tag_t items,
char **  options,
logical isModular,
tag_t db_sos 
)

Parameters:
db_sos_name  (I)
config  (I)
count  (I)
items  (I) count
options  (I) count
isModular  (I) count
db_sos  (O)

BOM_API int BOM_sos_db_option_query ( int  n,
tag_t items,
char **  options,
int *  n_matches,
tag_t **  matches 
)

Parameters:
n  (I)
items  (I) n
options  (I) n
n_matches  (O)
matches  (OF) n_matches

BOM_API int BOM_sos_db_query ( int  n,
tag_t items,
char **  options,
int *  ops,
int *  valueTypes,
char **  lowValues,
char **  highValues,
int *  n_matches,
tag_t **  matches 
)

Parameters:
n  (I)
items  (I) n
options  (I) n
ops  (I) n
valueTypes  (I) n
lowValues  (I) n
highValues  (I) n
n_matches  (O)
matches  (OF) n_matches

BOM_API int BOM_sos_db_read ( tag_t  db_sos,
tag_t  config 
)

Parameters:
db_sos  (I)
config  (I)

BOM_API int BOM_sos_db_set ( tag_t  db_sos,
tag_t  config 
)

Parameters:
db_sos  (I)
config  (I)

BOM_API int BOM_sos_db_set_partial ( tag_t  db_sos,
tag_t  config,
int  count,
tag_t items,
char **  options,
logical isModular 
)

Parameters:
db_sos  (I)
config  (I)
count  (I)
items  (I) count
options  (I) count
isModular  (I) count

BOM_API int BOM_sos_free ( tag_t  sos  ) 

Frees the memory associated with the current SOS. The tag will be made invalid.

Parameters:
sos  (I)

BOM_API int BOM_sos_set_entry_double ( tag_t  sos,
int  option,
const char *  path,
double  value,
int  how_set 
)

This sets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (I)
how_set  (I) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_set_entry_int ( tag_t  sos,
int  option,
const char *  path,
int  value,
int  how_set 
)

This sets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (I)
how_set  (I) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_set_entry_logical ( tag_t  sos,
int  option,
const char *  path,
logical  value,
int  how_set 
)

This sets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (I)
how_set  (I) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_set_entry_string ( tag_t  sos,
int  option,
const char *  path,
const char *  value,
int  how_set 
)

This sets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)
value  (I)
how_set  (I) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h

BOM_API int BOM_sos_unset_entry ( tag_t  sos,
int  option,
const char *  path 
)

This unsets the value that the option is set to in the SOS.

Parameters:
sos  (I)
option  (I)
path  (I)

BOM_API int BOM_start_forced_config ( tag_t transaction  ) 

Parameters:
transaction  (O)

BOM_API int BOM_update_for_variants_on_bomline ( tag_t  bomline  ) 

Informs all BOM windows in the current Teamcenter Engineering session that the variant data on the given BOMLine's Occurrence has been updated. This action is automatically performed if BOM_line_set_variant_e_block or PS_set_variant_data is called. However, if you have altered an existing BOMLine Occurrence's Variant Expression Block or one of its component Variant Expressions then you will need to call this function.

Parameters:
bomline  (I) The BOM line which owns the variant data which has been updated

BOM_API int BOM_update_for_variants_on_itemrev ( tag_t  item_rev  ) 

Informs all BOM windows in the current Teamcenter Engineering session that the variant data on the given Item Revision has been updated. This action is automatically performed if ITEM_set_rev_variants is called. However, if you have altered an existing Item Revision Variant Expression Block, or one of its component Variant Expressions then you will need to call this function.

Parameters:
item_rev  (I) The Item Revision which owns the variant data which has been updated

BOM_API int BOM_update_for_variants_on_occ ( tag_t  parent_bvr,
tag_t  occurrence 
)

Informs all BOM windows in the current Teamcenter Engineering session that the variant data on the given occurrence has been updated. This action is automatically performed if BOM_line_set_variant_e_block or PS_set_variant_data is called. However, if you have altered an existing Occurrence Variant Expression Block or one of its component Variant Expressions then you will need to call this function.

Parameters:
parent_bvr  (I) The Occurrence's parent BOM View Revision
occurrence  (I) The Occurrence

BOM_API int BOM_update_pse ( tag_t  bvr  ) 

Informs the BOM module that a specified BOMView Revision has been modified by calls outside the BOM module. In an interactive session the effect will be to update any PSE display showing that BOMView Revision to show the new structure.

Note:
In ITK programming it will make later BOM_line_ask_child_lines calls in that session return the new structure.
Calling this function for an unmodified BOMView Revision or for one that is not currently in use in any BOM window is harmless.
Parameters:
bvr  (I) Tag of a modified BOMView Revision

BOM_API int BOM_variant_clause_append ( tag_t  clause_list,
int  join,
tag_t  option,
int  op,
const char *  value 
)

Appends a new clause onto the end of a clause list.

Parameters:
clause_list  (I) The clause list to append to
join  (I) How this clause is related to its predecessor. Must be either BOM_variant_operator_and or BOM_variant_operator_or.
option  (I) The option to compare
op  (I) The comparison operator. Must be one of BOM_variant_operator_is_equal, BOM_variant_operator_not_equal, BOM_variant_operator_lt, BOM_variant_operator_gt, BOM_variant_operator_lt_eq, or BOM_variant_operator_gt_eq.
value  (I) The value to compare the option against. This is passed in as the option value's text representation rather than the enum value to allow a UIF to simply pass in a user typed value.

BOM_API int BOM_variant_clause_delete ( tag_t  clause_list,
int  n_clauses,
int  pos[] 
)

Deletes a set of clauses from a clause list.

Parameters:
clause_list  (I) The clause list to delete the clauses from
n_clauses  (I) The number of clauses to be deleted
pos  (I) n_clauses Array containing the positions of the clauses to be deleted. Position 0 is the first clause in the list.

BOM_API int BOM_variant_clause_details ( tag_t  clause_list,
int  pos,
int *  join,
tag_t option,
int *  op,
char **  value 
)

Returns details of a clause in a clause list.

Parameters:
clause_list  (I) The clause list which contains the clause to be queried
pos  (I) The position of the clause to be queried. Position 0 is the first clause in the list.
join  (O) How this clause is related to its predecessor. Will be either BOM_variant_operator_and or BOM_variant_operator_or.
option  (O) The option being compared
op  (O) The comparison operator. Will be one of BOM_variant_operator_is_equal, BOM_variant_operator_not_equal, BOM_variant_operator_lt, BOM_variant_operator_gt, BOM_variant_operator_lt_eq, or BOM_variant_operator_gt_eq.
value  (OF) The value that the option is being compared against. This is returned as the option value's text representation rather than the enum value.

BOM_API int BOM_variant_clause_insert ( tag_t  clause_list,
int  pos,
int  join,
tag_t  option,
int  op,
const char *  value 
)

Inserts a new clause into a clause list.

Parameters:
clause_list  (I) The clause list to insert into
pos  (I) The position to insert at. Position 0 is the top of the list.
join  (I) How this clause is related to its predecessor. Must be either BOM_variant_operator_and or BOM_variant_operator_or.
option  (I) The option to compare
op  (I) The comparison operator. Must be one of BOM_variant_operator_is_equal, BOM_variant_operator_not_equal, BOM_variant_operator_lt, BOM_variant_operator_gt, BOM_variant_operator_lt_eq, or BOM_variant_operator_gt_eq.
value  (I) The value to compare the option against. This is passed in as the option value's text representation rather than the enum value to allow a UIF to simply pass in a user typed value.

BOM_API int BOM_variant_clause_list_size ( tag_t  clause_list,
int *  n_clauses 
)

Returns the number of clauses in a clause list.

Parameters:
clause_list  (I) The clause list to queried the size of
n_clauses  (O) The number of clauses in the list

BOM_API int BOM_variant_clause_list_text ( tag_t  clause_list,
int *  n_clauses,
char ***  text 
)

Returns the clause list in indented text format.

Parameters:
clause_list  (I) The clause list to convert to text
n_clauses  (O) The number of clauses in the list. Each clause is returned a separate text string.
text  (OF) n_clauses Array of text strings. One string for each clause.

BOM_API int BOM_variant_clause_move_down ( tag_t  clause_list,
int  n_clauses,
int  pos[] 
)

Moves a set of clauses one place down a clause list.

Restrictions:

If the system is unable to move one (or more) of the clauses, then none of the clauses will be moved.

Parameters:
clause_list  (I) The clause list to move the clauses within
n_clauses  (I) The number of clauses to be moved
pos  (I) n_clauses Array containing the current positions of the clauses to be moved. Position 0 is the first clause in the list.

BOM_API int BOM_variant_clause_move_up ( tag_t  clause_list,
int  n_clauses,
int  pos[] 
)

Moves a set of clauses one place up a clause list.

Restrictions:

If the system is unable to move one (or more) of the clauses, then none of the clauses will be moved.

Parameters:
clause_list  (I) The clause list to move the clauses within
n_clauses  (I) The number of clauses to be moved
pos  (I) n_clauses Array containing the current positions of the clauses to be moved. Position 0 is the first clause in the list.

BOM_API int BOM_variant_clause_replace ( tag_t  clause_list,
int  pos,
int  join,
tag_t  option,
int  op,
const char *  value 
)

Replaces an existing clause in a clause list with a new clause.

Parameters:
clause_list  (I) The clause list
pos  (I) The position of the clause being replaced. Position 0 is the first clause in the list.
join  (I) How the new clause is related to its predecessor. Must be either BOM_variant_operator_and or BOM_variant_operator_or.
option  (I) The new option to compare
op  (I) The new comparison operator. Must be one of BOM_variant_operator_is_equal, BOM_variant_operator_not_equal, BOM_variant_operator_lt, BOM_variant_operator_gt, BOM_variant_operator_lt_eq, or BOM_variant_operator_gt_eq.
value  (I) The new value to compare the option against. This is passed in as the option value's text representation rather than the enum value to allow a UIF to simply pass in a user typed value.

BOM_API int BOM_variant_clause_text ( tag_t  clause_list,
int  pos,
char **  text 
)

Returns a single clause in indented text format.

Parameters:
clause_list  (I) The clause list which contains the clause to be queried
pos  (I) The position of the clause to be queried. Position 0 is the first clause in the list.
text  (OF) The formatted text string for the clause

BOM_API int BOM_variant_clause_toggle_brackets ( tag_t  clause_list,
int  n_clauses,
int  pos[] 
)

Toggles a pair of brackets around a given set of clauses in a clause list (i.e., if a matching pair of brackets already exists around the selected clauses, the brackets will be removed. Otherwise, a new set of brackets will be inserted).

Parameters:
clause_list  (I) The clause list to apply the brackets operation to
n_clauses  (I) The number of clauses selected
pos  (I) n_clauses Array containing the positions of the clauses selected. Position 0 is the first clause in the list.

BOM_API int BOM_variant_clause_valid_ops ( tag_t  clause_list,
int  n_clauses,
int  pos[],
int *  op_flags 
)

Returns a bit encoded representation of the valid operations for a given set of clauses. Macros are supplied for extracting individual operations from the returned value. See the BOM_variant_clause_op_* entries in this section.

Parameters:
clause_list  (I) The clause list to validate operations against
n_clauses  (I) The number of clauses selected
pos  (I) n_clauses Array containing the positions of the clauses selected. Position 0 is the first clause in the list.
op_flags  (O)

BOM_API int BOM_variant_clause_validate_ops ( tag_t  clause_list,
logical  auto_validate 
)

Controls whether or not the system will automatically validate each operation that an ITK programmer attempts on a clause list. This value defaults to true for new clause lists. If this is set to false, then an ITK programmer should call BOM_variant_clause_valid_ops to ensure that the call that they are about to make is legal. This feature is useful for user interface programmers where a dialog may call BOM_variant_clause_valid_ops whenever the user selection changes in order to grey out inappropriate action buttons. This means that a user could never invoke an illegal operation, so a small performance gain can be made by disabling unnecessary checking.

Be aware that switching off automatic validation without using BOM_variant_clause_valid_ops is dangerous and could lead to unpredictable results.

Parameters:
clause_list  (I) The clause list that this new validation will refer to
auto_validate  (I) Set this to false to prevent the system from checking the validity of each operation automatically

BOM_API int BOM_variant_condition_to_clause_list ( tag_t  bom_window,
tag_t  condition_ve,
tag_t clause_list 
)

Creates a new clause list populated by the specified variant condition. This is used to edit an existing variant condition. A suitable variant condition can be obtained using BOM_variant_expr_split_load_if, BOM_variant_expr_split_error_if, or BOM_variant_expr_split_set_if.

Parameters:
bom_window  (I) The BOM window which will provide the context for the edit operation
condition_ve  (I) The condition variant expression to be loaded into the new clause list
clause_list  (O) The new clause list

BOM_API int BOM_variant_config_apply ( tag_t  bom_variant_config  ) 

Parameters:
bom_variant_config  (I)

BOM_API int BOM_variant_config_clear ( tag_t  bom_variant_config  ) 

Parameters:
bom_variant_config  (I)

BOM_API int BOM_variant_config_copy ( tag_t  source_config,
logical  deepCopy,
tag_t new_config 
)

Parameters:
source_config  (I)
deepCopy  (I)
new_config  (O)

BOM_API int BOM_variant_config_evaluate ( tag_t  bom_variant_config  ) 

Parameters:
bom_variant_config  (I)

BOM_API int BOM_variant_delete_clause_list ( tag_t  clause_list  ) 

Deletes a clause list.

Parameters:
clause_list  (I) The clause list to delete

BOM_API int BOM_variant_e_block_add ( tag_t  veb,
tag_t  ve 
)

Appends a Variant Expression onto a Variant Expression Block.

Parameters:
veb  (I) The tag of the Variant Expression Block to append onto
ve  (I) The tag of the Variant Expression to add

BOM_API int BOM_variant_e_block_remove ( tag_t  veb,
tag_t  ve 
)

Removes a Variant Expression from a Variant Expression Block. This function does not delete the Variant Expression.

Parameters:
veb  (I) The tag of the Variant Expression Block to remove the Variant Expression from
ve  (I) The tag of the Variant Expression to remove

BOM_API int BOM_variant_e_block_replace ( tag_t  veb,
tag_t  veOut,
tag_t  veIn 
)

Replaces one Variant Expression in a Variant Expression Block with another. This function does not delete the replaced Variant Expression.

Parameters:
veb  (I) The tag of the Variant Expression Block in which to replace the Variant Expression
veOut  (I) The tag of the Variant Expression to be replaced
veIn  (I) The tag of the Variant Expression to be inserted

BOM_API int BOM_variant_expr_default ( tag_t  option,
int  value,
tag_t default_ve 
)

Creates a fixed default Variant Expression which can be attached to an Item Revision.

Parameters:
option  (I) The option that will be set
value  (I) The value to set the option to
default_ve  (O) The resulting variant expression which can be added to an item revision's variant expression block

BOM_API int BOM_variant_expr_error_if ( tag_t  cond_ve,
const char *  warning_text,
tag_t error_if_ve 
)

Creates an "error if" type Variant Expression which can be attached to an Item Revision for variant rule checks. A suitable condition Variant Expression can be obtained using BOM_variant_join_clause_list.

Parameters:
cond_ve  (I) The variant expression representing the variant condition under which the error will occur
warning_text  (I) The text which will be displayed when the error condition occurs
error_if_ve  (O) The resulting variant expression which can be added to an Item Revision's variant expression block

BOM_API int BOM_variant_expr_load_if ( tag_t  cond_ve,
tag_t load_if_ve 
)

Creates a "load if" type Variant Expression which can be attached to a BOM Line (or Occurrence) to control variant configuration of an assembly. A suitable condition Variant Expression can be obtained using BOM_variant_join_clause_list.

Parameters:
cond_ve  (I) The variant expression representing the variant condition under which the BOMLine will be configured
load_if_ve  (O) The "load if" variant expression which can be added to a BOMLine's variant expression block

BOM_API int BOM_variant_expr_set_if ( tag_t  cond_ve,
tag_t  option,
int  value,
tag_t set_if_ve,
tag_t assign_ve 
)

Creates a "set if" type Variant Expression which can be attached to an Item Revision for derived option defaults. A suitable condition Variant Expression can be obtained using BOM_variant_join_clause_list.

Parameters:
cond_ve  (I) The variant expression representing the variant condition under which the option default will be set
option  (I) The option that will be set when the variant condition is met
value  (I) The value to set the option to when the variant condition is met
set_if_ve  (O) The resulting variant expression which can be added to an item revision's variant expression block
assign_ve  (O) The variant expression for the actual assignment section of the derived default

BOM_API int BOM_variant_expr_split_default ( tag_t  default_ve,
tag_t option,
int *  value 
)

Extracts the option, and the value from a fixed default Variant Expression obtained from an Item Revision.

Parameters:
default_ve  (I) The default variant expression obtained from an Item Revision's variant expression block
option  (O) The option that will be set
value  (O) The value that the option will be set to

BOM_API int BOM_variant_expr_split_error_if ( tag_t  error_if_ve,
char **  warning_text,
tag_t cond_ve 
)

Extracts the variant condition and the display text from an "error if" type Variant Expression obtained from an Item Revision. The resulting condition Variant Expression can then be edited using BOM_variant_new_clause_list.

Parameters:
error_if_ve  (I) The "error if" variant expression obtained from an Item Revision's variant expression block
warning_text  (OF) The text which will be displayed when the error condition occurs
cond_ve  (O) The variant condition under which the error occurs

BOM_API int BOM_variant_expr_split_load_if ( tag_t  load_if_ve,
tag_t cond_ve 
)

Extracts the variant condition from a "load if" type Variant Expression obtained from a BOM Line (or Occurrence). The resulting condition Variant Expression can then be edited using BOM_variant_new_clause_list.

Parameters:
load_if_ve  (I) The "load if" variant expression obtained from a BOMLine's variant expression block
cond_ve  (O) The variant condition extracted from the "load if" variant expression

BOM_API int BOM_variant_expr_split_set_if ( tag_t  set_if_ve,
tag_t option,
int *  value,
tag_t cond_ve 
)

Extracts the variant condition, the option, and the value from a "set if" type Variant Expression obtained from an Item Revision. The resulting condition Variant Expression can then be edited using BOM_variant_new_clause_list.

Parameters:
set_if_ve  (I) The "set if" variant expression obtained from an Item Revision's variant expression block
option  (O) The option that will be set when the variant condition is met
value  (O) The value that the option will be set to when the variant condition is met
cond_ve  (O) The variant condition under which the default will be derived

BOM_API int BOM_variant_expression_as_text ( tag_t  expr,
char **  str 
)

Returns a variant expression as a text string.

Parameters:
expr  (I) Tag of the expression
str  (OF) The expression in a text form

BOM_API int BOM_variant_join_clause_list ( tag_t  clause_list,
tag_t conditon_ve 
)

Creates a new condition Variant Expression from the clause list. This new variant condition can be used for several purposes by passing it into BOM_variant_expr_load_if, BOM_variant_expr_error_if, or BOM_variant_expr_set_if.

Parameters:
clause_list  (I) The clause list to produce the new variant condition from
conditon_ve  (O) The newly created condition variant expression

BOM_API int BOM_variant_new_clause_list ( tag_t  bom_window,
tag_t clause_list 
)

Creates a new empty clause list. This is used to create a new variant condition.

Parameters:
bom_window  (I) The BOM window which will provide the context for the edit operation
clause_list  (O) The new empty clause list

BOM_API int BOM_variant_rule_apply ( tag_t  bomvariantlist  ) 

Applies the given BOM variant rule to its owning BOM window.

Parameters:
bomvariantlist  (I) The BOM variant rule to apply

BOM_API int BOM_variant_rule_apply_full_vrule ( tag_t  bomvariantlist,
tag_t  vrule,
logical list_changed 
)

Applies a saved variant rule to the given BOM variant rule. This function unsets the BOM variant rule's option values prior to loading the saved rule.

Parameters:
bomvariantlist  (I) The BOM variant rule to apply the saved rule to
vrule  (I) The saved variant rule to load
list_changed  (O) Returned as true if the saved variant rule contained any options which were not previously in the BOM variant rule (i.e., the BOM variant rule has had its set of options altered by this call).

BOM_API int BOM_variant_rule_apply_partial_vrule ( tag_t  bomvariantlist,
tag_t  vrule,
logical list_changed 
)

Applies a saved variant rule to the given BOM variant rule. This function will not unset existing option values prior to loading the saved rule.

Parameters:
bomvariantlist  (I) The BOM variant rule to apply the saved rule to
vrule  (I) The saved variant rule to load
list_changed  (O) Returned as true if the saved variant rule contained any options which were not previously in the BOM variant rule. i.e., the BOM variant rule has had its set of options altered by this call.

BOM_API int BOM_variant_rule_apply_to ( tag_t  src_bomvariantlist,
tag_t  dst_bomvariantlist 
)

Applies the source BOM variant rule to the destination BOM variant rule. The behavior of this can be controlled via the copy action (see BOM_variant_rule_set_copy_action).

Parameters:
src_bomvariantlist  (I) The BOM variant rule to be applied
dst_bomvariantlist  (I) The BOM variant rule to apply the source rule to

BOM_API int BOM_variant_rule_ask_copy_action ( int *  action  ) 

Queries the mechanism which will be used when copying a BOM variant rule onto different BOM variant rules and windows. This mechanism controls how the destination variant rule is formed, as a combination of the source rule and the destination rule or window. There are three settings for this: source, destination, source and destination.

Parameters:
action  (O) Returned as one of the following values:
BOM_variant_rule_src - Destination rule will contain the same options and values as the source rule.
BOM_variant_rule_src_and_dest - Destination rule will contain its existing options (with their values updated to match the source rule) plus those from the source rule.
BOM_variant_rule_dest - Destination rule will contain only its existing options (but with their values updated to match the source rule).

BOM_API int BOM_variant_rule_ask_option_rev ( tag_t  bomvariantlist,
tag_t  option,
tag_t option_rev 
)

Returns the option revision for the given option as configured in the given BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule
option  (I) Tag of the option to query
option_rev  (O) Tag of the option revision as configured in the given BOM variant rule

BOM_API int BOM_variant_rule_ask_option_value ( tag_t  bomvariantlist,
tag_t  option,
tag_t option_rev,
int *  value,
int *  how_set,
char **  where_set 
)

Returns the current value of an option in the given BOM variant rule, along with information as to how it was set.

Parameters:
bomvariantlist  (I) The BOM variant rule
option  (I) The option to query
option_rev  (O) The configured revision of the option
value  (O) Current integer value of the option. At present this is always an index into the enumerated list of allowed values.
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h. Reports whether the option was set by the user, a saved variant rule, or a default.
where_set  (OF) If the option was defaulted or derived, this is returned as the Id of the Item that contained the expression that defined this option value. If the option was set by a saved variant rule, this is returned as the name of the rule.

BOM_API int BOM_variant_rule_ask_options ( tag_t  bomvariantlist,
int *  n,
tag_t **  options,
tag_t **  option_revs 
)

Returns the list of options and their revisions referenced by the given BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule
n  (O) The number of options in the rule
options  (OF) n Array of options in the rule
option_revs  (OF) n Array of the configured option revisions for those options

BOM_API int BOM_variant_rule_ask_vrule ( tag_t  bomvariantlist,
tag_t vrule,
logical modified 
)

Returns the saved variant rule which is currently loaded into the given BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule to query
vrule  (O) The saved variant rule currently loaded in that BOM variant rule. Returned as NULLTAG if no saved rule has been loaded.
modified  (O) Returned as true if any of the BOM variant rule's option values have been altered since the saved variant rule was loaded

BOM_API int BOM_variant_rule_clear_option_values ( tag_t  bomvariantlist  ) 

Unsets all the option values in the given BOM variant rule, and unloads the saved variant rule if you have one loaded.

Parameters:
bomvariantlist  (I) The BOM variant rule to clear

BOM_API int BOM_variant_rule_copy ( tag_t  src_bomvariantlist,
tag_t  dst_window,
tag_t dst_bomvariantlist 
)

Creates a new copy of the source BOM variant rule, either within the same BOM window or in a different BOM window. The behavior of this can be controlled via the copy action (see BOM_variant_rule_set_copy_action).

Parameters:
src_bomvariantlist  (I) BOM variant rule to copy. Setting this to NULLTAG will create a copy of the given BOM window's current rule.
dst_window  (I) A BOM window. If src_bomvariantrule is not NULLTAG, the new copy of the rule will be attached to this BOM window. Setting this argument to NULLTAG will attach the new rule to the same window as the old rule. If src_bomvariantrule is NULLTAG, this BOM window's current rule will be copied, and the new rule attached to this BOM window.
dst_bomvariantlist  (O) The new copy of the source BOM variant rule

BOM_API int BOM_variant_rule_delete ( tag_t  bomvariantlist  ) 

Deletes the given BOM variant rule.

Note:
Closing a BOM window automatically deletes all BOM variant rules owned by that window.
Parameters:
bomvariantlist  (I) The BOM variant rule to delete

BOM_API int BOM_variant_rule_evaluate ( tag_t  bomvariantlist  ) 

Evaluates the given BOM variant rule. This will set option defaults, derived values and perform option rule checks. Note that this function is called automatically by all BOM_variant_rule ITK functions which change the BOM variant rule. For this reason, you only need to call this function if you are altering low level variant data such as Variant Expressions and Variant Expression Blocks.

Return Values

BOM_variant_error_condition - The evaluation triggered a variant rule check.

Parameters:
bomvariantlist  (I) The BOM variant rule to clear

BOM_API int BOM_variant_rule_find_option ( tag_t  bomvariantlist,
tag_t  item,
const char *  name,
tag_t option,
tag_t option_rev 
)

Searches for an option with the specified name. If an item is specified then it will search for the option attached to that item. If the item is NULLTAG, then it will search for the option in the specified BOM variant rule. If it cannot find the option in the rule, then it will search the entire database. If more than one option is found with the same name then an error will occur.

Parameters:
bomvariantlist  (I) The BOM variant rule to search
item  (I) Optional item tag. If a valid item is specified, it looks for the option only in that item. If NULLTAG is specified, the BOM variant rule is searched, followed by the whole database if the option is not in the rule.
name  (I) Name of the option to find
option  (O) Tag of the option found
option_rev  (O) Tag of the option revision as configured in the given BOM variant rule

BOM_API int BOM_variant_rule_find_options ( tag_t  bomvariantlist,
tag_t  item,
const char *  name,
int *  n_options,
tag_t **  options 
)

Performs a general search for options. If both a name and an item is specified then it will search for the named option attached to that item. If the item is NULLTAG, then it will search for the option in the specified BOM variant rule. If it cannot find the option in the rule (or if the rule is NULLTAG), then it will search the entire database. If the name is NULL then it will return all options attached to the given item, or rule if the item is NULLTAG.

Return Values

BOM_no_variant_name - An option name was not specified. This will only occur if the bomvariantrule and item arguments are set to NULLTAG.

Parameters:
bomvariantlist  (I) The BOM variant rule to search. May be NULLTAG to search the entire database.
item  (I) The item which the option is defined against. May be NULLTAG to search the entire rule or database.
name  (I) The name of the option to find. May be NULL to find all options against the given item or rule.
n_options  (O) The number of options found
options  (OF) n_options Array of options found

BOM_API int BOM_variant_rule_set_copy_action ( int  action  ) 

Sets the mechanism which will be used when copying a BOM variant rule onto different BOM variant rules and windows. The selected mechanism controls how the destination variant rule is formed as a combination of the source rule and the destination rule or window. There are three settings for this: source, destination, source and destination.

Parameters:
action  (I) Set this to one of the following values:
BOM_variant_rule_src - Destination rule will contain the same options as the source rule.
BOM_variant_rule_src_and_dest - Destination rule will contain its existing options (with their values updated to match the source rule) plus those from the source rule.
BOM_variant_rule_dest - Destination rule will contain only its existing options (but with their values updated to match the source rule).

BOM_API int BOM_variant_rule_set_option_value ( tag_t  bomvariantlist,
tag_t  option,
int  value 
)

Sets the option to the given value in the BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule
option  (I) The option to set
value  (I) Integer value that the option should be set to. At present this is always an index into the enumerated list of allowed values.

BOM_API int BOM_variant_rule_unset_option_value ( tag_t  bomvariantlist,
tag_t  option 
)

Unsets an option within the given BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule
option  (I) The option to unset

BOM_API int BOM_variant_rule_unset_option_values ( tag_t  bomvariantlist,
int  n_options,
tag_t options 
)

Unsets a group of options within the given BOM variant rule.

Parameters:
bomvariantlist  (I) The BOM variant rule
n_options  (I) The number of options to unset
options  (I) n_options Array of options to unset

BOM_API int BOM_verify_part_structure ( tag_t  line,
int *  cntCompleteLines,
tag_t **  completeLinesTags,
int *  cntIncompleteLines,
tag_t **  incompleteLinesTags,
int *  cntSkippedLines,
tag_t **  skippedLinesTags 
)

For the input line and its descendents completeness check is performed.

The checks is valid for lines with underlying item of type Part. Other lines are skipped. For a line with underlying item's type as Part, the need for positioned design is verifed.

The ITK returns the three array of lines: skipped - lines which were skipped and completess check not performed complete - lines satisfying the completeness criteria incomplete - lines not satisfying the completeness criteria

Parameters:
line  (I)
cntCompleteLines  (O)
completeLinesTags  (OF) cntCompleteLines
cntIncompleteLines  (O)
incompleteLinesTags  (OF) cntIncompleteLines
cntSkippedLines  (O)
skippedLinesTags  (OF) cntSkippedLines

BOM_API int BOM_window_apply_full_vrule ( tag_t  bom_window,
tag_t  vrule 
)

Sets the given variant rule to be the current rule for the given BOM window. This call unsets all existing option values prior to loading the new values defined by the rule.

Parameters:
bom_window  (I) BOM window to query
vrule  (I) Variant rule to apply

BOM_API int BOM_window_apply_partial_vrule ( tag_t  bom_window,
tag_t  vrule 
)

Sets the options in the given BOM window to the values defined in the rule. Only those BOM window options which are defined in the rule will have their values changed. All other options will remain unaffected.

Parameters:
bom_window  (I) BOM window to query
vrule  (I) Variant rule to apply

BOM_API int BOM_window_ask_absocc_context ( tag_t  window,
tag_t rootLine 
)

Ask bom window for selected context bomline.

Parameters:
window  (I) Tag of bom window.
rootLine  (O) Tag of bomline that is the selected context line, NULLTAG means no line selected.

BOM_API int BOM_window_ask_absocc_edit_mode ( tag_t  window,
logical absOccEditMode 
)

Ask bom window status of absolute occurrence edit mode.

Parameters:
window  (I) Tag of bom window.
absOccEditMode  (O) Status of absocc edit mode, on or off

BOM_API int BOM_window_ask_effectivity_grprevs ( tag_t  window,
int *  count,
tag_t **  effGrpRevList 
)

This function returns effectivity group revision associated with BOMWindow.

Parameters:
window  (I) Window for which EffectivityGroup Revs are to be set
count  (O) EffectivityGroup Revs set on BOMWindow
effGrpRevList  (OF) count EffectivityGroup Revs set on BOMWindow

BOM_API int BOM_window_ask_generic_components ( tag_t  window,
int *  generic_component_count,
tag_t **  generic_component_lines 
)

For a given BOM window, this method provides an array of currently loaded BOM lines that represent generic components.

Parameters:
window  (I) The BOM window being queried
generic_component_count  (O) The number of BOM lines that are generic (not variant items)
generic_component_lines  (OF) generic_component_count The BOM lines whose item revisions are modules

BOM_API int BOM_window_ask_is_modified ( tag_t  window,
logical is_modified 
)

This function returns true if the specified BOM window contains a modified bill. This can be useful to know whether you need to call BOM_save_window in order to update the database.

Parameters:
window  (I) The window you are asking about
is_modified  (O) True if the bill has been modified and needs saving

BOM_API int BOM_window_ask_option_value ( tag_t  window,
tag_t  option,
tag_t option_rev,
int *  value,
int *  how_set,
char **  where_set 
)

Returns the current value of some option, along with information as to how it was set.

Parameters:
window  (I) Tag of the BOM window
option  (I) Tags of the option
option_rev  (O) Tag of the configured revision of the option
value  (O) Current value of the option
how_set  (O) An element of the BOM_option_how_set_t enumeration defined in bom_tokens.h. Reports whether it was set by the user or defaulted.
where_set  (OF) If this option was defaulted or derived then where_set is returned as the Item Id of the Item that contained the expression that defined this option value

BOM_API int BOM_window_ask_options ( tag_t  window,
int *  n_options,
tag_t **  options,
tag_t **  option_revisions 
)

Asks for the set of options referenced by the bill being displayed in the specified window.

Parameters:
window  (I) Tag of the BOM window
n_options  (O) Number of options referenced
options  (OF) n_options Tags of the options
option_revisions  (OF) n_options Tags of the exact revisions of those options

BOM_API int BOM_window_ask_ove_messages ( tag_t  bom_window,
int *  count,
int **  severities,
char ***  messages,
tag_t **  lines 
)

This method can be called to display any OVE messages that occur as a consequence of the MVL expressions "error", "warn" or "inform" are executed.

Parameters:
bom_window  (I)
count  (O)
severities  (OF) count
messages  (OF) count
lines  (OF) count

BOM_API int BOM_window_ask_state_logical ( tag_t  window,
int  state,
logical answer 
)

Returns the current setting for various window states. The particular state being enquired about is specified by the state argument that is one of the BOM_WINDOW_STATE_XXX tokens in bom_tokens.h. Currently these include enquiries for pack_by_default, show variants, show substitutes and hide unconfigured.

Parameters:
window  (I) Tag of the window
state  (I) State to enquire about, defined in bom_tokens.h
answer  (O) Answer

BOM_API int BOM_window_ask_variant_rule ( tag_t  window,
tag_t bomvariantlist 
)

Returns the current BOM variant rule for the given BOM Window. A BOM variant rule contains a set of variant options and their current values.

Parameters:
window  (I) BOM window to get the current BOM variant rule from
bomvariantlist  (O) The BOM window's current BOM variant rule object

BOM_API int BOM_window_ask_vrule ( tag_t  bom_window,
tag_t vrule,
logical modified 
)

Returns the current variant rule for the given BOM window.

Parameters:
bom_window  (I) BOM window to query
vrule  (O) Current variant rule. Returned as NULLTAG if there is no current rule.
modified  (O) True if any option values have been changed since the current variant rule was loaded. This includes loading partial variant rules.

BOM_API int BOM_window_clear_all_forced_configs ( tag_t  bomwindow  ) 

Parameters:
bomwindow  (I) BOMWindow in which to clear forced configurations

BOM_API int BOM_window_filter_unconfigured_classic_variants ( tag_t  window  ) 

Make the BOM window to filter creating unconfigured bomlines due to classic variants

Parameters:
window  (I) Tag of the window

BOM_API int BOM_window_filters_unconfigured_classic_variants ( tag_t  window,
logical filter_unconfigured 
)

Asks if the BOM window is displaying unconfigured BOM lines.

Parameters:
window  (I) Tag of the window
filter_unconfigured  (O) True if filters unconfigured BOM lines due to classic variants

BOM_API int BOM_window_find_option ( tag_t  window,
tag_t  item,
const char *  option_name,
tag_t option,
tag_t option_rev 
)

Looks in the database for an option with the specified name. If there are two options with the same name but in different items, then the item you want must be supplied; if item is specified as NULLTAG then it will first look in items loaded in the specified window, and then in the database. If that gives an ambiguous result, then it returns an error.

Parameters:
window  (I) Tag of the BOM window
item  (I) Optional, can by NULLTAG or a valid item. If a valid item is specified then it looks for the option in that item.
option_name  (I) Name of the option to find
option  (O) Tags of the found option
option_rev  (O) Tags of the revision of the found option as configured by the window's configuration rules

BOM_API int BOM_window_get_bomline_from_apprPathNode ( tag_t  window,
tag_t  pathNode,
tag_t  intermediateParentLine,
tag_t pathNodeBomLine 
)

Gets a bomline from an apprPathNode

Parameters:
window  (I) Tag to bomwindow
pathNode  (I) Tag to pathNode
intermediateParentLine  (I) Tag to intermediate line for future - can be null
pathNodeBomLine  (O) Pointer to a tag to bomline - null if not found

BOM_API int BOM_window_get_occ_type_filter ( tag_t  window_tag,
int *  count,
char ***  typeList 
)

Parameters:
window_tag  (I)
count  (O)
typeList  (OF) count

BOM_API int BOM_window_hide_gcs_cps ( tag_t  window  ) 

Sets the BOM window to hide Guided Component Search Connection Point BOM lines.

Note:
The window supplied must have a root line: You cannot call this immediately after BOM_create_window.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_window_hide_incremental_changes ( tag_t  bom_window  ) 

Flags window to hide unconfigured BOM lines by Incremental changes.

Parameters:
bom_window  (I)

BOM_API int BOM_window_hide_occ_type_filter ( tag_t  window_tag  ) 

Parameters:
window_tag  (I)

BOM_API int BOM_window_hide_substitutes ( tag_t  bom_window  ) 

Sets the BOM window to hide substitutes.

Parameters:
bom_window  (I) Tag of the window

BOM_API int BOM_window_hide_suppressed ( tag_t  window  ) 

Parameters:
window  (I)

BOM_API int BOM_window_hide_unconfigured ( tag_t  window  ) 

Flags the BOMWindow to hide BOMLines that are not configured for Occurrence Effectivity.

Note:
The window supplied must have a root line: You cannot call this immediately after BOM_create_window.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_window_hide_variants ( tag_t  bom_window  ) 

Flags the BOM window to suppress display of lines of the BOM when the line is a not selected by its variant conditions. After a call to this function, BOM_line_ask_child_lines will not list lines whose variant conditions are not satisfied.

Parameters:
bom_window  (I) Tag of the BOM window

BOM_API int BOM_window_revert_all_pending_edits ( tag_t  window  ) 

Remove all pending edits in the specified window. Restores the bomline properties (and underlying occurrence attributes) to original values. If a bomline has not yet been saved to the database and there are no unsaved modifications, then delete the unsaved occurrence. If a bomline had been marked for cut, remove that designation.

Parameters:
window  (I) revert all pending edits in this window

BOM_API int BOM_window_set_absocc_context ( tag_t  window,
tag_t  rootLine 
)

Set context bomline for absolute occurrence edit mode.

Parameters:
window  (I) Tag of bom window.
rootLine  (I) Tag of higher level bom line.

BOM_API int BOM_window_set_absocc_edit_mode ( tag_t  window,
logical  absOccEditMode 
)

Set bom window absolute occurrence edit mode on or off. NOTE: Context is assumed and will be set to the topLine of the bom window. To change the context line use the BOM_window_set_absocc_context API.

Parameters:
window  (I) Tag of bom window.
absOccEditMode  (I) Status to set absocc edit mode, on or off

BOM_API int BOM_window_set_closure_rule ( tag_t  window,
tag_t  closure_rule,
int  n_variables,
char **  variable_names,
char **  variable_values 
)

Set closure rule for the BOM window.

Parameters:
window  (I) Tag of the window
closure_rule  (I) Tag of Closure Rule
n_variables  (I) number of variables in closure rule
variable_names  (I) variable names
variable_values  (I) variable values

BOM_API int BOM_window_set_effectivity_grprevs ( tag_t  window,
int  n_effrevs,
tag_t effGrpRevList 
)

This function sets effectivity group revisions on the BOMWindow.

Parameters:
window  (I) Window for which EffectivityGroup Revs are to be set
n_effrevs  (I) Number of effectivity group revisions to be set
effGrpRevList  (I) n_effrevs EffectivityGroup Revs to be set on BOMWindow

BOM_API int BOM_window_set_occ_type_filter ( tag_t  window_tag,
int  count,
char **  typeList 
)

Parameters:
window_tag  (I)
count  (I)
typeList  (I)

BOM_API int BOM_window_set_option_value ( tag_t  window,
tag_t  option,
int  value 
)

Within this window, sets the option to said value.

Parameters:
window  (I) Tag of the BOM window
option  (I) Tags of the option to be set
value  (I) Integer value to that the option is to be set. At present this is always an index into the enumerated list of allowed values.

BOM_API int BOM_window_show_gcs_cps ( tag_t  window  ) 

Sets the BOM window to display Guided Component Search Connection Point BOM lines.

Note:
The window supplied must have a root line: You cannot call this immediately after BOM_create_window.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_window_show_incremental_changes ( tag_t  bom_window  ) 

Flags window to show unconfigured BOM lines by Incremental changes.

Parameters:
bom_window  (I)

BOM_API int BOM_window_show_occ_type_filter ( tag_t  window_tag  ) 

Parameters:
window_tag  (I)

BOM_API int BOM_window_show_substitutes ( tag_t  bom_window  ) 

Sets the BOM window to display substitutes.

Parameters:
bom_window  (I) Tag of the window

BOM_API int BOM_window_show_suppressed ( tag_t  window  ) 

Parameters:
window  (I)

BOM_API int BOM_window_show_unconfigured ( tag_t  window  ) 

Flags the BOMWindow to display BOMLines that are not configured for Occurrence Effectivity.

Note:
The window supplied must have a root line: You cannot call this immediately after BOM_create_window.
Parameters:
window  (I) Tag of the window

BOM_API int BOM_window_show_variants ( tag_t  bom_window  ) 

Flags the BOM window to display lines of the BOM, even if the line is a not selected by its variant conditions.

Parameters:
bom_window  (I) Tag of the BOM window

BOM_API int BOM_window_shows_gcs_cps ( tag_t  window,
logical shows_gcs_cp 
)

Asks if the BOM window is displaying Guided Component Search Connection Point BOM lines.

Parameters:
window  (I) Tag of the window
shows_gcs_cp  (O) True if GCS CP BOM lines are shown

BOM_API int BOM_window_shows_suppressed ( tag_t  window,
logical shows_suppressed 
)

Parameters:
window  (I)
shows_suppressed  (O)

BOM_API int BOM_window_shows_unconfigured ( tag_t  window,
logical shows_unconfigured 
)

Asks if the BOM window is displaying unconfigured BOM lines.

Parameters:
window  (I) Tag of the window
shows_unconfigured  (O) True if unconfigured BOM lines are shown

BOM_API int BOM_window_unset_option_value ( tag_t  window,
tag_t  option 
)

Unsets the option within this window.

Parameters:
window  (I) Tag of the BOM window
option  (I) Tag of the option to be unset

BOM_API int BOM_world_newIrfWhereConfigured ( tag_t  rev  ) 

BOMWorld api to trigger update of all BOMWindows based on a changed ItemRev. This is needed after ITK call to create / copy itemrev was made and BOMWindow(s) happen to be open.

Parameters:
rev  (I)

BOM_API int BOM_writer_delete ( void *  block  ) 

Deletes "block" and any associated structures.

Parameters:
block  (I)

BOM_API int BOM_writer_get_plmxml_builders ( int *  count,
char ***  names,
char ***  descriptions 
)

Returns the registered PLMXML Builder class names and descriptions.

BOM_writer_format_plmxml->builder_name should be set to one of these.

Parameters:
count  (O)
names  (OF) count
descriptions  (OF) count

BOM_API int BOM_writer_new_format_ajt ( BOM_writer_format **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_format_empty ( BOM_writer_format **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_format_flatten ( BOM_writer_format **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_format_plmxml ( BOM_writer_format **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_output_file ( BOM_writer_output **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_output_smstring ( BOM_writer_output **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_new_traversal ( BOM_writer_traversal **  p  ) 

Allocates memory for the input-structure parameters required by BOM_writer_write_bomwindow(), and initializes each structure with suitable default values (including a hidden value that distinguishes the various different structures). The user changes any necessary values in each structure before using it.

Parameters:
p  (OFp) A BOM_writer_delete()able data-structure, to be passed to BOM_writer_write_bomwindow()

BOM_API int BOM_writer_write_bomwindow ( tag_t  bom_window,
BOM_writer_output output_p,
BOM_writer_format format_p,
BOM_writer_traversal traversal_p 
)

This function performs a depth-first traversal of the bom_window according to the values set in the parameter structures supplied, and emits the result as requested.

You can nominate an output format (e.g. AJT, PLMXML) and an output mechanism (e.g. file handle) to decide how the BOM lines are presented. Most output formats have additional options.

By default, all lines in the BOM window will appear in the output, but you can instead select one or more lines, and specify whether you want just the selected lines and their ancestors to appear, or to have the selected lines - descendants appear as well.

Recommendation: bom_window should not have any packing. See bomwriter.h.

Return Values

BOM_writer_parameter_is_null
BOM_writer parameter '<xxxx>' is null - The named parameter was passed with with a null value.
BOM_writer_parameter_is_wrong_type
BOM_writer parameter '<xxxx>' is wrong type - the named parameter was not an output, format, or traversal as it should have been, or was otherwise invalid.
BOM_writer_matrix_missing_or_null
BOM_writer (legacy) matrix is missing or null - A legacy (pre-UG/NX) transform on a bomline was missing, and there was no conversion factor for new-style transforms. Consider -identity=true to circumvent this.
BOM_writer_plmxml_save_error
PLMXML Toolkit save errors: <xxx> - an error was encountered while saving the PLMXML document through the Parasolid PLMXML toolkit. The message has been copied into the error report.
BOM_writer_format_requires_output
BOM_writer format was given NULL output mechanism
BOM_writer_builder_class_not_found
BOM_writer builder class '<xxx>' was not found - The caller requested a PLMXML format build class that is not registered.
Parameters:
bom_window  (I) The window is written as-is: you should set revision rule, packing status, and hide unconfigured variants, etc
output_p  (Ip) The structure selecting and describing where the file-data should go
format_p  (Ip) The structure selecting and describing which file format to use
traversal_p  (Ip) The structure giving traversal options