### Importing a CSV File

Note: The information from a CSV file can only be imported.

To import information from a CSV file, navigate to File | Import | CSV... from the menu option.

Each row in the CSV file represents a feature and a feature command will be created for each row of data. If tolerance values are specified, a location dimension command is also added.

The first row of the CSV file contains the format designators. This designator row indicates the data for each column. There are predefined column headers. Columns that do not include a format designator or that have an unrecognized column header are ignored. Columns can be in any order. If the “Type” column is missing or if there is no feature type specified for a row of data, this row of information will be treated as a “Point” feature.

If a row has only an asterisk in column 1 of the first column with no other information in the row, this is a signal that the next row will again be a format designator row. This allows the user to switch formats inside a single CSV file.

File Format

A CSV file is a Comma Separated Values file that can be created by many software packages, including Microsoft Excel. Here is an example of an Excel table used to create a CSV file:

Partial spreadsheet table example 1 used to create a CSV file - continued below

Continuation of the spreadsheet table example from above used to create a CSV file

Download the above CSV example file here: CSV_Example_File.csv

Another example of a spreadsheet table used to create a CSV file is shown below:

TYPE | NAME | X | Y | Z | +TOL | -TOL
Point | X48a001 | 68 | 90 | 14 | 0.05 | 0.05
Point | X48a002 | 74 | 85 | 12 | 0.05 |
Point | X48a006 | 76 | 84 | 11 |  |
Point | X48a011 | 79 | 83.5 | 10.75 | 0.035 | 0.035
Point | X48a021 | 85 | 83.25 | 10.67 | 0.035 | 0.035
Point | X48a022 | 88 | 82.375 | 10.5 | 0.035 | 0.035
Point | X48a029 | 97 | 82.125 | 10.375 | 0.05 | 0.05
* |  |  |  |  |  |
TYPE | NAME | X | Y | D | +TOL | -TOL
CIRCLE | X48b989 | 124 | 50 | 12 | 0.065 | 0.065

Spreadsheet table example 2 used to create a CSV file

Note that in the second example, row two is a point feature and that both +TOL and –TOL are specified. Both a point feature command and a location dimension command will be added based on this row of information.

Neither +TOL nor –TOL are specified in the point feature in row four. Only a feature command will be added. A location dimension command will not be added.

Row nine includes no data except for an asterisk in column 1. This indicates that the next row, row ten, will include a new format designator row.

Format Designators

The following is a list describing the valid entries allowed when creating a CSV file that will be imported.

TYPE – this is the feature type. The legal entries for this column are: Point, Line, Plane, Circle, Ellipse, SlotR, SlotS, SlotN, Polygon, Cylinder, Cone and Sphere.

NAME – Feature name

X – Feature’s nominal X-value

Y – Feature’s nominal Y-value

Z – Feature’s nominal Z-value

X2 – Feature’s second nominal X-value

Y2 – Feature’s second nominal Y-value

Z2 – Feature’s second nominal Z-value

D – Feature’s nominal Diameter

A – Feature’s nominal Angle in degrees

L – Feature’s nominal Length

W – Feature’s nominal Width

i – Feature’s nominal i-vector

j – Feature’s nominal j-vector

k – Feature’s nominal k-vector

i2 – Feature’s second nominal i-vector

j2 – Feature’s second nominal j-vector

k2 – Feature’s second nominal k-vector

+TOL – Feature’s plus TOLerance

-TOL – Feature’s minus TOLerance

File Import

The following describes the sequence of events that occur when a CSV file is being imported:

1. Each row of data is read into PC-DMIS from the CSV file.

2. The information is matched with the previously defined column headers to determine the meaning to each item of information.

3. Based on the feature type the information is used to create a feature command.

4. If one or both tolerance values are specified, a location dimension command is also added.