Skip to content

Reorder Geometric Set Alphabetically

KaiUR edited this page Jun 3, 2026 · 5 revisions

Reorder Geometric Set Alphabetically

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


Description

Sorts all hybrid shapes inside a selected geometric set alphabetically by name. Each shape is recreated as a datum in sorted order and the original is removed. Child geometric sets within the selected set are not reordered.


Requirements

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

Usage

  1. Open a CATPart document containing a geometric set with hybrid shapes
  2. Run the script
  3. Select the geometric set to sort — click OK when done
  4. All elements in the set are recreated as datums in alphabetical order

Notes

  • Sorting is case-insensitive — uppercase and lowercase names are treated equally
  • Since elements are recreated as datums, any parametric links to these shapes from elsewhere in the part will break
  • Only the top-level elements of the selected geometric set are sorted — child geometric sets and their contents are not touched
  • Child geometric sets remain in place at the end of the set after all sorted shapes

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