bomwriter
Emits a bill of materials (BOM), in a variety of file formats, to a nominated file optionally restricted to selected areas of the BOM. For example, you can use this utility to export product structure information from Teamcenter to a PLM XML file that can be consumed by several applications. If the size of the product structure is very large (several thousand occurrences) you may run the export overnight. In such situations, consider using the PLMXML_sdk_threshold preference to minimize memory consumption during the export. For more information about using this preference to serialize PLM XML objects, therefore reducing memory consumption during large exports, see the Teamcenter Environment Variables. Syntax bomwriter [-u=user-id {-p=password | -pf=password-file} -g=group] [-noprompt] [-h | -help] {-bookmark=bookmark-file | -item_list=input-file-name | -item=item-name | -key=item-key} [-rev=revision] [-selected=input-file-name] [-subselected=input-file-name] [-output_file=output-file-name] [-revision_rule=configuration-rule] [-show_substitutes=true | false] [-show_unconfigured=true | false] [-show_unconfigured_occ_eff=true | false] [-show_variants=true | false] [-view=view-type-name] [-descendants=true | false] [-flatten=true | false] [-packed_window=true | false] [-transient_unpack=true | false] [-smstring=true | false] [-svrule=saved-variant-rule-name [:rev-id:rule-id]] -format=format where format is one of the following: index psup plmxml ajt Arguments -u Specifies the user ID. This is a user with Teamcenter administration privileges. Note If Security Services single sign-on (SSO) is enabled for your server, the -u and -p arguments are authenticated externally through SSO rather than being authenticated against the Teamcenter database. If you do not supply these arguments, the utility attempts to join an existing SSO session. If no session is found, you are prompted to enter a user ID and password. -p Specifies the password. This argument is mutually exclusive with the -pf argument. -pf Specifies the password file. For more information about managing password files, see Manage password files. This argument is mutually exclusive with the -p argument. -g Specifies the group associated with the user. If used without a value, the user's default group is assumed. -noprompt Specifies that if autologin fails, the system will not prompt for an interactive login. This is a standard autologin option. -help Displays help for this utility. -bookmark Specifies a simple bookmark file from which to extract the default root item ID, root revision ID, and revision rule (overruled by any revision rule specified on the command line). The parsing of this file is primitive: one complete XML element per line is expected. -item_list Specifies a list of item IDs, one per line, with optional output file names on the same line. If no file name clause is provided, the default is itemid.format without + options. These items are processed successively. -item Specifies the item ID for the root of the BOM structure. -key Specifies a string used to identify an item instead of specifying an item using the -item and -rev arguments. To find the key of an object, use the get_key_string utility. For more information, see Introduction to multifield keys in BMIDE for Data Model Design. -rev Specifies the item revision for the root of the BOM structure. -view Specifies the view to be used. -output_file Specifies the output file. The stdout file is the default. -format Specifies the output file format with optional modifiers, for example: Copy -format=ajt+native+asm_jt_file -format=index Format used with the -selected or -subselected option. No modifiers. -format=psup psup format with the +props=xxx modifier representing comma-separated BOM line properties. You can also specify a delimiter using the delimiter option. The default delimiter is a comma (,). For example, to specify the semicolon as a delimiter: Copy -format=psup+delimiter=; +props=xxx Comma-separated BOM line properties are exported. +delimiter=x Single-character delimiter is used to separate each column in the output. -format=plmxml plmxml format with the following modifiers: +strict Minor errors are fatal. +type= xxx Use nondefault builder. +tmode= xxx Use nondefault transfer mode. +transform=[None | Cumulative | Absolute] Use specified transformType on Occurrence. +locales=language_codes Specifies the languages for the export. Separate multiple languages by commas (for example, en_US, fr_FR). The language IDs follow the standard locale naming conventions (for example, en_US). If no locales are specified for export, the database scalar value (attribute master) is exported to PLM XML scalar fields. +ua= xxx User attributes specifier. The syntax is a combination of a target specifier followed by a key specifier followed by a property specifier, all separated by commas. For example: Copy -format=plmxml+ua=target:, key:,prop:… The target, key, and property values are controlled by the INTEROP_ExtraPLMXMLInstanceAttributes preference. If there is more than one key/property value specified for a given target, you can specify each without repeating the target keyword. The properties are exported as UserValue under the UserData element under the target element. In the following example, the UserData element appears under the Occurrence element as it is the target. Copy In the following example, the user exports the bl_rev_owning_user property of BOMLine under the Occurrence element with a title of OwningUser. The same applies to bl_rev_owning_group. Copy -format=plmxml+ua=target:Occurrence, key:OwningUser,prop:bl_rev_owning_user, key:OwningGroup,prop:bl_rev_owning_group +revid_off Turn off revision ID in the PRV name attribute. +varuid_on Turn on variant UID. +grdvua_on Turn on user attributes for GRDVA in instance element. -format=ajt ajt format with the following modifiers: +nt ajt file attribute in Windows format. For example: Copy d:\folder\tk0404c2_mod_5q8050016xwq6.jt +unix ajt file attribute in UNIX format. For example: Copy /folder/tk0404c2_mod_5q8050016xwq6.jt +native ajt file attribute in machine-native (Linux or Windows) format. +uidtag ajt file attribute in uidtag format. For example: Copy BVHRD95$lV1P$n$hD.jt +identity Causes a missing transform to become an identity transform rather than a fatal error. +strict Minor errors are fatal. +skip_fake_part Skips dummy part for subassemblies. +asm_jt_file Outputs the associated JT files (if any) information for any intermediate lines in the assembly. -selected Specifies the input file to nominate particular lines as selected, defaults to the root line if none is selected. If the specified input file is empty, the output should contain configuration information only (no BOM lines), where supported. Run bomwriter once with the -f=index argument, edit the resulting file to remove lines that should not be selected, and run bomwriter again with the same parameters, but -f to the format you want and -s indicating the edited -f=index file. Note Review the index output file carefully before using it as the input for this option. If the output contains any special characters, for example: new line, the -selected option may not function properly. -subselected Specifies the subselected items file. Edit -f=index for format. -descendants Specifies whether descendants of selected lines should be included in the output, using true or false values. Defaults to true. Selected lines and ancestors of selected lines are always included. -flatten Presents the selected lines as a tree in which the root node is the immediate parent of all selected lines. The transforms of the selected lines are combined with the transforms of their ancestor's lines to compensate for their disappearance. Valid values are true and false. Defaults to false. The -flatten argument reverses the default for the -descendants argument, because the -flatten argument never needs descendent lines. -packed_window Use a packed BOM window. Valid values are true and false. The default value is false. Do not use with the PLM XML format. -transient_unpack Use transient unpacking. Valid values are true and false. The default value is false. Do not use with the PLM XML format. -smstring Use smstring output, printed to stdout. Valid values are true and false. The default value is false. -revision_rule Specifies a named revision rule. Defaults to the site default, frequently the latest working revision. -show_substitutes Specifies that substitutes be shown. Defaults to the site default value. -show_unconfigured Specifies that unconfigured lines be shown. Defaults to the site default value. -show_unconfigured_occ_eff Specifies that lines unconfigured by occurrence effectivity be shown. Defaults to the site default value. -show_variants Specifies that unconfigured variants be shown. Defaults to the site default value. However, if -svrule is specified, the default value is assumed to be false, unless you explicitly specify true in the command line entry. -svrule Specifies a saved variant rule to use when configuring the exported BOM. Optionally specify a particular revision of a variant rule object by providing its revision ID and rule ID separated by colons. Variant rule revision use is supported for only Cfg0VariantCriteria, a revisable subclass of the VariantRule object. -setpcamode Sets Product Configurator variant mode on a BOM window. This mode is set on the window only when the configurator context is associated with the top item or the input variant rule is Product Configurator variant based. If neither of these is true and the user wants to export the sub-assembly's Product Configurator variant-based variant formula property, then use this command line argument. For a migrated structure, both classic and Product Configurator variant data are present. Typically sub-assemblies will not have a configurator context associated. In that case, the user should use this command line argument to export the Product Configurator variant-based variant formula. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions None. Examples Run the bomwriter utility with the following arguments to write an AJT file for compilation (using asciitojt) on the current platform where some, but not all, BOM lines have transform matrices: Copy bomwriter -bookmark=somefile.bkm -format=ajt+native+identity
-output_file=somefile.ajt Run the bomwriter utility with the following arguments to write selected parts of a BOM window in AJT format (without descendants). First, create the index file from which to select parts: Copy bomwriter -item=XYZ001 -format=index -output_file=xyz001.index Edit the selected.index file to remove various lines and then run the utility as follows: Copy bomwriter -item=XYZ001 -format=ajt+native -selected=xyz001.index
-descendants=false -output_file=xyz001.ajt Output associated JT files information for any intermediate lines for item XYZ001. Copy bomwriter -item=XYZ001 -format=ajt+native+asm_jt_file
-output_file=xyz001.index -rev=A The following command calls the bomwriter utility with PLM XML format output on item1 and produces the Export_WithTranslations.plmxml file. It also writes the bl_item_object_desc BOM line property as Item_Desc UserData under the Occurrence element. The French and German translations of the localized properties on item1 are also exported to Text elements. Copy bomwriter -u=user -p=password -g=group -item=item1 -output_file=Export_WithTranslations.plmxml
-format=plmxml+ua=target:Occurrence,key:"Item_Desc",prop: "bl_item_object_desc"+locales=fr_FR,de_DE Related Topics Structure Management on Rich Client ─ Usage