TeamcenterKnowledge

4th Generation Design and Product Configurator utilities

save_variant_rule_as_variant_criteria

Saves existing variant rules as new variant criteria objects. All IMAN Relations with VariantRules are copied. The new VariantCriteria objects are saved in the Newstuff folder. Existing VariantRules remain unchanged. If successful, the new relations for the new VariantCriteria objects are created in the system. Additionally, IMAN Relations of the existing objects are deleted based on the user input. If the creation and deletion fails, the system generates a failure report in the log file. Syntax save_variant_rule_as_variant_criteria -u=user-id -p=password -g=group -file=Input_File_with_Comma_Separated_VariantRule_UIDs -deleteRelations=true_or_false 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 user and password 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. -g Specifies the group associated with the user. If used without a value, the user's default group is assumed. -file Mandatory input. Path to a file with a list of comma separated UIDs of VariantRules to be saved as VariantCriteria. -deleteRelations (Optional) If set to true, the system deletes IMAN Relations of existing VariantRule objects if IMAN Relations for the new objects are successfully saved in the database. In case of the failure, it is reported in the log file. The default value is false. Environment As specified in Setting up a Teamcenter command-line environment. Files Input to the utility A CSV file with a comma separated list of UIDs of VariantRules to be saved as VariantCriteria. Output of the utility The VariantCriteria objects are created corresponding to the input VariantRules. The system generates a log file with the UID and the name of VariantRule and the corresponding UID, name, and ID of the newly created VariantCriteria. Additionally, if the user specified deleteRelations = true, the system generates a log of UIDs of VariantCriteria, if any, for which the creation and deletion of IMAN Relations have failed. Restrictions None. Examples Example 1 Variant rule UIDs listed in ListOfUids.txt are saved as variant criteria. save_variant_rule_as_variant_criteria -u=Tc_admin -p=password -file=ListOfUids.txt Example 2 Variant rule UIDs listed in ListOfUids.txt are saved as variant criteria. IMAN Relations of old variant rule objects are deleted and IMAN Relations to the new variant criteria are saved. save_variant_rule_as_variant_criteria -u=Tc_admin -p=password -file=ListOfUids.txt -deleteRelations=true

Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/hen1737253693250/xid1614128.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)