PartCleanup Class¶
-
class
NXOpen.
PartCleanup
¶ Bases:
NXOpen.TransientObject
Provides utilities to to eliminate certain inaccessible objects from the part file.
To use this utility, first create an instance of this class by calling
Session.NewPartCleanup()
. Then, set any part cleanup actions that you wish to be performed by setting the appropriate properties on this class. By default, all the properties are set to “false” or “none”. Once all the properties are set, then call thePartCleanup.DoCleanup()
method to actually perform the cleanup action.For more information on what the various part cleanup options do, see the Part Cleanup Options Dialog section of the Gateway Help.
New in version NX3.0.0.
Properties¶
Property | Description |
---|---|
CleanupAssemblyConstraints | Returns or sets the option that specifies whether to cleanup assembly constraints. |
CleanupCAMObjects | Returns or sets the option that specifies whether to delete or fix any corrupt internal CAM objects. |
CleanupDraftingObjects | Returns or sets the option that specifies whether to perform drafting cleanup. |
CleanupFeatureData | Returns or sets the option that specifies whether to perform solid cleanup. |
CleanupMatingData | Returns or sets the option that specifies whether to cleanup mating data. |
CleanupMotionData | Returns or sets the option which determines if the motion cleanup option should be performed. |
CleanupPartFamilyData | Returns or sets the option that specifies if the part family data cleanup should be performed. |
CleanupRoutingData | Returns or sets the option which determines if the routing part cleanup option should be performed. |
DeleteBrokenInterpartLinks | Returns or sets the option that specifies whether or not to delete all inter-part links where one or more components in that inter-part link have been removed. |
DeleteDuplicateLights | Returns or sets the option that specifies whether to delete duplicate light source objects from the part file. |
DeleteInvalidAttributes | Returns or sets the option that specifies whether to delete all invalid user attributes from the part file. |
DeleteMaterials | Returns or sets the option that specifies whether to delete all materials from the part file. |
DeleteSpreadSheetData | Returns or sets the option that specifies whether to delete all spreadsheets from the part file. |
DeleteUnusedExpressions | Returns or sets the option that specifies whether to delete expressions that are not used in the part. |
DeleteUnusedExtractReferences | Returns or sets the option that specifies whether to delete all unused edge/face references in extract features from the part file. |
DeleteUnusedFonts | Returns or sets the option that specifies whether to remove character fonts that are not used in any drafting text in the current part. |
DeleteUnusedObjects | Returns or sets the option that specifies whether to delete all extraneous objects from the work part |
DeleteUnusedUnits | Returns or sets the option that specifies whether to remove character fonts that are not used in any drafting text in the current part. |
DeleteVisualEditorData | Returns or sets the option that specifies whether to delete Visual Editor data from the part file. |
FixOffplaneSketchCurves | Returns or sets the option that specifies whether to fix off-plane sketch curves. |
GroupsToDelete | Returns or sets the option that specifies what empty groups should be deleted. |
PartsToCleanup | Returns or sets the option that specifies what parts will be cleaned up when PartCleanup.DoCleanup() is called. |
ResetComponentDisplay | Returns or sets the option that specifies whether to remove assembly-specific geometry in component parts. |
TurnOffHighlighting | Returns or sets the option that specifies whether to turn off highlighting for all displayable objects in the displayed part. |
Methods¶
Method | Description |
---|---|
Dispose | Free resources associated with the instance. |
DoCleanup | Actually performs the part cleanup operation according to the properties set on this object |
Reset | Resets all the properties back to the default values (i. |
Enumerations¶
PartCleanupCleanupParts Enumeration | Which parts to clean up |
PartCleanupDeleteGroups Enumeration | Which empty groups to clean up |
PartCleanupResetComponentDisplayAction Enumeration | Assembly display clean up action |
Property Detail¶
CleanupAssemblyConstraints¶
-
PartCleanup.
CleanupAssemblyConstraints
¶ Returns or sets the option that specifies whether to cleanup assembly constraints.
-------------------------------------
Getter Method
Signature
CleanupAssemblyConstraints
Returns: Return type: bool New in version NX7.5.5.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupAssemblyConstraints
Parameters: cleanupOption (bool) – New in version NX7.5.5.
License requirements: None.
CleanupCAMObjects¶
-
PartCleanup.
CleanupCAMObjects
¶ Returns or sets the option that specifies whether to delete or fix any corrupt internal CAM objects.
-------------------------------------
Getter Method
Signature
CleanupCAMObjects
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupCAMObjects
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
CleanupDraftingObjects¶
-
PartCleanup.
CleanupDraftingObjects
¶ Returns or sets the option that specifies whether to perform drafting cleanup.
-------------------------------------
Getter Method
Signature
CleanupDraftingObjects
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupDraftingObjects
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
CleanupFeatureData¶
-
PartCleanup.
CleanupFeatureData
¶ Returns or sets the option that specifies whether to perform solid cleanup.
-------------------------------------
Getter Method
Signature
CleanupFeatureData
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupFeatureData
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
CleanupMatingData¶
-
PartCleanup.
CleanupMatingData
¶ Returns or sets the option that specifies whether to cleanup mating data.
-------------------------------------
Getter Method
Signature
CleanupMatingData
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupMatingData
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
CleanupMotionData¶
-
PartCleanup.
CleanupMotionData
¶ Returns or sets the option which determines if the motion cleanup option should be performed.
-------------------------------------
Getter Method
Signature
CleanupMotionData
Returns: Return type: bool New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupMotionData
Parameters: cleanupOption (bool) – New in version NX12.0.0.
License requirements: None.
CleanupPartFamilyData¶
-
PartCleanup.
CleanupPartFamilyData
¶ Returns or sets the option that specifies if the part family data cleanup should be performed.
-------------------------------------
Getter Method
Signature
CleanupPartFamilyData
Returns: Return type: bool New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupPartFamilyData
Parameters: cleanupOption (bool) – New in version NX12.0.0.
License requirements: None.
CleanupRoutingData¶
-
PartCleanup.
CleanupRoutingData
¶ Returns or sets the option which determines if the routing part cleanup option should be performed.
-------------------------------------
Getter Method
Signature
CleanupRoutingData
Returns: Return type: bool New in version NX7.5.4.
License requirements: None.
-------------------------------------
Setter Method
Signature
CleanupRoutingData
Parameters: cleanupOption (bool) – New in version NX7.5.4.
License requirements: None.
DeleteBrokenInterpartLinks¶
-
PartCleanup.
DeleteBrokenInterpartLinks
¶ Returns or sets the option that specifies whether or not to delete all inter-part links where one or more components in that inter-part link have been removed.
-------------------------------------
Getter Method
Signature
DeleteBrokenInterpartLinks
Returns: Return type: bool New in version NX5.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteBrokenInterpartLinks
Parameters: cleanupOption (bool) – New in version NX5.0.0.
License requirements: None.
DeleteDuplicateLights¶
-
PartCleanup.
DeleteDuplicateLights
¶ Returns or sets the option that specifies whether to delete duplicate light source objects from the part file.
-------------------------------------
Getter Method
Signature
DeleteDuplicateLights
Returns: Return type: bool New in version NX7.5.3.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteDuplicateLights
Parameters: cleanupOption (bool) – New in version NX7.5.3.
License requirements: None.
DeleteInvalidAttributes¶
-
PartCleanup.
DeleteInvalidAttributes
¶ Returns or sets the option that specifies whether to delete all invalid user attributes from the part file.
-------------------------------------
Getter Method
Signature
DeleteInvalidAttributes
Returns: Return type: bool New in version NX8.0.3.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteInvalidAttributes
Parameters: cleanupOption (bool) – New in version NX8.0.3.
License requirements: None.
DeleteMaterials¶
-
PartCleanup.
DeleteMaterials
¶ Returns or sets the option that specifies whether to delete all materials from the part file.
-------------------------------------
Getter Method
Signature
DeleteMaterials
Returns: Return type: bool New in version NX7.5.2.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteMaterials
Parameters: cleanupOption (bool) – New in version NX7.5.2.
License requirements: None.
DeleteSpreadSheetData¶
-
PartCleanup.
DeleteSpreadSheetData
¶ Returns or sets the option that specifies whether to delete all spreadsheets from the part file.
-------------------------------------
Getter Method
Signature
DeleteSpreadSheetData
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteSpreadSheetData
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
DeleteUnusedExpressions¶
-
PartCleanup.
DeleteUnusedExpressions
¶ Returns or sets the option that specifies whether to delete expressions that are not used in the part.
-------------------------------------
Getter Method
Signature
DeleteUnusedExpressions
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteUnusedExpressions
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
DeleteUnusedExtractReferences¶
-
PartCleanup.
DeleteUnusedExtractReferences
¶ Returns or sets the option that specifies whether to delete all unused edge/face references in extract features from the part file.
-------------------------------------
Getter Method
Signature
DeleteUnusedExtractReferences
Returns: Return type: bool New in version NX11.0.1.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteUnusedExtractReferences
Parameters: opt (bool) – New in version NX11.0.1.
License requirements: None.
DeleteUnusedFonts¶
-
PartCleanup.
DeleteUnusedFonts
¶ Returns or sets the option that specifies whether to remove character fonts that are not used in any drafting text in the current part.
-------------------------------------
Getter Method
Signature
DeleteUnusedFonts
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteUnusedFonts
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
DeleteUnusedObjects¶
-
PartCleanup.
DeleteUnusedObjects
¶ Returns or sets the option that specifies whether to delete all extraneous objects from the work part
-------------------------------------
Getter Method
Signature
DeleteUnusedObjects
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteUnusedObjects
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
DeleteUnusedUnits¶
-
PartCleanup.
DeleteUnusedUnits
¶ Returns or sets the option that specifies whether to remove character fonts that are not used in any drafting text in the current part.
-------------------------------------
Getter Method
Signature
DeleteUnusedUnits
Returns: Return type: bool New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteUnusedUnits
Parameters: cleanupOption (bool) – New in version NX12.0.0.
License requirements: None.
DeleteVisualEditorData¶
-
PartCleanup.
DeleteVisualEditorData
¶ Returns or sets the option that specifies whether to delete Visual Editor data from the part file.
-------------------------------------
Getter Method
Signature
DeleteVisualEditorData
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DeleteVisualEditorData
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
FixOffplaneSketchCurves¶
-
PartCleanup.
FixOffplaneSketchCurves
¶ Returns or sets the option that specifies whether to fix off-plane sketch curves.
-------------------------------------
Getter Method
Signature
FixOffplaneSketchCurves
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
FixOffplaneSketchCurves
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
GroupsToDelete¶
-
PartCleanup.
GroupsToDelete
¶ Returns or sets the option that specifies what empty groups should be deleted.
-------------------------------------
Getter Method
Signature
GroupsToDelete
Returns: Return type: NXOpen.PartCleanupDeleteGroups
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
GroupsToDelete
Parameters: cleanupOption ( NXOpen.PartCleanupDeleteGroups
) –New in version NX3.0.0.
License requirements: None.
PartsToCleanup¶
-
PartCleanup.
PartsToCleanup
¶ Returns or sets the option that specifies what parts will be cleaned up when
PartCleanup.DoCleanup()
is called.-------------------------------------
Getter Method
Signature
PartsToCleanup
Returns: Return type: NXOpen.PartCleanupCleanupParts
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
PartsToCleanup
Parameters: cleanupOption ( NXOpen.PartCleanupCleanupParts
) –New in version NX3.0.0.
License requirements: None.
ResetComponentDisplay¶
-
PartCleanup.
ResetComponentDisplay
¶ Returns or sets the option that specifies whether to remove assembly-specific geometry in component parts.
-------------------------------------
Getter Method
Signature
ResetComponentDisplay
Returns: Return type: NXOpen.PartCleanupResetComponentDisplayAction
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ResetComponentDisplay
Parameters: cleanupOption ( NXOpen.PartCleanupResetComponentDisplayAction
) –New in version NX3.0.0.
License requirements: None.
TurnOffHighlighting¶
-
PartCleanup.
TurnOffHighlighting
¶ Returns or sets the option that specifies whether to turn off highlighting for all displayable objects in the displayed part.
-------------------------------------
Getter Method
Signature
TurnOffHighlighting
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
TurnOffHighlighting
Parameters: cleanupOption (bool) – New in version NX3.0.0.
License requirements: None.
Method Detail¶
Dispose¶
-
PartCleanup.
Dispose
¶ Free resources associated with the instance.
After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.
Signature
Dispose()
New in version NX3.0.0.
License requirements: None.