drawings

Link Callout

Manually link (or unlink) a drawing callout to a 3D feature.

This persists the link in two places:

  1. Immediate: mutates part.drawing_analysis[category][idx].feature_id in place so the frontend sees the link reflected on the next query. Uses flag_modified because SQLAlchemy's MutableDict does not recursively track nested mutations (see comment on Part.drawing_analysis).
  2. Durable: creates an OutcomeEvent with outcome_type="user_drawing_link" so the stitcher respects the user's choice on re-run (and we have an audit trail).

Validates:

  • User owns the parent project (404 otherwise)
  • Category is one of the valid drawing_analysis field names (400 otherwise)
  • callout_index is within bounds (400 otherwise)
  • When action='link', target_feature_id is provided AND exists on a detected feature in the part's latest CAD version (400 otherwise)
post/api/v1/parts/{part_id}/drawings/link-callout

Request

Path parameters

part_idstring uuid required

Request body

categorystring required

Drawing callout category: tolerances, gd_and_t, surface_finish, threads, bores, chamfers, radii

callout_indexinteger required

Zero-based index into drawing_analysis[category]

target_feature_idstring nullable

The 3D feature_id to link this callout to. Required when action='link'. Ignored when action='unlink'.

actionstring required

'link' or 'unlink'

Response

Successful Response

drawing_analysisobject required

Updated drawing_analysis after the link/unlink

Changes

No recorded changes to this operation across all 1 revision of this API.