DRY0012 - PART CLEANER - DOCUMENTATION

DRY0012 - Part Cleaner

DRYCAD Suite tool that removes empty Bodies, Geometrical Sets, and Ordered Geometrical Sets from the active CATIA V5 Part, with a configurable keep-list and optional confirmation prompt.

DRYCAD Suite | User Documentation | v1.0.0


Table of Contents

  1. Overview
  2. Getting Started
  3. Confirmation and Result
  4. Configuration: settings.ini
  5. Examples
  6. Troubleshooting
  7. Version History

1. Overview

DRY0012 – Part Cleaner is a CATIA V5 automation tool that scans the active Part for Bodies, Geometrical Sets, and Ordered Geometrical Sets that hold nothing, no shapes, no sketches, no hybrid content, and removes them. It runs the check repeatedly rather than once, so an element that only becomes empty after its last child is deleted still gets swept out in the same pass. Names you configure as protected are never touched, and the Main Body is always kept regardless of configuration.

Unlike most CommandBar tools, DRY0012 has no window of its own. It runs immediately when launched, optionally asks for confirmation, and reports what it removed.

What it does:

  • Deletes empty Bodies, except the Main Body and any Body on the configured keep-list
  • Deletes empty Geometrical Sets and Ordered Geometrical Sets not on their respective keep-lists
  • Repeats the scan up to ten times per document, so cascading empties (a set that empties out once its last child Body is removed) are cleared in the same run
  • Optionally prompts for confirmation before making any change
  • Reports a count of everything removed once the run finishes

Supported CAD platforms: CATIA V5

Workspace requirement: An active Part document must be open in CATIA.


2. Getting Started

Prerequisites

  • CATIA V5 must be running with an active Part document open
  • You must be logged in with a valid DRYCAD Suite user account
  • If you want to protect specific Bodies or Sets by name, configure the keep-list in settings.ini before running (see Section 4), the default keep-list only protects a handful of standard names

Launching the Tool

DRY0012 is launched from the DRYCAD Suite CommandBar inside CATIA V5. Click the corresponding button to run it.

The tool checks the following conditions at startup, and will show an error and close if any fail:

  • A valid user session is found
  • CATIA V5 is running
  • The active document is a Part (not a Product, Drawing, or other workspace)

There is no panel to configure before running, every option that shapes the cleanup (what’s protected, whether to ask first) lives in settings.ini and is read fresh each time the tool starts. Because DRY0012 has no window of its own, it doesn’t include the standard DRYCAD Menu found in other Suite tools, there’s no in-app option to check the version, open documentation, or reset settings. To change configuration, edit settings.ini directly with any text editor.

DRY0012 also monitors the CATIA process and the active workspace every 5 seconds while it runs. It closes automatically if CATIA closes or the active document stops being a Part, in practice this window is short, since the tool completes its check-confirm-clean sequence in a few seconds unless it’s waiting on your response to the confirmation prompt.


3. Confirmation and Result

Since DRY0012 has no interface, all interaction happens through two message boxes.

3.1 Confirmation Prompt

Titled PART CLEANER, asking “Do you want to clean current Part Document?”, with Yes and No buttons.

  • This prompt only appears when ASK_BEFORE_DELETE=1 in settings.ini, the shipped default. Set it to 0 to skip straight to cleanup with no prompt at all, useful once you trust your keep-list and want the tool running as one step in a longer sequence without stopping for input.
  • Yes proceeds to the cleanup described in Section 1.
  • No closes the tool immediately. Nothing in the Part is touched, and no result summary is shown, since no cleanup ran.

3.2 Result Summary

Titled PART CLEANER, listing the number of Bodies, Geometrical Sets, and Ordered Geometrical Sets removed, in the form:

Cleaned:
X bodies
Y geometrical sets
Z ordered geometrical sets
  • This appears every time the cleanup actually runs, including when all three counts are zero. A 0/0/0 result is a valid outcome: it means everything already had content, was the Main Body, or matched a protected name, not that the tool failed to run. See Section 6 if you expected a non-zero count and didn’t get one.
  • If CATIA rejects a deletion for a given category (for example, an element is referenced elsewhere and can’t be removed), that category’s count is reported as -1 instead of a real count. The other two categories still report normally.

4. Configuration: settings.ini

File Location

<install_folder>/DRY0012/settings.ini

Since DRY0012 has no in-app menu, this file must be opened and edited directly, there’s no Open Settings or Clear Settings option to reach for.

Structure

; --------------------------------------
; DRY0012 - PART CLEANER - SETTINGS FILE
; --------------------------------------

[General Settings]
; Ask for confirmation before cleaning
ASK_BEFORE_DELETE=1

[Featrues To Keep]
; Body Names to keep, separated by semicolon ';'
BODIES_TO_KEEP="DRY_Body"

; Geometrical Set Names to keep, separated by semicolon ';'
GEOMETRICAL_SETS_TO_KEEP="DRY_GeometricalSet;Construction_Geometry"

; Ordered Geometrical Set Names to keep, separated by semicolon ';'
ORDERED_GEOMETRICAL_SETS_TO_KEEP="DRY_OrderedGeometricalSet"

Lines starting with ; are comments and are ignored.

Parameters

ASK_BEFORE_DELETE

PropertyValue
Section[General Settings]
TypeBoolean (0 or 1)
RequiredNo
Default1

Controls whether the confirmation prompt in Section 3.1 appears before cleanup runs. Set to 0 for unattended use.

; Skip the confirmation prompt entirely
ASK_BEFORE_DELETE=0

BODIES_TO_KEEP

PropertyValue
Section[Featrues To Keep]
TypeSemicolon-separated list of strings
RequiredNo
Default"DRY_Body"

