# Importing Ray files?

**URL:** <https://community.wolfram.com/t/importing-ray-files/19110>\
**Category:** Questions\
**Tags:** optics, import-and-export\
**Created:** [November 11, 2021, 9:31am UTC](https://community.wolfram.com/t/importing-ray-files/19110 "2021-11-11T09:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![federicomassimi](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@federicomassimi](https://community.wolfram.com/u/federicomassimi)\
**Post date:** [November 11, 2021, 9:31am UTC](https://community.wolfram.com/t/importing-ray-files/19110/1 "2021-11-11T09:31:03Z")

</div>

Hi, I need to import a ray file into Wolfram, the formats I have available are these:

 ![Immagine2021-11-11102019.jpg](https://global.discourse-cdn.com/wolfram/original/3X/1/4/14bb00b20555d89597eddda93947376517513099.jpeg)

Can any of these be imported directly into Wolfram?

---

<div class="post-metadata">

**Author:** ![juergenkanz](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/juergenkanz/32/27193_2.png) [@juergenkanz](https://community.wolfram.com/u/juergenkanz)\
**Post date:** [November 13, 2021, 4:57pm UTC](https://community.wolfram.com/t/importing-ray-files/19110/2 "2021-11-13T16:57:36Z")

</div>

As far as I know there is no standard import function in WL. I suggest to take one of the _txt_ files, because these are ASCII files while all others are binary files. The differences between the ASCII files are small. Each optic simulation software supplier has a few features embedded in the belonging files.  
I propose to use the Opticad\_txt file, because this is almost the original ProSource ASCII format.

As the final step, you can read the file content with a Code similar to [Importing and Exporting Data](https://reference.wolfram.com/applications/eda/ImportingAndExportingData.html)

To test your code I suggest to take a file with less rays.

---

<div class="post-metadata">

**Author:** ![juergenkanz](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/juergenkanz/32/27193_2.png) [@juergenkanz](https://community.wolfram.com/u/juergenkanz)\
**Post date:** [November 25, 2021, 4:17pm UTC](https://community.wolfram.com/t/importing-ray-files/19110/3 "2021-11-25T16:17:53Z")

</div>

Please have a look at my last post: [https://community.wolfram.com/groups/-/m/t/2413724](https://community.wolfram.com/groups/-/m/t/2413724)
