ComponentDefinitionCollection Class¶
-
class
NXOpen.Layout2d.
ComponentDefinitionCollection
¶ Bases:
object
Represents a collection of
NXOpen.Layout2d.ComponentDefinition
objects.To obtain an instance of this class, refer to
NXOpen.Part
New in version NX10.0.0.
Methods¶
Method | Description |
---|---|
Delete | Deletes definition |
FindObject | Finds the NXOpen.Layout2d.ComponentDefinition with the given sid. |
Rename | Renames definition |
SetAutomaticPreview | Sets the automatic preview mode of definition with the given path |
Update | Updates definition with the given path |
UpdateImage | Updates definition preview |
Method Detail¶
Delete¶
-
ComponentDefinitionCollection.
Delete
¶ Deletes definition
Signature
Delete(location, definitionPath)
Parameters: - location (
NXOpen.Layout2d.Layout2dDefinitionLocation
) – Location of the definition to delete - definitionPath (str) – Path of the definition to delete
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
- location (
FindObject¶
-
ComponentDefinitionCollection.
FindObject
¶ Finds the
NXOpen.Layout2d.ComponentDefinition
with the given sid.An exception will be thrown if no object can be found with the given sid. This method can only be used to find Local definitions
Signature
FindObject(sid)
Parameters: sid (str) – The sid of the definition to find Returns: Return type: NXOpen.Layout2d.ComponentDefinition
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
Rename¶
-
ComponentDefinitionCollection.
Rename
¶ Renames definition
Signature
Rename(location, definitionPath, newName)
Parameters: - location (
NXOpen.Layout2d.Layout2dDefinitionLocation
) – Location of the definition to rename - definitionPath (str) – Path of the definition to rename
- newName (str) – New definition name
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
- location (
SetAutomaticPreview¶
-
ComponentDefinitionCollection.
SetAutomaticPreview
¶ Sets the automatic preview mode of definition with the given path
Signature
SetAutomaticPreview(location, definitionPath, isAutomatic)
Parameters: - location (
NXOpen.Layout2d.Layout2dDefinitionLocation
) – Location of the definition to set the preview mode - definitionPath (str) – Path of the definition to set the preview mode
- isAutomatic (bool) –
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
- location (
Update¶
-
ComponentDefinitionCollection.
Update
¶ Updates definition with the given path
Signature
Update(location, definitionPath)
Parameters: - location (
NXOpen.Layout2d.Layout2dDefinitionLocation
) – Location of the definition to update - definitionPath (str) – Path of the definition to update
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
- location (
UpdateImage¶
-
ComponentDefinitionCollection.
UpdateImage
¶ Updates definition preview
Signature
UpdateImage(location, definitionPath, imagePath)
Parameters: - location (
NXOpen.Layout2d.Layout2dDefinitionLocation
) – Location of the definition to update image - definitionPath (str) – Path of the definition to update image
- imagePath (str) – Path of the image file used to update definition preview
New in version NX11.0.0.
License requirements: nx_layout (“NX Layout”)
- location (