Skip to content

Delete Deactivated Features

KaiUR edited this page May 21, 2026 · 4 revisions

Delete Deactivated Features

File: Part_Document_Scripts/Delete_Deactivated_Features.py
Version: 1.1
Document Type: Part (also works with Part inside Product or Process)


Description

Scans a selected geometric set (recursively through all child sets) and collects every hybrid shape that has been deactivated. The user is shown the count and asked to confirm before any deletion takes place. Useful for cleaning up parts before handoff or release.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Required
Open document Part, or Part inside Product/Process

Usage

  1. Open a CATPart document
  2. Run the script
  3. Selection: Select the geometric set to scan
  4. The script reports the number of deactivated features found
  5. A confirmation dialog asks whether to delete them — click Yes to proceed or No to cancel

Notes

  • Only hybrid shapes (GSD features) are scanned — solid body features are not affected
  • Deletion is permanent and cannot be undone — ensure the part is saved before running
  • The geometric set structure itself is not modified; only individual deactivated shapes are removed
  • Deactivated child geometric sets are not deleted — only deactivated shapes inside sets are targeted

Home


Getting Started


Contributing


Any Document Scripts


Drawing Document Scripts


Part Document Scripts


Shape Generation Scripts


Process Document Scripts


Product Document Scripts


Utility Scripts


Legal

Clone this wiki locally