The PCB Design Editor allows the import of component data in CSV format. Use this import to create the basics of a design using placement information such as position and side, or to move existing components to critical locations based on information from another system.
Locating this option
Available from: File menu > Import Design Data option
Importing CSV File
You must have a PCB design open. Select Import Design Data from the File menu. You can then browse for the CSV file that you want to import. You will then be presented with the following dialog.
Units
The data held in the CSV file does not have a units type. Use the Units controls to set up how the positional data will be interpreted. They can be set up as Imperial or Metric units and you can choose what the base unit type is.
Align CSV 0,0 to Origin
Normally, the imported component positions are applied to the lower left corner of the design area. If you prefer, you can choose instead to align the component positions to the Design Coordinate Origin or the current Relative Origin (if defined). To do this, simply check the Align CSV 0,0 checkbox, and choose the origin from the dropdown list.
The format of the Component CSV Data
The file must be in ASCII format and must have the file extension “.csv”.
The first row of the CSV file must contain the column headings for the fields, so that each column of data can be correctly identified.
As a minimum, the file must contain a header line with Ref Name, Part Name, X and Y. Note, the X,Y fields can be left empty but must contain commas.
All empty fields must be defined inside commas.
The full list of columns that can be imported is: Ref Name,Part Name,Side,Placement Centre X,Placement Centre Y,Rotation.
Some of these can be identified in more than one way, to offer more flexibility in reading files from a range of other sources which may use different terminology to that normally used within Pulsonix:
- Ref Name: Ref, RefDes, Comp Name, Component Name, CompName
- Part Name: Part, PartName, Part Name
- Side: Side, Mirrored, Mirror
- Rotation: Rot, Rotation, Angle
- X, Y: any heading containing an X or a Y
If the Part Name field contains spaces or other characters (such as commas), the field must be enclosed in double quotes ” ”, e.g. “R 0.063W SMTF 9K”. Generally speaking, the Part name field is always presented in double quotes.
Values allowed for Side are: T[op] or B[ottom].
If the column defines a mirrored state instead, the values allowed are: Y[es] and N[o]
Reading the file
If a Ref Name matches a component that is already in your design, that component will be moved to the location specified in your CSV file.
If instead there is no component already in the design using that name, the Part Name will be used to add a new component to the design from your Pulsonix library.
Empty values in the X & Y columns means the components are ‘unplaced’ and those components will be put into the Component Bin.
Values defined for Placement Centre X and Y will be used to place the origin of the component at that location.
Examples
An example of a full Component Position CSV file is shown below:
Ref,Part Name,Side,Placement Centre X,Placement Centre Y,Rotation
C1,"c",Top,18700.0,21800.0,270.0
R1,"R",Top,19100.0,22100.0,0.0
R2,"R 0.063W SMTF 9K",Top,19300.0,22100.0,90.0
R3,"R 0.063W SMTF 9K",Top,19600.0,22100.0,0.0
U1,"SN74AC00D",Top,19300.0,21700.0,0.0
An example of a minimum Component Position CSV file is shown below, note that commas are required for empty X,Y fields:
Ref,Part Name,X,Y
C1,"c",,
R1,"R",,
R2,"R 0.063W SMTF 9K",,
R3,"R 0.063W SMTF 9K",,
U1,"SN74AC00D",,