Please enable JavaScript to view this site.

Knowledge Base

This command adds a LC grid attribute or analysis group containing a liquid crystal structure and LC grid attribute with data imported from a specified csv (comma separated value) file without using the GUI import wizard. The arguments allow you to make the same choices that are available in the GUI. For more information about the GUI import wizard, see Import object - Liquid crystal from CSV.


Supported Product: FDTD, MODE





Import the csv file from the specified filename. All arguments after the filename are optional.

out = importcsvlc(filename,option);

Import the csv file but specify if it should be imported as a single grid attribute or added to an analysis group LC structure.

out = importcsvlc(filename,option,exported_from_xz_plane);

Import the csv file and specify if it was originally exported from the x-z plane. This option only applies to 2D datasets but is critical to get the orientation of the LC structure correct when it is imported into FDTD Solutions in the x-y plane.

out = importcsvlc(filename,option,exported_from_xz_plane,rotations);

Import the csv file with additional axis rotations.



Default value






The name of the csv file to import. May contain complete path to file, or path relative to current working directory




When set to 1 (true) the import will create an analysis group structure with the grid attribute and a rectangle, the same as when using the graphical import. When set to 0 (false) it will import only the grid attribute. This argument is optional




Applies to 2D datasets only. This indicates that the data was originally exported from the x-z plane and this should be accounted for when it is imported into the x-y plane.




The optional argument allows you to specify 3 rotations around the x, y and z axes respectively that are used exactly the same way as the graphical import wizard. The matrix must have 3 elements and each value will be rounded to the nearest 90 degrees.



The following script command will import the grid attribute from file "myfile.csv" into an LC analysis group and rotate 90 degrees about the x axis.



For more examples on creating LC grid attribute from script visit this kB page: LC rotation.


See Also

addgridattribute, cleardataset, importdataset

Copyright Lumerical Inc. | Privacy | Site Map