VariantConfigurationBuilder Class¶
-
class
NXOpen.PDM.
VariantConfigurationBuilder
¶ Bases:
NXOpen.TaggedObject
,NXOpen.GeometricUtilities.IComponentBuilder
Represents a builder class that performs variant rule configuration.
New in version NX9.0.0.
Methods¶
Method | Description |
---|---|
AddMultipleVariantRules | Adds given variant rules in case of multiple variant rules to NXOpen.PDM.VariantConfigurationBuilder The input contextIds comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID. |
AskAvailableVariantRules | Returns the saved variant rules for the give context ID The input contextId: In case of default domain: it should be Teamcenter item ID. |
GetVariantRuleTableInformation | Returns selected variant rules stored inside NXOpen.PDM.VariantConfigurationBuilder The input contextIds comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID. |
RemoveVariantRule | Removes the given variant rule from NXOpen.PDM.VariantConfigurationBuilder if applicable The input contextId comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Method Detail¶
AddMultipleVariantRules¶
-
VariantConfigurationBuilder.
AddMultipleVariantRules
¶ Adds given variant rules in case of multiple variant rules to
NXOpen.PDM.VariantConfigurationBuilder
The input contextIds comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID.In case of non-default domain: contextId should contain the multifield keys. e.g. %#MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x
Signature
AddMultipleVariantRules(contextIds, variantRules)
Parameters: - contextIds (list of str) – context id comprising of multifield key and itemRev_id in which variant rule resides
- variantRules (list of str) – variant rules of corresponding context ids to be added
New in version NX9.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
AskAvailableVariantRules¶
-
VariantConfigurationBuilder.
AskAvailableVariantRules
¶ Returns the saved variant rules for the give context ID The input contextId: In case of default domain: it should be Teamcenter item ID.
In case of non-default domain: it should be the multifield key. e.g. %#MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x
Signature
AskAvailableVariantRules(contextId, revId)
Parameters: - contextId (str) – multifield key in case of product assembly or collaborative design id
- revId (str) – itemRev_id in case of product assembly
Returns: variant rules from the given context
Return type: list of str
New in version NX9.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetVariantRuleTableInformation¶
-
VariantConfigurationBuilder.
GetVariantRuleTableInformation
¶ Returns selected variant rules stored inside
NXOpen.PDM.VariantConfigurationBuilder
The input contextIds comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID.In case of non-default domain: contextId should contain the multifield keys. e.g. %#MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x
Signature
GetVariantRuleTableInformation()
Returns: a tuple Return type: A tuple consisting of (contextIds, variantRules). contextIds is a list of str. array of contextIds comprising of multifield key and itemRev_id from which variant rules are selected variantRules is a list of str. array of selected variant rules New in version NX9.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RemoveVariantRule¶
-
VariantConfigurationBuilder.
RemoveVariantRule
¶ Removes the given variant rule from
NXOpen.PDM.VariantConfigurationBuilder
if applicable The input contextId comprising of multifield key and itemRev_id: In case of default domain: contextId should contain Teamcenter item ID.In case of non-default domain: contextId should contain the multifield keys. e.g. %#MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x
Signature
RemoveVariantRule(contextId, variantRule)
Parameters: - contextId (str) – context id comprising of multifield key and itemRev_id in which variant rule resides
- variantRule (str) – variant rule to be removed
New in version NX9.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Validate¶
-
VariantConfigurationBuilder.
Validate
¶ Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.
Signature
Validate()
Returns: Was self validation successful Return type: bool New in version NX3.0.1.
License requirements: None.