InstanceSelectionCriteria Class¶
-
class
NXOpen.PartFamily.
InstanceSelectionCriteria
¶ Bases:
NXOpen.TaggedObject
Represents the selection criteria of a part family instance
Use
NXOpen.Assemblies.Component.CreateEmptyPartFamilyInstanceSelectionCriteria
to get an instance of this class.New in version NX9.0.0.
Properties¶
Property | Description |
---|---|
Family | Returns the NXOpen.PartFamily.Template that corresponds to this criteria object |
Instance | Returns the NXOpen.PartFamily.Instance of criteria. |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
GetCriteriaStrings | Obtains the criteria strings associated with this selection criteria. |
IsValidPartFamilyInstanceSelectionCriteria | Returns true if the selection criteria evaluates to a valid part family instance, false otherwise. |
SetPartFamilyInstanceSelectionCriteria | Sets criteria on NXOpen.PartFamily.InstanceSelectionCriteria . |
Property Detail¶
Family¶
-
InstanceSelectionCriteria.
Family
¶ Returns the
NXOpen.PartFamily.Template
that corresponds to this criteria object-------------------------------------
Getter Method
Signature
Family()
Returns: Return type: NXOpen.PartFamily.Template
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
Instance¶
-
InstanceSelectionCriteria.
Instance
¶ Returns the
NXOpen.PartFamily.Instance
of criteria.-------------------------------------
Getter Method
Signature
Instance()
Returns: Return type: NXOpen.PartFamily.Instance
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
Method Detail¶
GetCriteriaStrings¶
-
InstanceSelectionCriteria.
GetCriteriaStrings
¶ Obtains the criteria strings associated with this selection criteria.
Output “criteriaStringArray” would be an array of TEXT_pc_t with each element of the form for e.g. “p7 > 100”, where “p7” is the attribute, “100” the value and “>” the expression connecting both
Signature
GetCriteriaStrings()
Returns: Return type: list of str New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
IsValidPartFamilyInstanceSelectionCriteria¶
-
InstanceSelectionCriteria.
IsValidPartFamilyInstanceSelectionCriteria
¶ Returns true if the selection criteria evaluates to a valid part family instance, false otherwise.
Signature
IsValidPartFamilyInstanceSelectionCriteria()
Returns: Return type: bool New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
SetPartFamilyInstanceSelectionCriteria¶
-
InstanceSelectionCriteria.
SetPartFamilyInstanceSelectionCriteria
¶ Overloaded method SetPartFamilyInstanceSelectionCriteria
SetPartFamilyInstanceSelectionCriteria(attributes, criteriaStringArray)
SetPartFamilyInstanceSelectionCriteria(memberName)
-------------------------------------
Sets criteria on
NXOpen.PartFamily.InstanceSelectionCriteria
. This criteria can be used while adding a part family member to assembly. Number of elements in “attributes” and “criteriaStringArray” should always match the “attributeCount”. “criteriaStringArray” has to be an array of TEXT_pc_t with each element of the form for e.g. “p7 >= 100”, where “p7” is the attribute, “100” the value and “>=” the expression connecting bothSignature
SetPartFamilyInstanceSelectionCriteria(attributes, criteriaStringArray)
Parameters: - attributes (list of
NXOpen.PartFamily.FamilyAttribute
) – - criteriaStringArray (list of str) –
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
-------------------------------------
Sets criteria on
NXOpen.PartFamily.InstanceSelectionCriteria
. This routine can be used when user wants to add a part family member to assembly directly using the “memberName” instead of using attribute criteria. This “memberName” will be ignored in case the InstenaceSelectionCriteria already has any valid attribute criteria or if the user adds a valid attribute criteria later on. User could obtain valid “memberName” usingNXOpen.PartFamily.Template.GetMembers
.Signature
SetPartFamilyInstanceSelectionCriteria(memberName)
Parameters: memberName (str) – New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
-------------------------------------