Skip to content

Manage part numbers

GitM can allocate part numbers from a shared registry and stamp them into a file's SolidWorks property. This is an admin-controlled feature and is off by default.

The part-number registry is shared with GitMCloud — numbers can be allocated by GitMCloud and stamped by GitM using the same algorithm. See GitMCloud docs.

How it works

  • The registry lives at .gitm/partnumbers.json in the repository and is remote-authoritative: the source of truth is on GitHub (read/written via the GitHub API), never a local-only copy.
  • A number can be allocated by GitM or by GitMCloud (which cannot stamp the file). GitM stamps the number into the file's PartNumber property and marks it stamped.
  • The allocation algorithm (counter, padding, collision rules) is mirrored exactly by GitMCloud so both stay collision-compatible.

The auto-assign toggle

There is a setting, auto-assign part numbers on check-in, under Settings → Behavior → Part Numbers. It is:

  • Off by default.
  • Admin/Manager-gated — only users whose GitHub permission on the repo is Maintain or Admin can change it. For everyone else the section is read-only (shown with a lock icon).

When on, GitM assigns a part number to a file that doesn't have one as part of check-in.

Prerequisites

  • Admin/Manager (Maintain/Admin) permission on the GitHub repository.
  • GitMCloud reachable (the policy and registry are remote-authoritative).

Turn auto-assign on or off

  1. Open Settings → Behavior.
  2. In the Part Numbers section (admin only), toggle auto-assign on check-in.
  3. Save. If you're an admin, GitM writes the policy back to the registry on GitHub so it applies team-wide.

Why it's off by default

Auto-assigning on every check-in creates registry commits on GitHub. If those happen out of band, they push the remote ahead and cause other people's check-ins to be rejected ("fetch first"). Keeping it off avoids surprise push conflicts; turn it on deliberately when your team wants enforced numbering.

Expected result

  • With the toggle off: no automatic numbering; numbers are only assigned when explicitly requested.
  • With the toggle on (admin set): files without a number get one on check-in, recorded in .gitm/partnumbers.json.

Troubleshooting

Symptom Cause Fix
Toggle is greyed out You're not Admin/Manager. Only admins can change it.
Check-ins started getting rejected after enabling Registry commits move the remote ahead. Have members Get Latest before checking in; consider turning auto-assign off.
A number was allocated but not stamped in the file Allocated by GitMCloud while the file wasn't open. GitM finishes stamping when the file is next open and reconciled.

Known limitations

  • Part-number generation isn't in the original PRD (which excluded item management). It's a shipped feature — see Known limitations and discrepancies.
  • The registry is remote-authoritative; offline allocation is intentionally not supported, to avoid collisions.