Validating CGM files

Reforge can check a CGM file against a profile without writing any SVG. It is worth doing before a large run, when auditing an illustration library you have been handed, or when a file converts but the output is not what you expected.

Validation is not a screen of its own. It runs from the Convert tab, either on its own or as a gate in front of a normal conversion.


Validating without converting

  1. Open the Convert tab and add files.
  2. Set the CGM profile to check against on the Profiles tab.
  3. Open the caret menu beside the Convert button and choose Validate Only, or press shift+f6.

Nothing is written. Each file is checked and left in the queue with a validation status icon:

Icon Meaning
Green check No issues found
Yellow warning Advisory issues only — the file will still convert
Red cross Blocking issues found

Select a row to read its individual issues.

Validation runs on the selected files, or on everything in the queue if nothing is selected.


Validating as part of a conversion

Tick Validate CGM before conversion in the Convert sidebar to run the same check as a gate. A file that fails is not converted: its row reads Validation Failed, and the recovery hint offers Convert Anyway to bypass the gate for that file.

This is the setting to use when you want a conversion run to stop at bad input rather than produce output you will have to throw away.


Issue severities

Severity Meaning
Critical File cannot be converted correctly with this profile
Error Significant profile violation affecting output quality
Warning Minor deviation unlikely to affect output
Info Informational notes about file structure

Critical and Error are blocking. Warning and Info are advisory, and do not stop a conversion.


Choosing what to validate against

The Validate output against profile checkbox on the Profiles tab re-labels itself based on the selected CGM profile, because the target SVG profile differs:

CGM profile Checkbox label
S1000D Validate output against S1000D 6.0 SVG profile
ATA iSpec 2200 Validate output against ATA SVG profile
WebCGM 2.1 Validate output against WebCGM 2.1 profile
CALS Validate SVG well-formedness (no CALS-specific output profile exists)

CALS disclosure

MIL-PRF-28003 specifies a CGM v1 input profile; there is no matching CALS SVG profile. The checkbox tooltip spells this out verbatim:

MIL-PRF-28003 defines CGM v1 constraints for input; there is no corresponding CALS SVG profile. When enabled, output is checked for SVG well-formedness and the absence of APS intelligence (which CALS does not specify).

For PIP / CGGC, Default (balanced), and High Quality Print the checkbox is replaced with:

Profile-specific SVG validation unavailable — no target output profile is defined for this scenario.

This keeps the interface honest about what each toggle actually runs.


Getting a report out

The desktop application shows results in the queue; it does not export them. For a machine-readable report — QA tracking, supplier feedback, or a CI gate — use the command line:

reforge-cli validate ./figures --profile s1000d --format json > validation.json

validate exits 0 when the files are valid, 2 when there are warnings only, and 1 when any file has errors. Adding --strict makes warnings exit 1 as well, which is what you want gating a pipeline. See validate for the full reference.


What next?