Body names that are always protected from deletion, matched case-insensitively, regardless of whether they hold any content. The Main Body is always protected as well, whether or not it appears here.

BODIES_TO_KEEP="DRY_Body;Main_Reference;Machining_Body"

GEOMETRICAL_SETS_TO_KEEP

PropertyValue
Section[Featrues To Keep]
TypeSemicolon-separated list of strings
RequiredNo
Default"DRY_GeometricalSet;Construction_Geometry"

Geometrical Set names that are always protected from deletion, matched case-insensitively, regardless of content.

GEOMETRICAL_SETS_TO_KEEP="Common_Geometry;Construction_Geometry;Reference_Sketches"

ORDERED_GEOMETRICAL_SETS_TO_KEEP

PropertyValue
Section[Featrues To Keep]
TypeSemicolon-separated list of strings
RequiredNo
Default"DRY_OrderedGeometricalSet"

Ordered Geometrical Set names that are always protected from deletion, matched case-insensitively, regardless of content.

ORDERED_GEOMETRICAL_SETS_TO_KEEP="DRY_OrderedGeometricalSet;Sequenced_Features"

5. Examples

Example 1, Default Behavior on a Typical Part

A designer runs DRY0012 on a Part with the shipped default settings.ini, ASK_BEFORE_DELETE=1, and the default keep-lists.

What happens:

  • The confirmation prompt appears; clicking Yes starts the cleanup
  • Any Body other than the Main Body and anything named DRY_Body is checked for content; empty ones are removed
  • Geometrical Sets named DRY_GeometricalSet or Construction_Geometry are protected regardless of content; other empty Geometrical Sets are removed
  • Ordered Geometrical Sets named DRY_OrderedGeometricalSet are protected; other empty ones are removed
  • A result summary reports the totals for each category

Key points:

  • Protection is by name only, a Body named DRY_Body is kept even if it’s completely empty
  • The Main Body is protected implicitly; it never needs to appear in BODIES_TO_KEEP

Example 2, Unattended Cleanup with a Company Keep-List

A team wants DRY0012 running as a routine step before every save, with no prompt interrupting the flow, and a company-specific set of protected names.

[General Settings]
ASK_BEFORE_DELETE=0

[Featrues To Keep]
BODIES_TO_KEEP="DRY_Body;Reference_Body"
GEOMETRICAL_SETS_TO_KEEP="Common_Geometry;Construction_Geometry;Points;Axes;Planes"
ORDERED_GEOMETRICAL_SETS_TO_KEEP="DRY_OrderedGeometricalSet"

What happens:

  • No confirmation prompt appears, cleanup starts as soon as the tool launches
  • The five named Geometrical Sets survive even on a brand-new Part where they’re still empty, since they’re standard structural placeholders the team always keeps
  • Everything else not on a keep-list is evaluated for emptiness and removed if it qualifies

Key points:

  • ASK_BEFORE_DELETE=0 is the right setting for any workflow where DRY0012 runs as an automatic step rather than a deliberate user action
  • A longer keep-list is the correct way to protect standard structural elements that are legitimately empty by design (placeholders meant to be filled in later), rather than disabling the tool for those Parts

6. Troubleshooting

”User not found. Please login and try again.”

The tool could not find a valid DRYCAD Suite user session. Make sure you are logged in to the Suite before launching the tool.


”CATIA is not open. Please open CATIA and try again.”

The tool cannot connect to a running CATIA V5 instance. Launch CATIA V5 first, then run the tool again.


”Invalid Workspace”

The active document in CATIA is not a Part. DRY0012 only works inside a Part document. Close any Drawing, Product, or other document type and make sure a Part is active before launching.


The confirmation prompt doesn’t appear

ASK_BEFORE_DELETE is set to 0 in settings.ini. This is expected behavior for unattended use, not an error, set it back to 1 if you want the prompt again.


The result shows 0 for every category

This is a valid outcome, not a failure. Check:

  1. Is everything you expected removed actually the Main Body, or named on one of the three keep-lists? Both are protected unconditionally, regardless of content.
  2. Does every Body, Geometrical Set, or Ordered Geometrical Set in the Part already contain at least one shape, sketch, or hybrid child? Anything with content is left alone by design.
  3. Are the elements you expected to be removed nested more than ten levels deep in a chain of empties? The cleanup repeats up to ten passes per document; an extremely deep chain could need a second run to finish clearing.

An element I expected to be removed is still there

  1. Check its name against BODIES_TO_KEEP, GEOMETRICAL_SETS_TO_KEEP, or ORDERED_GEOMETRICAL_SETS_TO_KEEP, matching is case-insensitive, so dry_body and DRY_Body are treated the same
  2. Confirm it isn’t the Part’s Main Body, this is protected regardless of settings
  3. Confirm it truly holds nothing, a Geometrical Set with even one hybrid shape, sketch, or nested set inside is left alone
  4. For Bodies specifically, check nested Hybrid Bodies inside it too, any shape or sketch at any nesting level inside the Body counts as content

A category in the result shows -1 instead of a count

CATIA rejected the deletion for that category, typically because one of the elements queued for removal is referenced elsewhere in the Part (used in a formula, a link, or another feature) and can’t be deleted while that reference exists. Check the specification tree for external references to the affected elements, remove the reference, and run DRY0012 again.


The tool closes without showing any result

DRY0012 monitors the CATIA process and the active workspace every 5 seconds and closes automatically if either becomes invalid while it’s running, for example, if CATIA is closed while the confirmation prompt is still waiting for a response. Reopen the Part in CATIA and run the tool again.


7. Version History

VersionDateChanges
1.0.02026-07Initial release

DRY0012, Part Cleaner | DRYCAD Solutions | v1.0.0