Component Class¶
-
class
NXOpen.Assemblies.
Component
¶ Bases:
NXOpen.DisplayableObject
,NXOpen.Routing.ICharacteristic
Represents a component in a
NXOpen.Assemblies.ComponentAssembly
.Note that a Component is an occurrence whose prototype is a
NXOpen.Part
. SeeNXOpen.NXObject.Prototype
.Components are arranged in a tree, with each component having a single parent, and one or more children. The top of the tree is the Root Component (see
NXOpen.Assemblies.ComponentAssembly.RootComponent
which has a None parent. The components below the root are referred to as “Top Level” components, which represent the component parts that have been added directly to the ComponentAssembly. (CallingNXOpen.Assemblies.ComponentAssembly.AddComponent
will create a new Top Level component.) Components beneath the top level represent components defined in sub-assemblies of the main assembly.New in version NX3.0.0.
Properties¶
Property | Description |
---|---|
CollaborativeContentType | Returns the collaborative content type of this component. |
Color | Returns or sets the color of the object. |
DesignElementRevision | Returns the NXOpen.PDM.DesignElementRevision that corresponds to this component. |
DesignSubordinateRevision | Returns the NXOpen.PDM.DesignSubordinateRevision that corresponds to this component. |
DirectOwner | Returns the NXOpen.Assemblies.ComponentAssembly which owns this component as a Top Level component. |
DisplayName | Returns the displayable name of the prototype part. |
EmptyPartRefsetName | Returns the name of the reference set which represents the empty set. |
EntirePartRefsetName | Returns the name of the reference set which represents the entire part. |
FixConstraint | Returns a fix NXOpen.Positioning.ComponentConstraint of this component. |
IsBlanked | Returns the blank status of this object. |
IsFixed | Returns the fixed state of this component. |
IsOccurrence | Returns whether this object is an occurrence or not. |
IsSuppressed | Returns the suppressed state of the component in its controlling arrangement. |
JournalIdentifier | Returns the identifier that would be recorded in a journal for this object. |
Layer | Returns or sets the layer that the object is in. |
LineFont | Returns or sets the line font of the object. |
LineWidth | Returns or sets the line width of the object. |
Name | Returns the custom name of the object. |
NameLocation | Returns the location of the object’s name. |
OwningComponent | Returns the owning component, if this object is an occurrence. |
OwningPart | Returns the owning part of this object |
Parent | Returns the parent of the component. |
Prototype | Returns the prototype of this object if it is an occurrence. |
ReferenceSet | Returns the name of the reference set used for this component |
Subset | Returns the NXOpen.Assemblies.Subset that corresponds to this component. |
SuppressingArrangement | Returns the NXOpen.Assemblies.Arrangement that controls this component’s suppression state. |
Tag | Returns the Tag for this object. |
UsedArrangement | Returns the Arrangement used for this component. |
Methods¶
Method | Description |
---|---|
Blank | Blanks the object. |
CreateEmptyPartFamilyInstanceSelectionCriteria | Creates an empty NXOpen.PartFamily.InstanceSelectionCriteria @return |
DeleteAllAttributesByType | Deletes all attributes of a specific type. |
DeleteAttributeByTypeAndTitle | Deletes an attribute by type and title. |
DeleteCharacterstics | Removes the input list of characteristics from this object. |
DeleteInstanceUserAttribute | Deletes the first attribute encountered with the given Type, Title and Index. |
DeleteInstanceUserAttributes | Deletes the attributes encountered with the given Type with option to update or not. |
DeletePartFamilyInstanceSelectionCriteria | Deletes NXOpen.PartFamily.InstanceSelectionCriteria associated with this component |
DeleteUserAttribute | Deletes the first attribute encountered with the given Type, Title. |
DeleteUserAttributes | Deletes the attributes encountered with the given Type with option to update or not. |
DisplayComponentsExact | Sets an array of components to display using the exact representation. |
DisplayComponentsLightweight | Sets an array of components to display using the lightweight representation. |
EstablishIsolatedPositionOverride | Ensures there is an isolated positioning override for the NXOpen.Assemblies.Component in the given part of the given parent. |
EstablishPositionOverride | Ensures there is a positioning override on component in the given part of the given parent. |
FindObject | Finds the NXOpen.NXObject with the given identifier as recorded in a journal. |
FindOccurrence | Given a prototype object, returns the corresponding occurrence in this component @return the occurrence of the prototype in this component |
GetAsRequiredQuantity | Gets the as-required quantity on this component. |
GetAttributeTitlesByType | Gets all the attribute titles of a specific type. |
GetBooleanUserAttribute | Gets a boolean attribute by Title and array Index. |
GetCharacteristics | Get all of the characteristics values on the this object. |
GetChildren | Returns the child components of this component However, it does not return non-geometric components (NGCs) To enable this method to also return NGCs, set the following environment variable: UGII_ALLOW_NGC_IN_UGOPEN=YES @return |
GetComponentQuantityType | Gets the quantity type of the components. |
GetComponentRepresentationMode | Returns the representation mode for the component’s bodies. |
GetComputationalTimeUserAttribute | Gets a time attribute by Title and array Index. |
GetConstraints | Returns the :py:class:`NXOpen.Positioning.ComponentConstraint`s directly connected to this component. |
GetDegreesOfFreedom | Returns the NXOpen.Assemblies.DegreesOfFreedom for this component. |
GetDestinationCharacteristics | Returns the destination characteristics from the input object. |
GetInstanceBooleanUserAttribute | Gets a boolean attribute by Title and array Index. |
GetInstanceIntegerUserAttribute | Gets an integer attribute by Title and array Index. |
GetInstanceRealUserAttribute | Gets a real attribute by Title and array Index. |
GetInstanceStringUserAttribute | Gets a string attribute by Title and array Index. |
GetInstanceTimeUserAttribute | Gets a time attribute by Title and array Index. |
GetInstanceUserAttribute | Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index. |
GetInstanceUserAttributeAsString | Gets the first attribute encountered on the object, if any, with a given title, type and array index. |
GetInstanceUserAttributeLock | Determine the lock of the given attribute. |
GetInstanceUserAttributes | Gets all the attributes that have been set on the given object. |
GetInstanceUserAttributesAsStrings | Gets all the attributes that have been set on the given object. |
GetIntegerAttribute | Gets an integer attribute by title. |
GetIntegerCharacteristic | Get the value of an integer characteristic associated with the input name. |
GetIntegerQuantity | Gets the value of the integer quantity of component. |
GetIntegerUserAttribute | Gets an integer attribute by Title and array Index. |
GetLayerOption | Gets the layer option. |
GetNonGeometricState | Gets the component state as Geometric or Non-Geometric. |
GetPartFamilyInstanceSelectionCriteria | Obtains the:py:class:NXOpen.PartFamily.InstanceSelectionCriteria, if it exists. |
GetPosition | Gets the position of a component |
GetPositionOverrideParent | Find the highest level parent in which the position of component is overridden. |
GetPositionOverrideType | Gets the type of the highest level positioning override on the component. |
GetRealAttribute | Gets a real attribute by title. |
GetRealCharacteristic | Get the value of a real characteristic associated with the input name. |
GetRealQuantity | Gets the value of real quantity and corresponding units on this component. |
GetRealUserAttribute | Gets a real attribute by Title and array Index. |
GetReferenceAttribute | Gets the reference string (not the calculated value) of a string attribute that uses a reference string. |
GetStringAttribute | Gets a string attribute value by title. |
GetStringCharacteristic | Get the value of a string characteristic associated with the input name. |
GetStringUserAttribute | Gets a string attribute by Title and array Index. |
GetTimeAttribute | Gets a time attribute by title. |
GetTimeUserAttribute | Gets a time attribute by Title and array Index. |
GetUserAttribute | Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index. |
GetUserAttributeAsString | Gets the first attribute encountered on the object, if any, with a given title, type and array index. |
GetUserAttributeCount | Gets the count of set attributes on the object, if any, of the given type. |
GetUserAttributeLock | Determine the lock of the given attribute. |
GetUserAttributeSize | Gets the size of the first attribute encountered on the object, if any, with a given Title and Type. |
GetUserAttributeSourceObjects | Returns an array of objects from which this object presents attributes. |
GetUserAttributes | Gets all the attributes that have been set on the given object. |
GetUserAttributesAsStrings | Gets all the attributes that have been set on the given object. |
HasInstanceUserAttribute | Determines if and attribute with the given Title, Type and array Index is present on the object If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). |
HasUserAttribute | Determines if an attribute with the given Title, Type and array Index is present on the object Unset attributes will not be detected by this function, as its purpose is to test for the actual presence of the attribute on the object. |
Highlight | Highlights the object. |
IsPositioningIsolated | Get whether positioning for the selected NXOpen.Assemblies.Component is isolated in the specified NXOpen.Assemblies.Arrangement . |
Prints a representation of this object to the system log file. | |
RecallAndListConstraints | Recalls the :py:class:`NXOpen.Positioning.ComponentConstraint`s previously remembered on the part of this component, creating new constraints from them. |
RecallConstraints | Recalls the :py:class:`NXOpen.Positioning.ComponentConstraint`s previously remembered on the part of this component, creating new constraints from them. |
RedisplayObject | Redisplays the object in all views. |
RemovePositionOverride | Removes the highest level positioning override on component in or below the given parent. |
RemoveRememberedConstraints | Remove all the remembered constraints stored on the part of this component. |
RemoveViewDependency | Remove dependency on all views from an object. |
SetAttribute | Creates or modifies an integer attribute. |
SetBooleanUserAttribute | Creates or modifies a boolean attribute with the option to update or not. |
SetCharacteristic | Set the value of an integer characteristic associated with the input name, adds a new characteristic to the list if one doesn’t exist already. |
SetCharacteristics | Set all of the characteristics values on this object. |
SetInstanceBooleanUserAttribute | Creates or modifies a boolean attribute with the option to update or not. |
SetInstanceTimeUserAttribute | Creates or modifies a time attribute with the option to update or not. |
SetInstanceUserAttribute | Creates or modifies an attribute with the option to update or not. |
SetInstanceUserAttributeLock | Lock or unlock the given attribute. |
SetLayerOption | Sets the layer option. |
SetName | Sets the custom name of the object. |
SetNameLocation | Sets the location of the object’s name. |
SetPartFamilyInstanceSelectionCriteria | Hooks NXOpen.PartFamily.InstanceSelectionCriteria to this component |
SetPositioningIsolated | Set positioning for the selected NXOpen.Assemblies.Component as isolated in the specified NXOpen.Assemblies.Arrangement . |
SetPositioningVaried | Set positioning for the selected :py:class:`NXOpen.Assemblies.Component`s across all possible :py:class:`NXOpen.Assemblies.Arrangement`s. |
SetReferenceAttribute | Creates or modifies a string attribute which uses a reference string. |
SetTimeAttribute | Creates or modifies a time attribute. |
SetTimeUserAttribute | Creates or modifies a time attribute with the option to update or not. |
SetUsedArrangement | Changes the Arrangement used for this component. |
SetUserAttribute | Creates or modifies an attribute with the option to update or not. |
SetUserAttributeLock | Lock or unlock the given attribute. |
Suppress | Suppresses the component in the ComponentAssembly that contains its controlling Arrangement. |
Unblank | Unblanks the object. |
Unhighlight | Unhighlights the object. |
Unsuppress | Unsuppresses the component in the ComponentAssembly that contains its controlling Arrangement. |
UpdateStructure | Update the assembly structure for this assembly in the context of the displayed part to the specified number of levels, ignoring components already processed by previous calls. |
Enumerations¶
ComponentRepresentationMode Enumeration | Representation status of a component |
Property Detail¶
CollaborativeContentType¶
-
Component.
CollaborativeContentType
¶ Returns the collaborative content type of this component.
-------------------------------------
Getter Method
Signature
CollaborativeContentType()
Returns: Return type: NXOpen.Assemblies.CollaborativeContentType
New in version NX8.5.0.
License requirements: None.
DesignElementRevision¶
-
Component.
DesignElementRevision
¶ Returns the
NXOpen.PDM.DesignElementRevision
that corresponds to this component.This can be None if the component is not a design element. This will return parent reuse design element revision if this component represent a
NXOpen.PDM.DesignSubordinateRevision
.-------------------------------------
Getter Method
Signature
DesignElementRevision()
Returns: Return type: NXOpen.PDM.DesignElementRevision
New in version NX8.5.0.
License requirements: None.
DesignSubordinateRevision¶
-
Component.
DesignSubordinateRevision
¶ Returns the
NXOpen.PDM.DesignSubordinateRevision
that corresponds to this component.This can be None if the component is not a subordinate design element.
-------------------------------------
Getter Method
Signature
DesignSubordinateRevision()
Returns: Return type: NXOpen.PDM.DesignSubordinateRevision
New in version NX8.5.0.
License requirements: None.
DirectOwner¶
-
Component.
DirectOwner
¶ Returns the
NXOpen.Assemblies.ComponentAssembly
which owns this component as a “Top Level” component.For components in a multi-level assembly, this is NOT the same the part that owns this component object. I.e. it is not the same as calling: <code> NXOpen.NXObject.OwningPart:py:meth:`NXOpen.NXObject.OwningPart`() </code> <code> NXOpen.BasePart.ComponentAssembly:py:meth:`NXOpen.BasePart.ComponentAssembly`() </code>
-------------------------------------
Getter Method
Signature
DirectOwner()
Returns: The owning ComponentAssembly Return type: NXOpen.Assemblies.ComponentAssembly
New in version NX3.0.0.
License requirements: None.
DisplayName¶
-
Component.
DisplayName
¶ Returns the displayable name of the prototype part.
-------------------------------------
Getter Method
Signature
DisplayName()
Returns: The displayable name of the prototype part Return type: str New in version NX4.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
EmptyPartRefsetName¶
-
Component.
EmptyPartRefsetName
¶ Returns the name of the reference set which represents the empty set.
This can be used as a parameter to
NXOpen.Assemblies.ComponentAssembly.ReplaceReferenceSet
.-------------------------------------
Getter Method
Signature
EmptyPartRefsetName()
Returns: The name of the “Empty” reference set Return type: str New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
EntirePartRefsetName¶
-
Component.
EntirePartRefsetName
¶ Returns the name of the reference set which represents the entire part.
This can be used as a parameter to
NXOpen.Assemblies.ComponentAssembly.ReplaceReferenceSet
.-------------------------------------
Getter Method
Signature
EntirePartRefsetName()
Returns: The name of the “Entire Part” reference set Return type: str New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
FixConstraint¶
-
Component.
FixConstraint
¶ Returns a fix
NXOpen.Positioning.ComponentConstraint
of this component.The constraint may be suppressed or None. If the part controlling the position of this component is not loaded then None will be returned.
-------------------------------------
Getter Method
Signature
FixConstraint()
Returns: A fix constraint Return type: NXOpen.Positioning.ComponentConstraint
New in version NX5.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
IsFixed¶
-
Component.
IsFixed
¶ Returns the fixed state of this component.
True if there is an unsuppressed
NXOpen.Positioning.ComponentConstraint
fix constraint on this component and false otherwise. If the part controlling the position of this component is not loaded then false will be returned.-------------------------------------
Getter Method
Signature
IsFixed()
Returns: True if the component is fixed, false otherwise Return type: bool New in version NX5.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
IsOccurrence¶
-
Component.
IsOccurrence
¶ Returns whether this object is an occurrence or not.
-------------------------------------
Getter Method
Signature
IsOccurrence()
Returns: This object is an occurrence Return type: bool New in version NX3.0.0.
License requirements: None.
IsSuppressed¶
-
Component.
IsSuppressed
¶ Returns the suppressed state of the component in its controlling arrangement.
(See
NXOpen.Assemblies.Component.SuppressingArrangement
.)-------------------------------------
Getter Method
Signature
IsSuppressed()
Returns: True if the component is suppressed, false otherwise Return type: bool New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
JournalIdentifier¶
-
Component.
JournalIdentifier
¶ Returns the identifier that would be recorded in a journal for this object.
This may not be the same across different releases of the software.
-------------------------------------
Getter Method
Signature
JournalIdentifier()
Returns: Return type: str New in version NX3.0.0.
License requirements: None.
Name¶
-
Component.
Name
¶ Returns the custom name of the object.
-------------------------------------
Getter Method
Signature
Name()
Returns: Return type: str New in version NX3.0.0.
License requirements: None.
OwningComponent¶
-
Component.
OwningComponent
¶ Returns the owning component, if this object is an occurrence.
-------------------------------------
Getter Method
Signature
OwningComponent()
Returns: Return type: NXOpen.Assemblies.Component
New in version NX3.0.0.
License requirements: None.
OwningPart¶
-
Component.
OwningPart
¶ Returns the owning part of this object
-------------------------------------
Getter Method
Signature
OwningPart()
Returns: The owning part of this object or null if it does not have an owner Return type: NXOpen.BasePart
New in version NX3.0.0.
License requirements: None.
Parent¶
-
Component.
Parent
¶ Returns the parent of the component.
For the root component of an assembly, this will be None. See
NXOpen.Assemblies.ComponentAssembly.RootComponent
.-------------------------------------
Getter Method
Signature
Parent()
Returns: The parent component Return type: NXOpen.Assemblies.Component
New in version NX3.0.0.
License requirements: None.
Prototype¶
-
Component.
Prototype
¶ Returns the prototype of this object if it is an occurrence.
-------------------------------------
Getter Method
Signature
Prototype()
Returns: The prototype of this object or null if this object is not an occurrence Return type: NXOpen.INXObject
New in version NX3.0.0.
License requirements: None.
ReferenceSet¶
-
Component.
ReferenceSet
¶ Returns the name of the reference set used for this component
-------------------------------------
Getter Method
Signature
ReferenceSet()
Returns: The name of the component’s reference set Return type: str New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Subset¶
-
Component.
Subset
¶ Returns the
NXOpen.Assemblies.Subset
that corresponds to this component.This can be None if the component is not a subset.
-------------------------------------
Getter Method
Signature
Subset()
Returns: The subset Return type: NXOpen.Assemblies.Subset
New in version NX8.5.0.
License requirements: None.
SuppressingArrangement¶
-
Component.
SuppressingArrangement
¶ Returns the
NXOpen.Assemblies.Arrangement
that controls this component’s suppression state.The controlling Arrangement will be defined in a
NXOpen.Assemblies.ComponentAssembly
in the tree above this Component.Note: In the current release, Arrangements are only used for controlling a component’s suppression state. In future releases, further attributes will be controlled via Arrangements.
-------------------------------------
Getter Method
Signature
SuppressingArrangement()
Returns: The NXOpen.Assemblies.Arrangement
controlling this component’ssuppression state. This will be None if the assembly containing the arrangement is not loaded. :rtype:
NXOpen.Assemblies.Arrangement
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
UsedArrangement¶
-
Component.
UsedArrangement
¶ Returns the Arrangement used for this component.
See
NXOpen.Assemblies.Component.SetUsedArrangement
-------------------------------------
Getter Method
Signature
UsedArrangement()
Returns: The Arrangement used for this component. This will be None if the component does not have any children.
Return type: NXOpen.Assemblies.Arrangement
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Method Detail¶
CreateEmptyPartFamilyInstanceSelectionCriteria¶
-
Component.
CreateEmptyPartFamilyInstanceSelectionCriteria
¶ Creates an empty
NXOpen.PartFamily.InstanceSelectionCriteria
Signature
CreateEmptyPartFamilyInstanceSelectionCriteria(family)
Parameters: family ( NXOpen.PartFamily.Template
) –Returns: Return type: NXOpen.PartFamily.InstanceSelectionCriteria
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
DeleteCharacterstics¶
-
Component.
DeleteCharacterstics
¶ Removes the input list of characteristics from this object.
Signature
DeleteCharacterstics(values)
Parameters: values ( NXOpen.Routing.CharacteristicList
) –New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
DeleteInstanceUserAttribute¶
-
Component.
DeleteInstanceUserAttribute
¶ Deletes the first attribute encountered with the given Type, Title and Index.
If a candidate attribute is not an array attribute, the DeleteEntireArray input is ignored, otherwise the last element of the array is deleted. NOTE: This method does not support the use of
NXOpen.NXObjectAttributeType.Reference
.Signature
DeleteInstanceUserAttribute(type, title, deleteEntireArray, option)
Parameters: - type (
NXOpen.NXObjectAttributeType
) – - title (str) –
- deleteEntireArray (bool) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
- type (
DeleteInstanceUserAttributes¶
-
Component.
DeleteInstanceUserAttributes
¶ Deletes the attributes encountered with the given Type with option to update or not.
NOTE: This method does not support the use of
NXOpen.NXObjectAttributeType.Reference
.Signature
DeleteInstanceUserAttributes(type, option)
Parameters: - type (
NXOpen.NXObjectAttributeType
) – - option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
- type (
DeletePartFamilyInstanceSelectionCriteria¶
-
Component.
DeletePartFamilyInstanceSelectionCriteria
¶ Deletes
NXOpen.PartFamily.InstanceSelectionCriteria
associated with this componentSignature
DeletePartFamilyInstanceSelectionCriteria()
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
DisplayComponentsExact¶
-
Component.
DisplayComponentsExact
¶ Sets an array of components to display using the exact representation.
Signature
DisplayComponentsExact(components)
Parameters: components (list of NXOpen.Assemblies.Component
) – Array of componets to be set to exactReturns: list of errors encountered during the display as exact Return type: NXOpen.ErrorList
New in version NX7.5.0.
License requirements: gateway (“UG GATEWAY”)
DisplayComponentsLightweight¶
-
Component.
DisplayComponentsLightweight
¶ Sets an array of components to display using the lightweight representation.
Signature
DisplayComponentsLightweight(components)
Parameters: components (list of NXOpen.Assemblies.Component
) – Array of components to be set to lightweightReturns: list of errors encountered during the display as lightweight Return type: NXOpen.ErrorList
New in version NX7.5.0.
License requirements: gateway (“UG GATEWAY”)
EstablishIsolatedPositionOverride¶
-
Component.
EstablishIsolatedPositionOverride
¶ Ensures there is an isolated positioning override for the
NXOpen.Assemblies.Component
in the given part of the given parent.This method does nothing if the
NXOpen.Assemblies.Component
already has an isolated positioning override in the parent, or if any necessary data is unloaded.If parent is None, the isolated positioning override will be created in the same part as the
NXOpen.Assemblies.Component
.Signature
EstablishIsolatedPositionOverride(parent, arrangement)
Parameters: - parent (
NXOpen.Assemblies.Component
) – The parent of theNXOpen.Assemblies.Component
in which the override is to be created - arrangement (
NXOpen.Assemblies.Arrangement
) – TheNXOpen.Assemblies.Arrangement
in which to create the isolated position override. ThisNXOpen.Assemblies.Arrangement
must be an isolatedNXOpen.Assemblies.Arrangement
.
New in version NX9.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
- parent (
EstablishPositionOverride¶
-
Component.
EstablishPositionOverride
¶ Ensures there is a positioning override on component in the given part of the given parent.
This method does nothing if the component already has a positioning override in the parent, or if any necessary data is unloaded.
If parent is None, the positioning override will be created in the same part as the
NXOpen.Assemblies.Component
.Signature
EstablishPositionOverride(parent)
Parameters: parent ( NXOpen.Assemblies.Component
) – The parent of the component in which the override is to be createdNew in version NX7.5.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
FindObject¶
-
Component.
FindObject
¶ Finds the
NXOpen.NXObject
with the given identifier as recorded in a journal.An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.
An exception will be thrown if no object can be found with the given journal identifier.
Signature
FindObject(journalIdentifier)
Parameters: journalIdentifier (str) – Journal identifier of the object Returns: Return type: NXOpen.INXObject
New in version NX3.0.0.
License requirements: None.
FindOccurrence¶
-
Component.
FindOccurrence
¶ Given a prototype object, returns the corresponding occurrence in this component
Signature
FindOccurrence(proto)
Parameters: proto ( NXOpen.NXObject
) – the prototypeReturns: the occurrence of the prototype in this component Return type: NXOpen.NXObject
New in version NX3.0.0.
License requirements: None.
GetAsRequiredQuantity¶
-
Component.
GetAsRequiredQuantity
¶ Gets the as-required quantity on this component.
Signature
GetAsRequiredQuantity()
Returns: As-Required string “A/R” Return type: str New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetCharacteristics¶
-
Component.
GetCharacteristics
¶ Get all of the characteristics values on the this object.
Signature
GetCharacteristics()
Returns: Return type: NXOpen.Routing.CharacteristicList
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
GetChildren¶
-
Component.
GetChildren
¶ Returns the child components of this component However, it does not return non-geometric components (NGCs) To enable this method to also return NGCs, set the following environment variable: UGII_ALLOW_NGC_IN_UGOPEN=YES
Signature
GetChildren()
Returns: Return type: list of NXOpen.Assemblies.Component
New in version NX3.0.0.
License requirements: None.
GetComponentQuantityType¶
-
Component.
GetComponentQuantityType
¶ Gets the quantity type of the components.
Returns
NXOpen.Assemblies.ComponentQuantity
.Signature
GetComponentQuantityType()
Returns: Quantity type an enumeration value Return type: NXOpen.Assemblies.ComponentQuantity
New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetComponentRepresentationMode¶
-
Component.
GetComponentRepresentationMode
¶ Returns the representation mode for the component’s bodies.
This mode is dependent on the currently used reference set for the component.
Signature
GetComponentRepresentationMode()
Returns: The mode for the components display. An enumeration value. Return type: NXOpen.Assemblies.ComponentRepresentationMode
New in version NX7.5.0.
License requirements: None.
GetConstraints¶
-
Component.
GetConstraints
¶ Returns the :py:class:`NXOpen.Positioning.ComponentConstraint`s directly connected to this component.
If the part containing those constraints is not loaded then no constraints will be returned.
Signature
GetConstraints()
Returns: Constraints directly connected to this component Return type: list of NXOpen.Positioning.ComponentConstraint
New in version NX5.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetDegreesOfFreedom¶
-
Component.
GetDegreesOfFreedom
¶ Overloaded method GetDegreesOfFreedom
GetDegreesOfFreedom()
GetDegreesOfFreedom(components)
-------------------------------------
Returns the
NXOpen.Assemblies.DegreesOfFreedom
for this component. Any constraints that reference unloaded data are ignored in the degrees of freedom calculation. An example would be if a constraint was referencing geometry in an unloaded component. When this occurs there may be a greater number of degrees of freedom than if all the data were loaded.Signature
GetDegreesOfFreedom()
Returns: The degrees of freedom of this component. Return type: NXOpen.Assemblies.DegreesOfFreedom
New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
Returns the
NXOpen.Assemblies.DegreesOfFreedom
for this component. The degrees of freedom are found relative to the components passed in. Those components are regarded as fixed and only constraints directly connecting this component with those in the array are considered.Note that any directly connected constraints that reference unloaded data are ignored in the degrees of freedom calculation. An example would be if a constraint was referencing geometry in an unloaded component. When this occurs there may be a greater number of degrees of freedom than if all the data were loaded.
Signature
GetDegreesOfFreedom(components)
Parameters: components (list of NXOpen.Assemblies.Component
) – Components relative to which the degrees of freedom will be found.Returns: The degrees of freedom of this component. Return type: NXOpen.Assemblies.DegreesOfFreedom
New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
GetDestinationCharacteristics¶
-
Component.
GetDestinationCharacteristics
¶ Returns the destination characteristics from the input object.
Retrieves the description of which destination characteristics to read from the application view and then reads those destination characteristics from the object
- Ports: Reads characteristics from the port.
- RCPs: Attempts to find a port at the RCP, reads characteristics from
the port if it exists, otherwise reads from the stock associated with the rcp.
- Segments: Reads characteristics from the stock associated with the segment.
- Components: Reads characteristics directly from the component.
- Stock: Reads characteristics from the stock or from the stock’s data.
Signature
GetDestinationCharacteristics()
Returns: Return type: NXOpen.Routing.CharacteristicList
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
GetInstanceBooleanUserAttribute¶
-
Component.
GetInstanceBooleanUserAttribute
¶ Gets a boolean attribute by Title and array Index.
If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
.Signature
GetInstanceBooleanUserAttribute(title, index)
Parameters: - title (str) –
- index (int) –
Returns: Return type: bool
New in version NX8.0.0.
License requirements: None.
GetInstanceIntegerUserAttribute¶
-
Component.
GetInstanceIntegerUserAttribute
¶ Gets an integer attribute by Title and array Index.
If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
.Signature
GetInstanceIntegerUserAttribute(title, index)
Parameters: - title (str) –
- index (int) –
Returns: Return type: int
New in version NX8.0.0.
License requirements: None.
GetInstanceRealUserAttribute¶
-
Component.
GetInstanceRealUserAttribute
¶ Gets a real attribute by Title and array Index.
If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
.Signature
GetInstanceRealUserAttribute(title, index)
Parameters: - title (str) –
- index (int) –
Returns: Return type: float
New in version NX8.0.0.
License requirements: None.
GetInstanceStringUserAttribute¶
-
Component.
GetInstanceStringUserAttribute
¶ Gets a string attribute by Title and array Index.
For reference type string attributes, the calculated StringValue is returned. If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
. Gets a string attribute value by title.Signature
GetInstanceStringUserAttribute(title, index)
Parameters: - title (str) –
- index (int) –
Returns: Return type: str
New in version NX8.0.0.
License requirements: None.
GetInstanceTimeUserAttribute¶
-
Component.
GetInstanceTimeUserAttribute
¶ Gets a time attribute by Title and array Index.
The date format set by the Customer Defaults is used. If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
. Gets a time attribute by title.Signature
GetInstanceTimeUserAttribute(title, index)
Parameters: - title (str) –
- index (int) –
Returns: Return type: str
New in version NX8.0.0.
License requirements: None.
GetInstanceUserAttribute¶
-
Component.
GetInstanceUserAttribute
¶ Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributes
. The date format set by the Customer Defaults is used for attributes of type time. NOTE: This method does not support the use ofNXOpen.NXObjectAttributeType.Reference
. Instead, useNXOpen.NXObjectAttributeType.String
. For reference type string attributes, both the ReferenceValue and the calculated StringValue are returned.Signature
GetInstanceUserAttribute(title, type, index)
Parameters: - title (str) –
- type (
NXOpen.NXObjectAttributeType
) – - index (int) –
Returns: Return type: New in version NX8.0.0.
License requirements: None.
GetInstanceUserAttributeAsString¶
-
Component.
GetInstanceUserAttributeAsString
¶ Gets the first attribute encountered on the object, if any, with a given title, type and array index.
The value of the attribute is converted to and returned as a string. If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). The first element of an array has Index 0 (zero). To get all the array elements of an array, please use
NXOpen.NXObject.GetUserAttributesAsStrings
. The date format set by the Customer Defaults is used for attributes of type time. NOTE: This method does not support the use ofNXOpen.NXObjectAttributeType.Reference
. Instead, useNXOpen.NXObjectAttributeType.String
. For reference type string attributes, the calculated StringValue is returned.Signature
GetInstanceUserAttributeAsString(title, type, index)
Parameters: - title (str) –
- type (
NXOpen.NXObjectAttributeType
) – - index (int) –
Returns: Return type: str
New in version NX8.0.0.
License requirements: None.
GetInstanceUserAttributeLock¶
-
Component.
GetInstanceUserAttributeLock
¶ Determine the lock of the given attribute.
For array attributes, the Title should be set to the array title, without the appended index. Individual array elements cannot be separately locked
Signature
GetInstanceUserAttributeLock(title, type)
Parameters: - title (str) –
- type (
NXOpen.NXObjectAttributeType
) –
Returns: Return type: bool
New in version NX8.0.0.
License requirements: None.
GetInstanceUserAttributes¶
-
Component.
GetInstanceUserAttributes
¶ Overloaded method GetInstanceUserAttributes
GetInstanceUserAttributes()
GetInstanceUserAttributes(includeUnset)
-------------------------------------
Gets all the attributes that have been set on the given object. The elements of array attributes are returned individually in order of increasing indices. The returned Title of an array element is the array title (without index). The Index data member holds the index. The date format set by the Customer Defaults is used. Reference type attributes are returned as being of type
NXOpen.NXObjectAttributeType.String
, and both the ReferenceValue and the calculated StringValue are returned.Signature
GetInstanceUserAttributes()
Returns: Return type: list of NXOpen.NXObjectAttributeInformation_Struct
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Gets all the attributes that have been set on the given object, as well as information from attribute templates that have not been set (if ‘IncludeUnset’ is ‘true’). The elements of array attributes are returned individually in order of increasing indices. The returned Title of an array element is the array title (without index). The Index data member holds the index. The date format set by the Customer Defaults is used. Reference type attributes are returnes as being of type
NXOpen.NXObjectAttributeType.String
, and both the ReferenceValue and the calculated StringValue are returned.Signature
GetInstanceUserAttributes(includeUnset)
Parameters: includeUnset (bool) – Returns: Return type: list of NXOpen.NXObjectAttributeInformation_Struct
New in version NX8.0.0.
License requirements: None.
-------------------------------------
GetInstanceUserAttributesAsStrings¶
-
Component.
GetInstanceUserAttributesAsStrings
¶ Gets all the attributes that have been set on the given object.
The values are returned as strings. The elements of array attributes are returned individually in order of increasing indices. The returned Title of an array element is the array title (without index). The Index data member holds the index. This method does not support the use of
NXOpen.NXObjectAttributeType.Reference
. Reference type attributes return the calculated StringValue. The date format set by the Customer Defaults is used.Signature
GetInstanceUserAttributesAsStrings()
Returns: Return type: list of str New in version NX8.0.0.
License requirements: None.
GetIntegerCharacteristic¶
-
Component.
GetIntegerCharacteristic
¶ Get the value of an integer characteristic associated with the input name.
Signature
GetIntegerCharacteristic(name)
Parameters: name (str) – NOTE: The full Unicode character set is not supported for this parameter. Returns: Return type: int New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
GetIntegerQuantity¶
-
Component.
GetIntegerQuantity
¶ Gets the value of the integer quantity of component.
Signature
GetIntegerQuantity()
Returns: Integer quantity value Return type: int New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetLayerOption¶
-
Component.
GetLayerOption
¶ Gets the layer option.
This controls which layer the component’s geometry will appear on in its parent part.
Signature
GetLayerOption()
Returns: The layer option of the component in its parent part -1 Means that the component’s geometry has the layer settings defined in its orginal part 1-255 Means the components geometry is on the specified layer
Return type: int New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetNonGeometricState¶
-
Component.
GetNonGeometricState
¶ Gets the component state as Geometric or Non-Geometric.
Signature
GetNonGeometricState()
Returns: True if the component is non-geometric, false otherwise Return type: bool New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetPartFamilyInstanceSelectionCriteria¶
-
Component.
GetPartFamilyInstanceSelectionCriteria
¶ Obtains the:py:class:NXOpen.PartFamily.InstanceSelectionCriteria, if it exists.
Signature
GetPartFamilyInstanceSelectionCriteria()
Returns: Return type: NXOpen.PartFamily.InstanceSelectionCriteria
New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
GetPosition¶
-
Component.
GetPosition
¶ Gets the position of a component
Signature
GetPosition()
Returns: a tuple Return type: A tuple consisting of (position, orientation). position is a NXOpen.Point3d
. The origin of this component orientation is aNXOpen.Matrix3x3
. The orientation of this componentNew in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetPositionOverrideParent¶
-
Component.
GetPositionOverrideParent
¶ Find the highest level parent in which the position of component is overridden.
This will be None if the component is not overridden. It will be the root component if the component is overridden in the same part as itself. It will be None if the position of the component is overridden in a parent assembly which is currently unloaded.
Signature
GetPositionOverrideParent()
Returns: Return type: NXOpen.Assemblies.Component
New in version NX7.5.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetPositionOverrideType¶
-
Component.
GetPositionOverrideType
¶ Gets the type of the highest level positioning override on the component.
Signature
GetPositionOverrideType()
Returns: Return type: NXOpen.Assemblies.PositionOverrideType
New in version NX7.5.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetRealCharacteristic¶
-
Component.
GetRealCharacteristic
¶ Get the value of a real characteristic associated with the input name.
Signature
GetRealCharacteristic(name)
Parameters: name (str) – NOTE: The full Unicode character set is not supported for this parameter. Returns: Return type: float New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
GetRealQuantity¶
-
Component.
GetRealQuantity
¶ Gets the value of real quantity and corresponding units on this component.
Signature
GetRealQuantity()
Returns: a tuple Return type: A tuple consisting of (realQuantity, quantityUnits). realQuantity is a float. Real quantity value quantityUnits is a str. Units New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
GetStringCharacteristic¶
-
Component.
GetStringCharacteristic
¶ Get the value of a string characteristic associated with the input name.
Signature
GetStringCharacteristic(name)
Parameters: name (str) – NOTE: The full Unicode character set is not supported for this parameter. Returns: Return type: str New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
HasInstanceUserAttribute¶
-
Component.
HasInstanceUserAttribute
¶ Determines if and attribute with the given Title, Type and array Index is present on the object If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time).
The first element of an array has Index 0 (zero). NOTE: This method does not support the use of
NXOpen.NXObjectAttributeType.Reference
. Instead, useNXOpen.NXObjectAttributeType.String
.Signature
HasInstanceUserAttribute(title, type, index)
Parameters: - title (str) –
- type (
NXOpen.NXObjectAttributeType
) – - index (int) –
Returns: Return type: bool
New in version NX8.0.0.
License requirements: None.
IsPositioningIsolated¶
-
Component.
IsPositioningIsolated
¶ Get whether positioning for the selected
NXOpen.Assemblies.Component
is isolated in the specifiedNXOpen.Assemblies.Arrangement
.Signature
IsPositioningIsolated(arrangement)
Parameters: arrangement ( NXOpen.Assemblies.Arrangement
) – The specifiedNXOpen.Assemblies.Arrangement
.Returns: Whether positioning for the selected NXOpen.Assemblies.Component
is isolatedin the specified
NXOpen.Assemblies.Arrangement
. :rtype: boolNew in version NX9.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Print¶
-
Component.
Print
¶ Prints a representation of this object to the system log file.
Signature
Print()
New in version NX3.0.0.
License requirements: None.
RecallAndListConstraints¶
-
Component.
RecallAndListConstraints
¶ Recalls the :py:class:`NXOpen.Positioning.ComponentConstraint`s previously remembered on the part of this component, creating new constraints from them.
The new constraints are incomplete and refer to the component.
Signature
RecallAndListConstraints()
Returns: The constraints created by the recall operation Return type: list of NXOpen.Positioning.ComponentConstraint
New in version NX5.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RecallConstraints¶
-
Component.
RecallConstraints
¶ Recalls the :py:class:`NXOpen.Positioning.ComponentConstraint`s previously remembered on the part of this component, creating new constraints from them.
The new constraints are incomplete and refer to the component.
Signature
RecallConstraints()
New in version NX5.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RemovePositionOverride¶
-
Component.
RemovePositionOverride
¶ Removes the highest level positioning override on component in or below the given parent.
parent may be None, in which case the highest level positioning override on component is removed. This method does nothing if there is no positioning override on the component, or if any necessary data is unloaded.
Signature
RemovePositionOverride(parent)
Parameters: parent ( NXOpen.Assemblies.Component
) – The parent of the component in or below which the override is to be removedNew in version NX7.5.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RemoveRememberedConstraints¶
-
Component.
RemoveRememberedConstraints
¶ Remove all the remembered constraints stored on the part of this component.
Signature
RemoveRememberedConstraints()
New in version NX5.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetCharacteristic¶
-
Component.
SetCharacteristic
¶ Overloaded method SetCharacteristic
SetCharacteristic(name, value)
SetCharacteristic(name, value)
SetCharacteristic(name, value)
-------------------------------------
Set the value of an integer characteristic associated with the input name, adds a new characteristic to the list if one doesn’t exist already. Converts the type of an existing characteristic with the same name to integer if it’s type is not integer.
Signature
SetCharacteristic(name, value)
Parameters: - name (str) – NOTE: The full Unicode character set is not supported for this parameter.
- value (int) –
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Set the value of an real characteristic associated with the input name, adds a new characteristic to the list if one doesn’t exist already. Converts the type of an existing characteristic with the same name to real if it’s type is not real.
Signature
SetCharacteristic(name, value)
Parameters: - name (str) – NOTE: The full Unicode character set is not supported for this parameter.
- value (float) –
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Set the value of an string characteristic associated with the input name, adds a new characteristic to the list if one doesn’t exist already. Converts the type of an existing characteristic with the same name to string if it’s type is not string.
Signature
SetCharacteristic(name, value)
Parameters: - name (str) – NOTE: The full Unicode character set is not supported for this parameter.
- value (str) – NOTE: The full Unicode character set is not supported for this parameter.
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
SetCharacteristics¶
-
Component.
SetCharacteristics
¶ Set all of the characteristics values on this object.
Signature
SetCharacteristics(values)
Parameters: values ( NXOpen.Routing.CharacteristicList
) –New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
SetInstanceBooleanUserAttribute¶
-
Component.
SetInstanceBooleanUserAttribute
¶ Creates or modifies a boolean attribute with the option to update or not.
Signature
SetInstanceBooleanUserAttribute(title, index, value, option)
Parameters: - title (str) –
- index (int) –
- value (bool) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
SetInstanceTimeUserAttribute¶
-
Component.
SetInstanceTimeUserAttribute
¶ Creates or modifies a time attribute with the option to update or not.
The time value is assumed to be in the current time zone of the machine running the program. NX will store the value in UTC.
Signature
SetInstanceTimeUserAttribute(title, index, value, option)
Parameters: - title (str) –
- index (int) –
- value (str) – The current date and time is used if the value is None. See
NXOpen.NXObjectDateAndTimeFormat
for valid formats. NOTE: The full Unicode character set is not supported for this parameter. - option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
SetInstanceUserAttribute¶
-
Component.
SetInstanceUserAttribute
¶ Overloaded method SetInstanceUserAttribute
SetInstanceUserAttribute(info, option)
SetInstanceUserAttribute(title, index, value, option)
SetInstanceUserAttribute(title, index, value, option)
SetInstanceUserAttribute(title, index, value, option)
SetInstanceUserAttribute(title, index, option)
-------------------------------------
Creates or modifies an attribute with the option to update or not. NOTE: This method does not support the use of
NXOpen.NXObjectAttributeType.Reference
. Instead, set the type toNXOpen.NXObjectAttributeType.String
and specify a ReferenceValue.The following data members of the Info structure are ignored by this method: Alias Inherited Required Unset Locked
The following data members of an attribute cannot be edited once the attribute is set: Type Title TitleAlias Array ArrayElementIndex The dimensionality of the Unit specification (cannot change from mm to microA, but from mm to cm is fine)
The following data members can be set and modified only if the attribute is not associated with a template: Category
The following data of an attribute can be set if and only if the attribute is not associated with a template. It cannot be modified once set. Array
Signature
SetInstanceUserAttribute(info, option)
Parameters: - info (
NXOpen.NXObjectAttributeInformation_Struct
) – - option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Creates or modifies an integer attribute with the option to update or not.
Signature
SetInstanceUserAttribute(title, index, value, option)
Parameters: - title (str) –
- index (int) –
- value (int) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Creates or modifies a real attribute with the option to update or not.
Signature
SetInstanceUserAttribute(title, index, value, option)
Parameters: - title (str) –
- index (int) –
- value (float) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Creates or modifies a string attribute with the option to update or not.
Signature
SetInstanceUserAttribute(title, index, value, option)
Parameters: - title (str) –
- index (int) –
- value (str) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Creates or modifies a null attribute with the option to update or not.
Signature
SetInstanceUserAttribute(title, index, option)
Parameters: - title (str) –
- index (int) –
- option (
NXOpen.UpdateOption
) –
New in version NX8.0.0.
License requirements: None.
-------------------------------------
SetInstanceUserAttributeLock¶
-
Component.
SetInstanceUserAttributeLock
¶ Lock or unlock the given attribute.
For array attributes, the Title should be set to the array title, without the appended index. Individual array elements cannot be separately locked
Signature
SetInstanceUserAttributeLock(title, type, lock)
Parameters: - title (str) –
- type (
NXOpen.NXObjectAttributeType
) – - lock (bool) –
New in version NX8.0.0.
License requirements: None.
SetLayerOption¶
-
Component.
SetLayerOption
¶ Sets the layer option.
This controls which layer the component’s geometry will appear on in its parent part.
Signature
SetLayerOption(layer)
Parameters: layer (int) – The new layer for this component in its parent part -1 Means use the original layer settings defined in the component’s part. 0 Means use the current work layer 1-255 Means use the specified layer. New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetName¶
-
Component.
SetName
¶ Sets the custom name of the object.
NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.
Signature
SetName(name)
Parameters: name (str) – New in version NX3.0.0.
License requirements: None.
SetPartFamilyInstanceSelectionCriteria¶
-
Component.
SetPartFamilyInstanceSelectionCriteria
¶ Hooks
NXOpen.PartFamily.InstanceSelectionCriteria
to this componentSignature
SetPartFamilyInstanceSelectionCriteria(selectionCriteria)
Parameters: selectionCriteria ( NXOpen.PartFamily.InstanceSelectionCriteria
) –New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”)
SetPositioningIsolated¶
-
Component.
SetPositioningIsolated
¶ Set positioning for the selected
NXOpen.Assemblies.Component
as isolated in the specifiedNXOpen.Assemblies.Arrangement
.The arrangement must be an isolated arrangement defined in the same part as the component.
Signature
SetPositioningIsolated(arrangement)
Parameters: arrangement ( NXOpen.Assemblies.Arrangement
) – TheNXOpen.Assemblies.Arrangement
in which to set positioning as isolated. ThisNXOpen.Assemblies.Arrangement
must be an isolatedNXOpen.Assemblies.Arrangement
.New in version NX9.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetPositioningVaried¶
-
Component.
SetPositioningVaried
¶ Set positioning for the selected :py:class:`NXOpen.Assemblies.Component`s across all possible :py:class:`NXOpen.Assemblies.Arrangement`s.
Positioning can be set to either the same in all :py:class:`NXOpen.Assemblies.Arrangement`s, set_as_varied = FALSE, or individually positioned in each, set_as_varied = TRUE.
Signature
SetPositioningVaried(components, setAsVaried)
Parameters: - components (list of
NXOpen.Assemblies.Component
) – The components whose positioning will be altered. - setAsVaried (bool) – If FALSE components will have same position in all :py:class:`NXOpen.Assemblies.Arrangement`s, TRUE allows the position to be varied.
New in version NX7.5.2.
License requirements: assemblies (“ASSEMBLIES MODULE”)
- components (list of
SetUsedArrangement¶
-
Component.
SetUsedArrangement
¶ Changes the Arrangement used for this component.
If this is the root component (i.e. it has no parent) then this is equivalent to setting the active arrangement in the owner. (See
NXOpen.Assemblies.Component.DirectOwner
andNXOpen.Assemblies.ComponentAssembly.ActiveArrangement
.) For non-root components, this sets the arrangement used for this component in the context of its parent component. Note that this method should only be used for components which have children.Signature
SetUsedArrangement(newArrangement)
Parameters: newArrangement ( NXOpen.Assemblies.Arrangement
) – The newNXOpen.Assemblies.Arrangement
. This Arrangement must be defined in a the ComponentAssembly of this Component’s prototype part.New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Suppress¶
-
Component.
Suppress
¶ Overloaded method Suppress
Suppress()
Suppress(components)
-------------------------------------
Suppresses the component in the ComponentAssembly that contains its controlling Arrangement. The component will be suppressed in all Arrangements in the ComponentAssembly, not just in the controlling arrangement.
This is equivalent to calling:
NXOpen.Assemblies.Component.SuppressingArrangement
NXOpen.Assemblies.Arrangement.Owner
NXOpen.Assemblies.ComponentAssembly.SuppressComponents
Signature
Suppress()
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
Suppresses an array of components in the ComponentAssembly that contains their controlling Arrangement. The component will be suppressed in all Arrangements in the ComponentAssembly.
This is equivalent to calling:
NXOpen.Assemblies.Component.SuppressingArrangement
NXOpen.Assemblies.Arrangement.Owner
And then calling
NXOpen.Assemblies.ComponentAssembly.SuppressComponents
on the component array. Note that all components should have the same suppressing Arrangement.
Signature
Suppress(components)
Parameters: components (list of NXOpen.Assemblies.Component
) – Components to be suppressed. Each component will be suppressed in its controlling arrangement. Note that the components must all be underneath the same assemblyReturns: list of errors encountered during the suppress Return type: NXOpen.ErrorList
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
Unsuppress¶
-
Component.
Unsuppress
¶ Overloaded method Unsuppress
Unsuppress()
Unsuppress(components)
-------------------------------------
Unsuppresses the component in the ComponentAssembly that contains its controlling Arrangement. The component will be unsuppressed in all Arrangements in the ComponentAssembly.
This is equivalent to calling:
NXOpen.Assemblies.Component.SuppressingArrangement
NXOpen.Assemblies.Arrangement.Owner
NXOpen.Assemblies.ComponentAssembly.UnsuppressComponents
Signature
Unsuppress()
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
Unsuppresses an array of components in the ComponentAssembly that contains their controlling Arrangement. The component will be unsuppressed in all Arrangements in the ComponentAssembly. This is equivalent to calling:
NXOpen.Assemblies.Component.SuppressingArrangement
NXOpen.Assemblies.Arrangement.Owner
NXOpen.Assemblies.ComponentAssembly.UnsuppressComponents
on the component array. Note that all components should have the same suppressing Arrangement.
Signature
Unsuppress(components)
Parameters: components (list of NXOpen.Assemblies.Component
) – Components to be unsuppressed. Each component will be unsuppressed in its controlling arrangement. Note that the components must all be underneath the same assemblyReturns: list of errors encountered during the unsuppress Return type: NXOpen.ErrorList
New in version NX3.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
UpdateStructure¶
-
Component.
UpdateStructure
¶ Overloaded method UpdateStructure
UpdateStructure(components, nLevels)
UpdateStructure(components, nLevels, checkComponentsVisited)
-------------------------------------
Update the assembly structure for this assembly in the context of the displayed part to the specified number of levels, ignoring components already processed by previous calls.
Signature
UpdateStructure(components, nLevels)
Parameters: - components (list of
NXOpen.Assemblies.Component
) – Component tags to start update structure from - nLevels (int) – The number of levels to update. If -1 then all levels are updated.
New in version NX4.0.0.
License requirements: gateway (“UG GATEWAY”)
-------------------------------------
Update the assembly structure for this assembly in the context of the displayed part to the specified number of levels.
Signature
UpdateStructure(components, nLevels, checkComponentsVisited)
Parameters: - components (list of
NXOpen.Assemblies.Component
) – Component tags to start update structure from - nLevels (int) – The number of levels to update. If -1 then all levels are updated.
- checkComponentsVisited (bool) – If true, only perform update structure on each component once this session.
New in version NX4.0.1.
License requirements: gateway (“UG GATEWAY”)
-------------------------------------