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.
Methods¶
Method | Description |
---|---|
CreateAssemblyFromLayout2dBuilder | Creates a NXOpen.Layout2d.AssemblyFromLayout2dBuilder that can create assembly from * the selected layout @return |
CreateDefineComponentAnchorPointBuilder | Creates a NXOpen.Layout2d.DefineComponentAnchorPointBuilder that can define the Anchor Point location of a * 2D Component @return |
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. |
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 @return |
CreateNewComponentBuilder | Creates a NXOpen.Layout2d.NewComponentBuilder that creates an empty 2D Component instance and stores its * definition in local 2D Component folder @return |
CreatePublishComponentBuilder | Creates a NXOpen.Layout2d.PublishComponentBuilder that can export local definitions into external storage locations @return |
CreateReplaceComponentBuilder | Creates a NXOpen.Layout2d.ReplaceComponentBuilder that can replace the selected 2D Component * instance with another 2D Component definition @return |
CreateSmashComponentBuilder | Creates a NXOpen.Layout2d.SmashComponentBuilder that can smash the selected * 2D Component instance @return |
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 @return true if the object is component member |
Method Detail¶
CreateAssemblyFromLayout2dBuilder¶
-
ComponentCollection.
CreateAssemblyFromLayout2dBuilder
¶ Creates a
NXOpen.Layout2d.AssemblyFromLayout2dBuilder
that can create assembly from * the selected layoutSignature
CreateAssemblyFromLayout2dBuilder()
Returns: Return type: NXOpen.Layout2d.AssemblyFromLayout2dBuilder
New in version NX10.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 ComponentSignature
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”)
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 instanceSignature
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 folderSignature
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 locationsSignature
CreatePublishComponentBuilder()
Returns: Return type: NXOpen.Layout2d.PublishComponentBuilder
New in version NX10.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 definitionSignature
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 instanceSignature
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”)