ComponentCollection Class

class NXOpen.Layout2d.ComponentCollection

Bases: object

Represents a collection of :py:class:`NXOpen.Layout2d.Component`s.

To obtain an instance of this class, refer to NXOpen.Part

New in version NX10.0.0.

OrderManagers”, “Returns the OrderManager for part “

Methods

Method Description
CreateAssemblyFromLayout2dBuilder Creates a NXOpen.Layout2d.AssemblyFromLayout2dBuilder that can create assembly from * the selected layout
CreateComponentFrom3dBuilder Creates a NXOpen.Layout2d.CreateComponentFrom3DBuilder that can create assembly from * the selected layout
CreateDefineComponentAnchorPointBuilder Creates a NXOpen.Layout2d.DefineComponentAnchorPointBuilder that can define the Anchor Point location of a * 2D Component
CreateDefineComponentBuilder Creates a NXOpen.Layout2d.DefineComponentBuilder that can create a fully defined 2D Component with specified content, anchor point, name and reuse library destination folder.
CreateExportComponentHierarchyBuilder Creates a NXOpen.Layout2d.ExportComponentHierarchyBuilder
CreateInsertComponentBuilder Creates a NXOpen.Layout2d.InsertComponentBuilder that inserts a 2D Component instance in the active * sketch.
CreateMakeComponentUniqueBuilder Creates a NXOpen.Layout2d.MakeComponentUniqueBuilder that can create definition * for the selected 2D Component instance
CreateNewComponentBuilder Creates a NXOpen.Layout2d.NewComponentBuilder that creates an empty 2D Component instance and stores its * definition in local 2D Component folder
CreatePublishComponentBuilder Creates a NXOpen.Layout2d.PublishComponentBuilder that can export local definitions into external storage locations
CreateReparentComponentBuilder Creates a NXOpen.Layout2d.ReplaceComponentBuilder that can reparent the selected 2D Component * instance with another 2D Component or sketch
CreateReplaceComponentBuilder Creates a NXOpen.Layout2d.ReplaceComponentBuilder that can replace the selected 2D Component * instance with another 2D Component definition
CreateSmashComponentBuilder Creates a NXOpen.Layout2d.SmashComponentBuilder that can smash the selected * 2D Component instance
DeleteComponents Deletes a list of 2D Components
FindObject Finds the NXOpen.Layout2d.Component with the given identifier as recorded in a journal.
IsComponentMember Verify if the object belong to this component
UpdateComponentHierarchy Updates 2D Components and propagates the changes to the hierarchy in given layout
UpdateComponents Updates 2D Components without propagating the changes to the hierarchy in given layout

OrderManagers

ComponentCollection.OrderManagers

Returns the OrderManager for part

Signature OrderManagers

New in version NX11.0.0.

Returns:
Return type:NXOpen.Drawings.OrderManager

Method Detail

CreateAssemblyFromLayout2dBuilder

ComponentCollection.CreateAssemblyFromLayout2dBuilder

Creates a NXOpen.Layout2d.AssemblyFromLayout2dBuilder that can create assembly from * the selected layout

Signature CreateAssemblyFromLayout2dBuilder()

Returns:
Return type:NXOpen.Layout2d.AssemblyFromLayout2dBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateComponentFrom3dBuilder

ComponentCollection.CreateComponentFrom3dBuilder

Creates a NXOpen.Layout2d.CreateComponentFrom3DBuilder that can create assembly from * the selected layout

Signature CreateComponentFrom3dBuilder(myView)

Parameters:myView (NXOpen.View) –
Returns:
Return type:NXOpen.Layout2d.CreateComponentFrom3DBuilder

New in version NX11.0.0.

License requirements: nx_layout (“NX Layout”)

CreateDefineComponentAnchorPointBuilder

ComponentCollection.CreateDefineComponentAnchorPointBuilder

Creates a NXOpen.Layout2d.DefineComponentAnchorPointBuilder that can define the Anchor Point location of a * 2D Component

Signature CreateDefineComponentAnchorPointBuilder()

Returns:
Return type:NXOpen.Layout2d.DefineComponentAnchorPointBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateDefineComponentBuilder

ComponentCollection.CreateDefineComponentBuilder

