Upload XYRS File

Provide or Overwrite The XYRS Data for the PCB Version

By Default, the Bill of Materials and Placement Data express the EDA-defined
data about your board. This data is essential for the production of your
PCB. Within this data is critical information about each component, it's
X and Y center (in thousandths of an inch), and the pad width and height
of the component (in thousandths of an inch).

Upload one or more files as multipart/form-data, each in a form field named file. The file
type is detected from its extension:

  • XYRS files (.xyrs; tab-separated text, as returned by
    GET /api/v2/pcb/{pcb_id}/{pcb_version}/xyrs) are applied immediately. The placement data
    for each component in the file is replaced, and the bill of materials is updated to match.
  • Excel spreadsheets (.xlsx or .xls) are parsed and staged for review in the Bill of
    Materials view of the PCB in the MacroFab platform.

Pass dry_run=true to validate a file without saving anything.

An XYRS file has one line per component, with columns separated by tabs. Lines starting with
# are ignored. Columns are identified by position, in the order below. You must provide for
each component the first nine values (designator through value):

  • designator
    • The unique designator for the component
    • e.g.: 'R1', 'C23', etc.
  • x_loc
    • The X-location of the center of the component, in thousandths of an inch
    • 0,0 location is the bottom-left of the PCB at the center of the board outline
    • e.g.: 1023, 59.5, etc.
  • y_loc
    • The Y-location of the center of the component, in thousandths of an inch
    • 0,0 location is the bottom-left of the PCB at the center of the board outline
    • e.g.: 1023, 59.5, etc.
  • rotation
    • The rotation of the component
    • Rotation is clockwise
    • Zero rotation (0) assumes that locating pin on the component is at or nearest to the top-left, 180 assumes bottom-right
  • board_side
    • Which side of the board the component is on
    • 1 = top, 2 = bottom
  • component_type
    • What type of component is this?
    • 1 = SMD, 2 = PTH
  • x_size
    • The width of a box which just contains all pads (e.g. the "pad width") in thousandths of an inch
    • This data is used to display the component on the placement tab in the UI
    • If you cannot extract this data from your EDA tool, specify any value which is neither too large nor too small to effectively manage rotation in the UI
  • y_size
    • The height of a box which just contains all pads (e.g. the "pad height") in thousandths of an inch
    • This data is used to display the component on the placement tab in the UI
    • If you cannot extract this data from your EDA tool, specify any value which is neither too large nor too small to effectively manage rotation in the UI
  • value
    • The component value
    • The system will automatically match this field for a manufacturer's part number and select that component if it is available on the market
      • To perform automatic matching, provide the exact part number, e.g. "FOO-12235.111/EX"
    • For parts such as resistors and capacitors, the system will automatically combine the value and footprint to search for "nearest compatible" house parts
  • footprint (optional)
    • The footprint for the part
    • e.g. "R0402", "C0603", "SOT-23-3", etc.
  • populate (optional)
    • Whether the component should be placed, 1 or 0
  • mpn, mpn1, mpn2, mpn3 (optional)
    • Manufacturer part numbers to use for the component, in order of preference
  • selected_mpn, selected_mfg (optional)
    • The MPN and manufacturer of the part selected for the component
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The PCB ID

integer
required

The PCB version number

Query Params
boolean
Defaults to false

Parse and validate the files only. Nothing is stored and no processing is started;
validation errors are still returned.

Body Params
file
array of files
required

The XYRS or XLSX file(s) to import

Responses
204

The files were imported (or, with dry_run, validated)

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json