Data Management Capabilities > Managing Part Structures > Windchill Options and Variants Capabilities > Creating and Managing Variants > Variant Specification Information Page > Loading Variant Specifications > Loading Variant Specifications Using an API > Loading Variant Specifications Using API #2
  
Loading Variant Specifications Using API #2
You can load variant specifications using an API #2 provided out-of-the-box. To invoke the API, make a call similar to this in your Java code:
ArrayList<VariantSpecLoadOutputBean> outputBeans = VariantSpecHelper.service.loadVariantSpecs(variantSpecBeans);
You must provide the following information for the API:
A list of VariantSpecLoadOutoutBean objects— Each bean pertains to a variant specification that must be created.
Each bean must contain the following information:
Name—The name of the variant specification.
Number— A valid variant specification number if you are reconfiguring an existing variant specification.
WTPart—If creating the specification based on the part.
Option set—If creating a specification based on a part, provide the assigned option set for the part. Otherwise, provide a valid option set.
Folder—Folder in which to store the variant specification.
NavigationCriteria object—This object can be persisted. It must have:
Name
Owner
Applicable type, for example, applied to a part
List of WTPartConfigSpec objects
List of NavigationFilter2 objects—These can contain a list of ATORuleConfigSpec objects. An ATORuleConfigSpec represents the Option Filter configuration specification.
A HashMap<String, Set<String>> represents the choice selections in the Option Filter. The keyset on the HashMap is the object identifier for the option, and the Set<String> is a collection of object identifiers for the choices.
The code must pass the collection of beans to the API.
Each resultant outputBean has a loadStatus object that contains success/failure and other information regarding the creation of the variant specification.