Data Management Capabilities > Managing Product Family > Product Family Management > Product Family Administration > Loading Product Family Objects using LoadFromFile
  
Loading Product Family Objects using LoadFromFile
LoadFromFile is a command-line utility that is used to load a single, customized data file to the Windchill database, thereby allowing to easily create or migrate large amount of legacy data into a new Windchill implementation. For more information about this utility, see Using the LoadFromFile Utility and Overview of Load Utilities.
The following command is used to load a single load file using the LoadFromFile utility:
windchill wt.load.LoadFromFile -d <ExampleLoadfile.xml>
In this command, the <ExampleLoadFile.xml> is the name of the load file that you want to load.
* 
The load utilities process only XML files. The CSV2XML utility is used to convert CSV files to XML-formatted files. If your data is CSV-formatted, you can reformat it to XML using the CSV2XML utility before loading the data into the database. For more information, see Converting CSV Files to XML Format Files.
You can use this utility to perform the following Product Family operations:
Create a Product Family, Product Model Group, Product Model, or Managed Variant Specification
Create usage links between Product Family Member objects
Assign a configurable module object to a Product Family or Product Model
Convert a standalone variant specification to an organized variant specification
Change the LifeCycleTemplate or LifeCycleState value of a variant specification
Create manual selection rules
* 
The term Product Family Member refers to the following objects:
Product Family
Product Model Group
Product Model
Variant Specification
The user who has read-write access to these object types, can run this utility.
Creating Product Family Objects
Use the createProductFamilyMember component to create objects of the following types:
Product Family
Product Model Group
Product Model
Managed Variant Specification
You can use different components in a single load file. Any combinations are supported.
* 
The number and version values in the following tables can be alphanumeric.
All the values, except for boolean, are case-sensitive.
Element
Data Type
Description
csvpfmName
String
Optional. Specify the name for the Product Family Member object.
csvpfmNumber
String
Optional. Specify the identification number for the Product Family Member object.
csvpfmType
String
Specify the object type for the Product Family Member object in the format <WCTYPE|objectName>. For example, WCTYPE|wt.productfamily.ProductFamily, WCTYPE|wt.productfamily.ProductModelGroup, WCTYPE|wt.productfamily.ProductModel, WCTYPE|com.ptc.wpcfg.doc.VariantSpec.
csvtopPFNumber
String
Specify the identification number value of the Product Family, in which this Product Family Member object resides. If creating a Product Family, then this must be its own number value.
csvversion
String
Optional. This element is currently supported for pre-existing variant specifications only. Specify a new version to be created for the pre-existing variant specification rather than creating a new object.
csvcontainerPath
String
Optional. Specify the container for the Product Family Member object.
csvnavcriteria
String
Optional. Specify the name of the navigation criteria to be set on a new variant specification.
Creating Usage Links between Product Family Member Objects
Use createUsageLink to link Product Family, Product Model Group, Product Model, and variant specification objects together to form a Product Family structure.
Element
Data Type
Description
csvpfmParentNumber
String
Specify the number value of the object serving as the parent role of the link.
csvpfmChildNumber
String
Specify the number value of the object serving as the child role of the link.
Assigning a Configurable Module Object to a Product Family or Product Model
Use setConfigurableModule to assign the configurable module (WTPart) object for a Product Family or Product Model object.
Element
Data Type
Description
csvpfmNumber
String
Specify the number value for the Product Family or Product Model to set the configurable module reference on.
csvcsNumber
String
Specify the number value for the WTPart that serves as the configurable module for the given Product Family or Product Model.
Converting a Stand Alone Variant Specification into an Organized Variant Specification
Use createOrganizedVariantSpec to convert a standalone variant specification to an organized variant specification.
Element
Data Type
Description
csvtopPFNumber
String
Specify the number for the Product Family in which this variant specification object will reside.
csvpfmParentNumber
String
Specify the number value for the Product Model that will serve as the parent object for this variant specification.
csvvsNumber
String
Specify the number value for the standalone variant specification to convert it to an organized variant specification by associating it to the specified Product Family and Product Model.
Changing the Lifecycle Template and Lifecyle State Values on a Variant Specification
Use setProductFamilyVariantLifeCycle to set the LifeCycleTemplate or LifeCycleState values on an existing variant specification object.
Element
Data Type
Description
csvvsNumber
String
Specify the number value for the existing variant specification for which the LifeCycleTemplate or LifeCycleState value must be changed.
csvversion
String
Specify the revision of the existing variant specification for which the LifeCycleTemplate or LifeCycleState value must be changed.
csviteration
String
Specify the iteration of the existing variant specification for which the LifeCycleTemplate or LifeCycleState value must be changed.
csvlifecycle
String
Specify the new LifeCycleTemplate value. This value can be null to keep the current value.
csvlifecyclestate
String
Specify the new LifeCycleState value. This value can be null to keep the current value.
Creating Manual Specification Rules for a Variant Specification
Use a combination of beginCreateManualSelectionRules, createManualSelectionRules, and endCreateManualSelectionRules to quickly and easily create a set of manual selection rules for an existing variant specification object. This method of loading manual selection rules assumes that you want to use the latest version of the variant specification, parent part, and child part. It will delete all the pre-existing rules for the specified parent part (within the context of the specified variant specification) before creating the new rules. This is one way to load manual selection rules. Another way is to create rules in a controlled way, which is described in detail in the following section.
Method
Element
Data Type
Description
beginCreateManualSelectionRules
csvmanualSelectionRuleVariantSpecNumber
String
Specify the number value for the existing variant specification that serves as the context for the new manual selection rule.
csvmanualSelectionRuleParentPartNumber
String
Specify the number value for the part that serves as the parent role for the links for which you want to create the manual selection rule.
createManualSelectionRules
csvmanualSelectionRuleChildPartNumber
String
Specify the number value for the part that serves as the child role for the link for which you want to create the manual selection rule.
endCreateManualSelectionRules
None.
Creating Manual Specification Rules in a Controlled Way
Use createModuleVariantSelectRule with the com.ptc.wpcfg.load.LoadHelper handler to create manual selection rules in a more controlled way. This method of loading manual selection rules allows you to specify more precise details on how you want to create the rule. Use any one of the following elements to create the rule for the correct parent-child link:
csvchildToSelectNumber
csvlinkComponentId
csvlinkLineNumber
New rules created by this method override the pre-existing rules that use the same variant specification - parent part - child part combination.
Element
Data Type
Description
csvvariantSpecNumber
String
Specify the umber value for the existing variant specification that serves as the context for the new manual selection rule.
csvvariantSpecRevision
String
Specify the revision for the existing variant specification to use as the context for the new manual selection rule.
csvparentNumber
String
Specify the number value for the part that serves as the parent role for the link for which you want to create the manual selection rule.
csvparentView
String
Optional. Specify the view for the parent part. This must always be specified unless the parent part does not have a View value.
csvparentViewVariation1
String
Optional. Specify the BOM type view variation of the parent part. Example values are costing, production, testing.
csvparentViewVariation2
String
Optional. Specify the alternate number view variation of the parent part. Example values are 001, 002, 003, 004, 005.
csvorganizationName
String
Optional. Specify the name of the organization in which the parent and child parts reside.
csvchildToSelectNumber
String
Optional. Specify the number value of the part that serves as the child role for the link for which you want to create the manual selection rule. Leave this blank if you want to specify csvlinkComponentId or csvlinkLineNumber value.
csvlinkComponentId
String
Optional. Specify the component ID of the link for which you want to create the manual selection rule. Leave this blank if you want to specify csvchildToSelectNumber or csvlinkLineNumber value.
csvlinkLineNumber
String
Optional. Specify the line number of the link for which you want to create the manual selection rule. Leave this blank if you want to specify csvchildToSelectNumber or csvlinkComponentId value.
csvactive
Boolean
Specify true for the new manual selection rule to be used for filtering.
Specify false for the new manual selection rule to not be used for filtering until it is activated.