# Please demonstrate API code for Using saved Pattern file?

**URL:** <https://forum.liquidinstruments.com/t/please-demonstrate-api-code-for-using-saved-pattern-file/797>\
**Category:** Software & APIs\
**Created:** [August 29, 2023, 6:44am UTC](https://forum.liquidinstruments.com/t/please-demonstrate-api-code-for-using-saved-pattern-file/797 "2023-08-29T06:44:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MAHADESH](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@MAHADESH](https://forum.liquidinstruments.com/u/MAHADESH)\
**Post date:** [August 29, 2023, 6:44am UTC](https://forum.liquidinstruments.com/t/please-demonstrate-api-code-for-using-saved-pattern-file/797/1 "2023-08-29T06:44:09Z")

</div>

The Logic Analyzer/Pattern Generator is progranmmed using GUI. and the pattern file is saved in PC. can you demonstarte how to use this file in API and control the Pattern Generator and apply that to Logic gates connected to on bread board

---

<div class="post-metadata">

**Author:** ![bnizette](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/bnizette/32/72_2.png) [@bnizette](https://forum.liquidinstruments.com/u/bnizette)\
**Post date:** [August 30, 2023, 10:54pm UTC](https://forum.liquidinstruments.com/t/please-demonstrate-api-code-for-using-saved-pattern-file/797/2 "2023-08-30T22:54:37Z")

</div>

Hi @MAHADESH, the pattern export file from the GUI is a standard CSV file, so the first step is to load this CSV file in to an array in your script, e.g. using the `csv` library for Python or `loadtable` or `readmatrix` in MATLAB.

We currently only have a single Logic Analyzer example script on our examples page, [here](https://apis.liquidinstruments.com/examples/python/#logic-analyzer). On line 20, you’ll see how you load a pattern in to the pattern generator. You would change this line so each dictionary’s `pattern` array is one column of the CSV file.

This two step process is a little more work than having a single “load” function in our API, but it means that you can choose to only load some pins, or to remap which pins get which signals so is much more powerful. We may add a simple load function in the future though for this use case.

Hope this helps!
