> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ntop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to build a custom unit cell from CSV

## Question:

How can I build a custom unit cell with a line segment's start and end points?

How do you build a custom unit cell from CSV?

## Applies to:

* Custom Unit Cell
* Lattices

## Answer:

1. Create your input CSV file. In this example, I will use a CSV file with the following Header where (x1,y1,z1) are the start points and (x2,y2,z2) are the endpoints of the line segments.

```
x1,y1,z1,x2,y2,z2
```

2. Open nTop, and add an **Import Table** block to import your CSV file into nTop

![The import table block](https://files.learn.ntop.com/help-articles/lattices/22754979309715.png)3. Now, use a combination of **Extract Column** as Text and **Scalar from Text** blocks to get the values in CSV as Scalars and **Multiply** with units of your choice.

![Using the Scalar from Text and Extract Column as Text blocks to extract the data from the imported table. The Multiply block is used to apply units to the values](https://files.learn.ntop.com/help-articles/lattices/22754979342099.png)4. Repeat the above step by copy-pasting the above block and changing the Header to the respective ones for all six columns, and you will have x1, y1, z1, and x2, y2, z2.

![Generating line segments from the imported CSV data](https://files.learn.ntop.com/help-articles/lattices/22755025935507.png)5. We now have to convert the Line Segments into graphs to use them as input to the **Custom Unit Cell** block.

![A custom unit cell being generated from the line segments](https://files.learn.ntop.com/help-articles/lattices/22754979363219.png)And that's it; you have successfully made your Custom Unit Cell from a CSV file.

## Keywords:

*question custom csv unit cell table*
