Skip to content

Check Missing Files

KaiUR edited this page May 22, 2026 · 4 revisions

Check Missing Files

File: Product_Document_Scripts/Check_Missing_Files.py
Version: 1.1
Document Type: Product


Description

Recursively traverses the active CATProduct assembly tree and checks whether the file referenced by each component instance actually exists on disk. Results are shown in a wx dialog. If missing or unresolved references are found, a CSV is also saved next to the CATProduct.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Required
Open document Product

Usage

  1. Open a CATProduct in CATIA
  2. Run the script
  3. If all references are resolved, a confirmation dialog appears
  4. If issues are found, a results dialog lists the problem components and a CSV is saved

Dialog Output

When issues are found, a scrollable results dialog shows a table of MISSING and UNRESOLVED components, along with a summary line and the CSV save path. When all references are OK, a simple confirmation message is shown instead.

Checked 12 reference(s):  10 OK  |  1 Missing  |  1 Unresolved
--------------------------------------------------------------------------------

  Instance                       Status       File
  ------------------------------ ------------ --------------------------------------------------
  Bracket_L                      MISSING      D:\Parts\Bracket_L.CATPart
  Seal_Ring                      UNRESOLVED   Seal_Ring.CATPart

CSV saved to: D:\Assembly\Assembly_MissingFiles.csv

Status Definitions

Status Meaning
OK File path is known and the file exists on disk
MISSING Full path is available but the file does not exist at that location
UNRESOLVED Only the file name (no path) is available; existence cannot be checked

Output (when problems found)

CSV file: <ProductName>_MissingFiles.csv

Column Content
Assembly Path Full path through the assembly tree
Instance Name Component instance name
File Reference Last known file path or name
Status MISSING or UNRESOLVED

Notes

  • OK components are not written to the CSV — only MISSING and UNRESOLVED entries
  • If all references are resolved, no CSV is created and a confirmation dialog is shown
  • UNRESOLVED typically means the product was opened without resolving all links, or the component was never saved

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