ComponentCollection Class¶
-
class
NXOpen.Layout2d.ComponentCollection¶ Bases:
objectRepresents a collection of :py:class:`NXOpen.Layout2d.Component`s.
To obtain an instance of this class, refer to
NXOpen.PartNew 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
OrderManagersNew in version NX11.0.0.
Returns: Return type: NXOpen.Drawings.OrderManager
Method Detail¶
CreateAssemblyFromLayout2dBuilder¶
-
ComponentCollection.CreateAssemblyFromLayout2dBuilder¶ Creates a
NXOpen.Layout2d.AssemblyFromLayout2dBuilderthat can create assembly from * the selected layoutSignature
CreateAssemblyFromLayout2dBuilder()Returns: Return type: NXOpen.Layout2d.AssemblyFromLayout2dBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateComponentFrom3dBuilder¶
-
ComponentCollection.CreateComponentFrom3dBuilder¶ Creates a
NXOpen.Layout2d.CreateComponentFrom3DBuilderthat can create assembly from * the selected layoutSignature
CreateComponentFrom3dBuilder(myView)Parameters: myView ( NXOpen.View) –Returns: Return type: NXOpen.Layout2d.CreateComponentFrom3DBuilderNew in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
CreateDefineComponentAnchorPointBuilder¶
-
ComponentCollection.CreateDefineComponentAnchorPointBuilder¶ Creates a
NXOpen.Layout2d.DefineComponentAnchorPointBuilderthat can define the Anchor Point location of a * 2D ComponentSignature
CreateDefineComponentAnchorPointBuilder()Returns: Return type: NXOpen.Layout2d.DefineComponentAnchorPointBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateDefineComponentBuilder¶
-
ComponentCollection.CreateDefineComponentBuilder¶ Creates a
NXOpen.Layout2d.DefineComponentBuilderthat 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.DefineComponentBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateExportComponentHierarchyBuilder¶
-
ComponentCollection.CreateExportComponentHierarchyBuilder¶ Creates a
NXOpen.Layout2d.ExportComponentHierarchyBuilderSignature
CreateExportComponentHierarchyBuilder()Returns: Return type: NXOpen.Layout2d.ExportComponentHierarchyBuilderNew in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
CreateInsertComponentBuilder¶
-
ComponentCollection.CreateInsertComponentBuilder¶ Creates a
NXOpen.Layout2d.InsertComponentBuilderthat inserts a 2D Component instance in the active * sketch.Signature
CreateInsertComponentBuilder()Returns: Return type: NXOpen.Layout2d.InsertComponentBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateMakeComponentUniqueBuilder¶
-
ComponentCollection.CreateMakeComponentUniqueBuilder¶ Creates a
NXOpen.Layout2d.MakeComponentUniqueBuilderthat can create definition * for the selected 2D Component instanceSignature
CreateMakeComponentUniqueBuilder()Returns: Return type: NXOpen.Layout2d.MakeComponentUniqueBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateNewComponentBuilder¶
-
ComponentCollection.CreateNewComponentBuilder¶ Creates a
NXOpen.Layout2d.NewComponentBuilderthat creates an empty 2D Component instance and stores its * definition in local 2D Component folderSignature
CreateNewComponentBuilder()Returns: Return type: NXOpen.Layout2d.NewComponentBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreatePublishComponentBuilder¶
-
ComponentCollection.CreatePublishComponentBuilder¶ Creates a
NXOpen.Layout2d.PublishComponentBuilderthat can export local definitions into external storage locationsSignature
CreatePublishComponentBuilder()Returns: Return type: NXOpen.Layout2d.PublishComponentBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateReparentComponentBuilder¶
-
ComponentCollection.CreateReparentComponentBuilder¶ Creates a
NXOpen.Layout2d.ReplaceComponentBuilderthat can reparent the selected 2D Component * instance with another 2D Component or sketchSignature
CreateReparentComponentBuilder()Returns: Return type: NXOpen.Layout2d.ReparentComponentBuilderNew in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
CreateReplaceComponentBuilder¶
-
ComponentCollection.CreateReplaceComponentBuilder¶ Creates a
NXOpen.Layout2d.ReplaceComponentBuilderthat can replace the selected 2D Component * instance with another 2D Component definitionSignature
CreateReplaceComponentBuilder()Returns: Return type: NXOpen.Layout2d.ReplaceComponentBuilderNew in version NX10.0.0.
License requirements: nx_layout (“NX Layout”)
CreateSmashComponentBuilder¶
-
ComponentCollection.CreateSmashComponentBuilder¶ Creates a
NXOpen.Layout2d.SmashComponentBuilderthat can smash the selected * 2D Component instanceSignature
CreateSmashComponentBuilder()Returns: Return type: NXOpen.Layout2d.SmashComponentBuilderNew 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.Componentwith 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.ComponentNew 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”)