Creates a NXOpen.Layout2d.DefineComponentBuilder that can create a fully defined 2D Component with specified content, anchor point, name and reuse library destination folder.

Signature CreateDefineComponentBuilder(component)

Parameters:component (NXOpen.Layout2d.Component) – the component to be edited, None in case of new component view.
Returns:
Return type:NXOpen.Layout2d.DefineComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateExportComponentHierarchyBuilder

ComponentCollection.CreateExportComponentHierarchyBuilder

Creates a NXOpen.Layout2d.ExportComponentHierarchyBuilder

Signature CreateExportComponentHierarchyBuilder()

Returns:
Return type:NXOpen.Layout2d.ExportComponentHierarchyBuilder

New in version NX11.0.0.

License requirements: nx_layout (“NX Layout”)

CreateInsertComponentBuilder

ComponentCollection.CreateInsertComponentBuilder

Creates a NXOpen.Layout2d.InsertComponentBuilder that inserts a 2D Component instance in the active * sketch.

Signature CreateInsertComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.InsertComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateMakeComponentUniqueBuilder

ComponentCollection.CreateMakeComponentUniqueBuilder

Creates a NXOpen.Layout2d.MakeComponentUniqueBuilder that can create definition * for the selected 2D Component instance

Signature CreateMakeComponentUniqueBuilder()

Returns:
Return type:NXOpen.Layout2d.MakeComponentUniqueBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateNewComponentBuilder

ComponentCollection.CreateNewComponentBuilder

Creates a NXOpen.Layout2d.NewComponentBuilder that creates an empty 2D Component instance and stores its * definition in local 2D Component folder

Signature CreateNewComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.NewComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreatePublishComponentBuilder

ComponentCollection.CreatePublishComponentBuilder

Creates a NXOpen.Layout2d.PublishComponentBuilder that can export local definitions into external storage locations

Signature CreatePublishComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.PublishComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateReparentComponentBuilder

ComponentCollection.CreateReparentComponentBuilder

Creates a NXOpen.Layout2d.ReplaceComponentBuilder that can reparent the selected 2D Component * instance with another 2D Component or sketch

Signature CreateReparentComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.ReparentComponentBuilder

New in version NX11.0.0.

License requirements: nx_layout (“NX Layout”)

CreateReplaceComponentBuilder

ComponentCollection.CreateReplaceComponentBuilder

Creates a NXOpen.Layout2d.ReplaceComponentBuilder that can replace the selected 2D Component * instance with another 2D Component definition

Signature CreateReplaceComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.ReplaceComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

CreateSmashComponentBuilder

ComponentCollection.CreateSmashComponentBuilder

Creates a NXOpen.Layout2d.SmashComponentBuilder that can smash the selected * 2D Component instance

Signature CreateSmashComponentBuilder()

Returns:
Return type:NXOpen.Layout2d.SmashComponentBuilder

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

DeleteComponents

ComponentCollection.DeleteComponents

Deletes a list of 2D Components

Signature DeleteComponents(components)

Parameters:components (list of NXOpen.Layout2d.Component) –

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

FindObject

ComponentCollection.FindObject

Finds the NXOpen.Layout2d.Component 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) – Identifier of the 2D Component to be found
Returns:2D Component with this identifier
Return type:NXOpen.Layout2d.Component

New in version NX10.0.0.

License requirements: None.

IsComponentMember

ComponentCollection.IsComponentMember

Verify if the object belong to this component

Signature IsComponentMember(disObject)

Parameters:disObject (NXOpen.DisplayableObject) –
Returns:true if the object is component member
Return type:bool

New in version NX10.0.0.

License requirements: nx_layout (“NX Layout”)

UpdateComponentHierarchy

ComponentCollection.UpdateComponentHierarchy

Updates 2D Components and propagates the changes to the hierarchy in given layout

Signature UpdateComponentHierarchy(components)

Parameters:components (list of NXOpen.Layout2d.Component) –

New in version NX11.0.0.

License requirements: nx_layout (“NX Layout”)

UpdateComponents

ComponentCollection.UpdateComponents

Updates 2D Components without propagating the changes to the hierarchy in given layout

Signature UpdateComponents(components)

Parameters:components (list of NXOpen.Layout2d.Component) –

New in version NX11.0.0.

License requirements: nx_layout (“NX Layout”)