<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>File Formats — KLayout</title>
        <link>https://www.klayout.de/forum/</link>
        <pubDate>Sat, 05 Sep 2026 20:29:30 +0000</pubDate>
        <language>en</language>
            <description>File Formats — KLayout</description>
    <atom:link href="https://www.klayout.de/forum/categories/file-formats/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>magic file to klayout for SKY130</title>
        <link>https://www.klayout.de/forum/discussion/2885/magic-file-to-klayout-for-sky130</link>
        <pubDate>Tue, 01 Sep 2026 16:31:05 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>laurent_c</dc:creator>
        <guid isPermaLink="false">2885@/forum/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I have tried to transfer a SKY130 magic file .mag to KLayout. It can be read, but the GDS numbers are not OK, only the layer names even if I use the layer mapping such as (also attached) : <br />
NWELL:64/20<br />
DIFF:65/20<br />
TAP:65/44<br />
DNWELL:64/18</p>

<p>What is the proper method to read a SKY130 mag file with KLayout ? Maybe the mapping is sensitive to layer name case ?</p>

<p>Thank you, BRgds,<br />
Laurent</p>
]]>
        </description>
    </item>
    <item>
        <title>Import DXF files with blocks rotated by angles other than 90,180,270 degrees</title>
        <link>https://www.klayout.de/forum/discussion/2880/import-dxf-files-with-blocks-rotated-by-angles-other-than-90-180-270-degrees</link>
        <pubDate>Mon, 27 Jul 2026 20:38:03 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>Miles_G</dc:creator>
        <guid isPermaLink="false">2880@/forum/discussions</guid>
        <description><![CDATA[<p>Currently the rotation seems to be assigned to equal the closest multiple of 90.  So 66.6 degrees becomes 90 degrees, silently.  Is there a way around this?  Adding a warning message when this is encountered would be good.</p>
]]>
        </description>
    </item>
    <item>
        <title>OASIS, the successor to GDS</title>
        <link>https://www.klayout.de/forum/discussion/2152/oasis-the-successor-to-gds</link>
        <pubDate>Sat, 03 Sep 2022 16:37:06 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>demis</dc:creator>
        <guid isPermaLink="false">2152@/forum/discussions</guid>
        <description><![CDATA[<p>I thought KLayout users would find this very helpful, on why .OAS format results in smaller file sizes and apparently some performance improvements as well:</p>

<ul>
<li><p><a rel="nofollow" href="https://sst.semiconductor-digest.com/2020/02/oasis-vs-gds-time-to-switch/" title="OASIS vs. GDS: Time to switch?  (Semiconductor Digest)">OASIS vs. GDS: Time to switch?  (Semiconductor Digest)</a></p></li>
<li><p><a rel="nofollow" href="https://www.techdesignforums.com/practice/technique/from-gdsii-to-oasis/" title="From GDSII to OASIS (Tech Design Forum)">From GDSII to OASIS (Tech Design Forum)</a></p></li>
</ul>

<p>I have personally switched to OASIS after Mattias pointed out that OASIS saves Layer <em>names</em> (in addition to layer numbers), and subsequently found that my file sizes would go from 150MB (GDS) --&gt; 25kB (OAS), an even more important fact for transferring GB-level files.  It's now my standard format, converting to GDS only on the writing tools that require it (Heidelberg for example).</p>
]]>
        </description>
    </item>
    <item>
        <title>Pcell inside GDSII</title>
        <link>https://www.klayout.de/forum/discussion/2863/pcell-inside-gdsii</link>
        <pubDate>Thu, 02 Apr 2026 20:11:38 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>alto</dc:creator>
        <guid isPermaLink="false">2863@/forum/discussions</guid>
        <description><![CDATA[<p>As far I remember GDSII does not support pcell but klayout use GDSII to store them.<br />
I guess it store the parameters with function/macro name used, with the hope that when the layout is opened back the macro is there.<br />
Is this correct ?<br />
Give that, is this GDSII still compatible with GDSII create by other tools ?</p>
]]>
        </description>
    </item>
    <item>
        <title>Converting an SVG path to a gds path</title>
        <link>https://www.klayout.de/forum/discussion/2783/converting-an-svg-path-to-a-gds-path</link>
        <pubDate>Mon, 15 Sep 2025 22:31:03 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>mhanberry1</dc:creator>
        <guid isPermaLink="false">2783@/forum/discussions</guid>
        <description><![CDATA[<p>I would like to include my company's logo in the gds file, so I was wondering if anyone knows of an easy way to convert svg paths into a gds path. I say "path" rather than "file", because my logo only includes SVG path elements, and I think converting every SVG primitive to gds might be a little ambitious.</p>

<p>I'm tempted to write a qt widget macro to do it myself, but I don't want to duplicate work if there is already a good method.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to set up layer mapping (dxf(layerName) ↔ gds(layerNum))</title>
        <link>https://www.klayout.de/forum/discussion/2766/how-to-set-up-layer-mapping-dxf-layername-gds-layernum</link>
        <pubDate>Mon, 11 Aug 2025 05:16:27 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>jun</dc:creator>
        <guid isPermaLink="false">2766@/forum/discussions</guid>
        <description><![CDATA[<p>Hello.<br />
I want to know how to set up layer mapping when converting layout file format (dxf→gds).<br />
I searched it <br />
File → Reader Options (Layout Reader Options) → DXF → Layer Subset And Layer Mapping<br />
I set up mapping information (ex. A:1/0, B:2/0, C:3/0, ...) in 'Selected layers or mapping (See here for details)' Table <br />
but when I convert dxf to gds, It didn't convert as I wanted (Only some of them are converted and selected layer number unintentionally)<br />
<img src="https://www.klayout.de/forum/uploads/editor/af/emyidd4ilync.png" alt="" title="" /></p>

<p>How exactly does the manual conversion work without using Python code?<br />
Experts, please help me</p>
]]>
        </description>
    </item>
    <item>
        <title>How is the rasterization function used to read a GDS file based on the C++ API?</title>
        <link>https://www.klayout.de/forum/discussion/2652/how-is-the-rasterization-function-used-to-read-a-gds-file-based-on-the-c-api</link>
        <pubDate>Tue, 07 Jan 2025 08:22:45 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>leo_cy</dc:creator>
        <guid isPermaLink="false">2652@/forum/discussions</guid>
        <description><![CDATA[<p>I referred to the functions in klayout-master/src/layview/unit_tests/layLayoutViewTests.cc and wrote the following code, but I was unable to read the GDS file successfully. The error occurs in the Reader::Reader function in dbReader.cc  (throw db::ReaderUnknownFormatException (tl::to_string (tr ("Stream has unknown format: ")) + stream.source (), head, has_more);)</p>

<pre><code>lay::LayoutView lv(0, false, 0);
lv.set_drawing_workers(2);
lv.cell_box_color(tl::Color(0, 0, 0));

lv.load_layout("D:/vs2017/klayout/build/collect_basic_bg.gds", true);

tl::PixelBuffer img;
img = lv.get_pixels_with_options(500, 500, 1, 1, 1.0, 1.0, tl::Color(255, 255, 255), tl::Color(0, 0, 0), tl::Color(128, 128, 128), db::DBox());
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>GDS to DEF</title>
        <link>https://www.klayout.de/forum/discussion/2560/gds-to-def</link>
        <pubDate>Thu, 01 Aug 2024 04:27:49 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>dai</dc:creator>
        <guid isPermaLink="false">2560@/forum/discussions</guid>
        <description><![CDATA[<p>Hi <a href="https://www.klayout.de/forum/profile/Matthias" rel="nofollow">@Matthias</a> ,<br />
Klayout can export GDS to DEF file? If it is possible so how to do it?<br />
I tried to use "save as" but it is not success because in "write option dialog box" has not DEF format.<br />
<img src="https://www.klayout.de/forum/uploads/editor/tg/v47h6331dl5m.png" alt="" title="" /></p>

<p>Thank you,<br />
dai</p>
]]>
        </description>
    </item>
    <item>
        <title>immense amount of GDS to DXF</title>
        <link>https://www.klayout.de/forum/discussion/559/immense-amount-of-gds-to-dxf</link>
        <pubDate>Wed, 07 Jan 2015 22:15:35 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>lunanz88</dc:creator>
        <guid isPermaLink="false">559@/forum/discussions</guid>
        <description><![CDATA[Hello,<br />
<br />
I have hundreds of .GDS files and I need to convert them to .DXF files. I can convert them one by one ( save a .GDS as .DXF ). But it would take quite a long time to convert all the .GDS. Is there any way to convert them at the same time (or faster)?]]>
        </description>
    </item>
    <item>
        <title>OpenAccess format</title>
        <link>https://www.klayout.de/forum/discussion/36/openaccess-format</link>
        <pubDate>Mon, 04 Jan 2010 16:45:58 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>kenji_morohashi</dc:creator>
        <guid isPermaLink="false">36@/forum/discussions</guid>
        <description><![CDATA[Hi,<br />
<br />
I find Klayout product just now and tried Windows Klayout.<br />
# My 2GB GDS make Klayout crash. This may caused by out of memroy(2GB) in Windows. I will try on Linux later.<br />
<br />
Can you consider to read OpenAcess(OA) DB on Klayout?<br />
# You may know that GDS can read into OA using strm2oa utility.<br />
<br />
Regards,<br />
-Kenji Morohashi-]]>
        </description>
    </item>
    <item>
        <title>How to convert gds to dxf (using convert options. Set layerName, layer Color...)</title>
        <link>https://www.klayout.de/forum/discussion/2543/how-to-convert-gds-to-dxf-using-convert-options-set-layername-layer-color</link>
        <pubDate>Mon, 08 Jul 2024 04:16:24 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>jun</dc:creator>
        <guid isPermaLink="false">2543@/forum/discussions</guid>
        <description><![CDATA[<p>Hello. i'm a beginner<br />
I would like to know the following two things</p>

<ol>
<li><p>how to convert gds to dxf through a script <br />
(I Know this is a duplicate question but, i want to know a brief example)</p></li>
<li><p>how to set convert options<br />
(gds layerNumber → dxf layerName, Color)</p></li>
</ol>

<p>I really need help..</p>
]]>
        </description>
    </item>
    <item>
        <title>Analyze GDS file from Ansys Lumerical GDS_auto_export</title>
        <link>https://www.klayout.de/forum/discussion/2494/analyze-gds-file-from-ansys-lumerical-gds-auto-export</link>
        <pubDate>Wed, 17 Apr 2024 13:20:53 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>tgustafson</dc:creator>
        <guid isPermaLink="false">2494@/forum/discussions</guid>
        <description><![CDATA[<p>Lumerical has a suggested <a rel="nofollow" href="https://optics.ansys.com/hc/en-us/articles/1500006203341-GDSII-Export-Automation" title="script">script</a> that automatically exports the structures into a GDSII file, but there is a caveat:<br />
<strong>Doesn't work for Klayout 0.27+</strong></p>

<p>Thanks to this post (<a rel="nofollow" href="https://www.klayout.de/forum/discussion/2443/error-reading-gdsii-file" title="Error reading GDSII file">Error reading GDSII file</a>), i was able to use dump_oas_gds2 to view a GDS file that throws an error in the current version of Klayout. I have created my own script that allows me to export GDS files, so I would consider the problem solved, but it did raise two questions:</p>

<ol>
<li><p>I am curious if anyone would comment on the difference between Klayout 0.27+ and previous that allows the older versions to view the file? I can use 0.24.10 to view the file without error.</p></li>
<li><p>Is there any suggested way of editing a GDS file that won't open in Klayout, or perhaps, editing in an older version to allow it to work in newer versions of Klayout?</p></li>
</ol>

<p></p><details><br />
  <summary>dump_oas_gds2 output</summary><br />
 ```<br />
000   00 06 00 02              HEADER<br />
004   00 03                      3<br />
006   00 1c 01 02              BGNLIB<br />
010   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
018 + 00 35 00 0b <br />
022   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
030 + 00 35 00 0b <br />
034   00 10 02 06              LIBNAME<br />
038   6f 75 74 70 75 74 5f 64    "outputdemo"<br />
046 + 65 6d 6f 00 <br />
050   00 14 03 05              UNITS<br />
054   3e 41 89 37 4b c6 a7 f0    0.001<br />
062   39 44 b8 2f a0 9b 5a 54    1e-09<br />
070   00 1c 05 02              BGNSTR<br />
074   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
082 + 00 35 00 0b <br />
086   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
094 + 00 35 00 0b <br />
098   00 0c 06 06              STRNAME<br />
102   74 72 69 61 6e 67 6c 65    "triangle"<br />
110   00 04 08 00              BOUNDARY<br />
114   00 06 0d 02              LAYER<br />
118   00 04                      4<br />
120   00 06 0e 02              DATATYPE<br />
124   00 00                      0<br />
126   00 24 10 03              XY<br />
130   00 00 13 88 00 00 0e ec    5000,3820<br />
138   00 00 14 24 00 00 0f fa    5156,4090<br />
146   00 00 12 ec 00 00 0f fa    4844,4090<br />
154   00 00 13 88 00 00 0e ec    5000,3820<br />
162   00 04 11 00              ENDEL<br />
166   00 04 07 00              ENDSTR<br />
170   00 1c 05 02              BGNSTR<br />
174   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
182 + 00 35 00 0b <br />
186   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
194 + 00 35 00 0b <br />
198   00 0e 06 06              STRNAME<br />
202   72 65 63 74 61 6e 67 6c    "rectangle"<br />
210 + 65 00 <br />
212   00 04 08 00              BOUNDARY<br />
216   00 06 0d 02              LAYER<br />
220   00 01                      1<br />
222   00 06 0e 02              DATATYPE<br />
226   00 00                      0<br />
228   00 2c 10 03              XY<br />
232   00 00 03 e8 00 00 03 e8    1000,1000<br />
240   00 00 0b b8 00 00 03 e8    3000,1000<br />
248   00 00 0b b8 00 00 0b b8    3000,3000<br />
256   00 00 03 e8 00 00 0b b8    1000,3000<br />
264   00 00 03 e8 00 00 03 e8    1000,1000<br />
272   00 04 11 00              ENDEL<br />
276   00 04 07 00              ENDSTR<br />
280   00 1c 05 02              BGNSTR<br />
284   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
292 + 00 35 00 0b <br />
296   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
304 + 00 35 00 0b <br />
308   00 0e 06 06              STRNAME<br />
312   72 65 63 74 61 6e 67 6c    "rectangle2"<br />
320 + 65 32 <br />
322   00 04 08 00              BOUNDARY<br />
326   00 06 0d 02              LAYER<br />
330   00 05                      5<br />
332   00 06 0e 02              DATATYPE<br />
336   00 00                      0<br />
338   00 2c 10 03              XY<br />
342   00 00 0d ac 00 00 0d ac    3500,3500<br />
350   00 00 11 94 00 00 0d ac    4500,3500<br />
358   00 00 11 94 00 00 11 94    4500,4500<br />
366   00 00 0d ac 00 00 11 94    3500,4500<br />
374   00 00 0d ac 00 00 0d ac    3500,3500<br />
382   00 04 11 00              ENDEL<br />
386   00 04 07 00              ENDSTR<br />
390   00 1c 05 02              BGNSTR<br />
394   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
402 + 00 35 00 0b <br />
406   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
414 + 00 35 00 0b <br />
418   00 0a 06 06              STRNAME<br />
422   6d 6f 64 65 6c 00          "model"<br />
428   00 04 0a 00              SREF<br />
432   00 14 12 06              SNAME<br />
436   73 74 72 75 63 74 75 72    "structure group"<br />
444 + 65 20 67 72 6f 75 70 00 <br />
452   00 0c 10 03              XY<br />
456   00 00 00 00 00 00 00 00    0,0<br />
464   00 04 11 00              ENDEL<br />
468   00 04 07 00              ENDSTR<br />
472   00 1c 05 02              BGNSTR<br />
476   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
484 + 00 35 00 0b <br />
488   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
496 + 00 35 00 0b <br />
500   00 14 06 06              STRNAME<br />
504   73 74 72 75 63 74 75 72    "structure group"<br />
512 + 65 20 67 72 6f 75 70 00 <br />
520   00 04 0a 00              SREF<br />
524   00 0c 12 06              SNAME<br />
528   74 72 69 61 6e 67 6c 65    "triangle"<br />
536   00 0c 10 03              XY<br />
540   00 00 00 00 00 00 00 00    0,0<br />
548   00 04 11 00              ENDEL<br />
552   00 04 07 00              ENDSTR<br />
556   00 1c 05 02              BGNSTR<br />
560   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
568 + 00 35 00 0b <br />
572   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
580 + 00 35 00 0b <br />
584   00 0c 06 06              STRNAME<br />
588   74 72 69 61 6e 67 6c 65    "triangle"<br />
596   00 04 07 00              ENDSTR<br />
600   00 1c 05 02              BGNSTR<br />
604   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
612 + 00 35 00 0b <br />
616   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
624 + 00 35 00 0b <br />
628   00 14 06 06              STRNAME<br />
632   73 74 72 75 63 74 75 72    "structure group"<br />
640 + 65 20 67 72 6f 75 70 00 <br />
648   00 04 0a 00              SREF<br />
652   00 0e 12 06              SNAME<br />
656   72 65 63 74 61 6e 67 6c    "rectangle"<br />
664 + 65 00 <br />
666   00 0c 10 03              XY<br />
670   00 00 00 00 00 00 00 00    0,0<br />
678   00 04 11 00              ENDEL<br />
682   00 04 07 00              ENDSTR<br />
686   00 1c 05 02              BGNSTR<br />
690   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
698 + 00 35 00 0b <br />
702   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
710 + 00 35 00 0b <br />
714   00 0e 06 06              STRNAME<br />
718   72 65 63 74 61 6e 67 6c    "rectangle"<br />
726 + 65 00 <br />
728   00 04 07 00              ENDSTR<br />
732   00 1c 05 02              BGNSTR<br />
736   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
744 + 00 35 00 0b <br />
748   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
756 + 00 35 00 0b <br />
760   00 14 06 06              STRNAME<br />
764   73 74 72 75 63 74 75 72    "structure group"<br />
772 + 65 20 67 72 6f 75 70 00 <br />
780   00 04 0a 00              SREF<br />
784   00 0e 12 06              SNAME<br />
788   72 65 63 74 61 6e 67 6c    "rectangle2"<br />
796 + 65 32 <br />
798   00 0c 10 03              XY<br />
802   00 00 00 00 00 00 00 00    0,0<br />
810   00 04 11 00              ENDEL<br />
814   00 04 07 00              ENDSTR<br />
818   00 1c 05 02              BGNSTR<br />
822   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
830 + 00 35 00 0b <br />
834   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
842 + 00 35 00 0b <br />
846   00 0e 06 06              STRNAME<br />
850   72 65 63 74 61 6e 67 6c    "rectangle2"<br />
858 + 65 32 <br />
860   00 04 07 00              ENDSTR<br />
864   00 1c 05 02              BGNSTR<br />
868   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
876 + 00 35 00 0b <br />
880   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
888 + 00 35 00 0b <br />
892   00 14 06 06              STRNAME<br />
896   73 74 72 75 63 74 75 72    "structure group"<br />
904 + 65 20 67 72 6f 75 70 00 <br />
912   00 04 07 00              ENDSTR<br />
916   00 1c 05 02              BGNSTR<br />
920   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
928 + 00 35 00 0b <br />
932   07 e8 00 04 00 11 00 0d    2024-04-17 13:53:11<br />
940 + 00 35 00 0b <br />
944   00 0a 06 06              STRNAME<br />
948   6d 6f 64 65 6c 00          "model"<br />
954   00 04 07 00              ENDSTR<br />
958   00 04 04 00              ENDLIB<br />
</details>
]]>
        </description>
    </item>
    <item>
        <title>The issue of .lydrc file</title>
        <link>https://www.klayout.de/forum/discussion/2515/the-issue-of-lydrc-file</link>
        <pubDate>Thu, 30 May 2024 13:37:58 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>YWJ</dc:creator>
        <guid isPermaLink="false">2515@/forum/discussions</guid>
        <description><![CDATA[<p>Hello everyone,</p>

<p>I would like to convert a Calibre .rul file into a .lydrc file that can be recognized by KLayout. Does KLayout provide this functionality, or are there any related scripts available elsewhere?</p>
]]>
        </description>
    </item>
    <item>
        <title>can read gds file with Memory-mapped file?</title>
        <link>https://www.klayout.de/forum/discussion/2504/can-read-gds-file-with-memory-mapped-file</link>
        <pubDate>Fri, 10 May 2024 06:20:53 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>power5455</dc:creator>
        <guid isPermaLink="false">2504@/forum/discussions</guid>
        <description><![CDATA[<p>can read gds file with Memory-mapped file? <br />
Have you considered this before and could it improve read speed?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to convert gds file to dxf file through script</title>
        <link>https://www.klayout.de/forum/discussion/2487/how-to-convert-gds-file-to-dxf-file-through-script</link>
        <pubDate>Wed, 03 Apr 2024 08:19:48 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>wildwolfcj</dc:creator>
        <guid isPermaLink="false">2487@/forum/discussions</guid>
        <description><![CDATA[<p>Hello, everyone<br />
I am a newbie in klayout. Please tell me how to convert gds to dxf through a script. The following is the py code I wrote.<br />
"import sys<br />
from pya import *</p>

<p>def main():<br />
    # input_file and output_file are the paths of input and output files respectively<br />
    input_file = "D:&#92;line4.GDS"<br />
    output_file = "D:&#92;line4.dxf"</p>

<pre><code>print("Input GDS file:", input_file)
print("Output DXF file:", output_file)

layout = Layout()
layout.read(input_file)
print("111")
try:
    dxf_stream = DxfOutput()
    print("222")
except Exception as e:
    print("Error:", e)
    return


print("222")

layout.write(dxf_stream)
print("333")

dxf_stream.save_as(output_file)
print("444")

print("Conversion complete.")
</code></pre>

<p>if <strong>name</strong> == "<strong>main</strong>":<br />
    main()<br />
"<br />
But I can't get the dxf file correctly. I hope I can get your help.</p>
]]>
        </description>
    </item>
    <item>
        <title>Error reading GDSII file</title>
        <link>https://www.klayout.de/forum/discussion/2443/error-reading-gdsii-file</link>
        <pubDate>Mon, 18 Dec 2023 21:53:07 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>BillG</dc:creator>
        <guid isPermaLink="false">2443@/forum/discussions</guid>
        <description><![CDATA[<p><img src="https://www.klayout.de/forum/uploads/editor/70/81dtcf8wvmuk.jpg" alt="" title="" /><br />
Can anyone tell me what this error message is, and if there's any way to resolve it? I'm trying to read in a gds file created on another application. It must be messing up a field that klayout needs, but I can't tell what it is.</p>
]]>
        </description>
    </item>
    <item>
        <title>HOW TO EXTRACT KLAYOUT CONSOLE OUTPUT IN ONE FILE TXT FORMATE.</title>
        <link>https://www.klayout.de/forum/discussion/2438/how-to-extract-klayout-console-output-in-one-file-txt-formate</link>
        <pubDate>Fri, 15 Dec 2023 07:32:06 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>ajaout</dc:creator>
        <guid isPermaLink="false">2438@/forum/discussions</guid>
        <description><![CDATA[<p>import pya<br />
import csv<br />
output_file = "/openlane/work/scripts/output.txt"<br />
gds_files = ["/openlane/work/cliped100.gds"]<br />
KLAYOUT = pya.Layout()</p>

<p>for each_gds in gds_files:</p>

<p>KLAYOUT.read(each_gds)<br />
  #print("Cells : ",KLAYOUT.top_cell().name)<br />
  #print("Layers : ",KLAYOUT.layers())</p>

<p>#print("each",KLAYOUT.each_cell())<br />
  for ly_id in KLAYOUT.layer_indices():</p>

<pre><code>#print ("Layer_info: ",KLAYOUT.get_info(ly_id))
layer_name =KLAYOUT.get_info(ly_id)
print('layer_name:',layer_name)
#sh = KLAYOUT.top_cell().each_shape(0)
</code></pre>

<p># print ("shape area : ", sh)<br />
    layer = KLAYOUT.layer(layer_name)<br />
    #print(layer)<br />
    area = 0<br />
    for cell in KLAYOUT.each_cell():<br />
      #print(cell)<br />
      for shape in cell.each_shape(layer):<br />
        area += shape.area()<br />
        print(area)</p>

<p>In this i want store all area value in one txt formate document.<br />
anyone know this ?</p>
]]>
        </description>
    </item>
    <item>
        <title>how to calculate area of my gds by python script.</title>
        <link>https://www.klayout.de/forum/discussion/2439/how-to-calculate-area-of-my-gds-by-python-script</link>
        <pubDate>Fri, 15 Dec 2023 07:33:08 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>ajaout</dc:creator>
        <guid isPermaLink="false">2439@/forum/discussions</guid>
        <description><![CDATA[<p>hi everyone,<br />
i have one question by python script how we can calculate our gds area.</p>
]]>
        </description>
    </item>
    <item>
        <title>Can traced nets be saved to file for re-tracing?</title>
        <link>https://www.klayout.de/forum/discussion/1363/can-traced-nets-be-saved-to-file-for-re-tracing</link>
        <pubDate>Wed, 30 Oct 2019 16:08:49 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>svenn</dc:creator>
        <guid isPermaLink="false">1363@/forum/discussions</guid>
        <description><![CDATA[<p>Using trace net on gerber files to build up the netlist. Would be a shame if I had to do the tracing all over next time I open the pcb. I cannot find any information in the .pcb file related to traces.</p>
]]>
        </description>
    </item>
    <item>
        <title>LVS works alone but doesn't work together</title>
        <link>https://www.klayout.de/forum/discussion/2368/lvs-works-alone-but-doesnt-work-together</link>
        <pubDate>Wed, 13 Sep 2023 13:59:52 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>CMeyer</dc:creator>
        <guid isPermaLink="false">2368@/forum/discussions</guid>
        <description><![CDATA[<p><img src="https://www.klayout.de/forum/uploads/editor/in/22170aebzj6i.png" alt="" title="" /><br />
<img src="https://www.klayout.de/forum/uploads/editor/mx/6eyz8ubeg23w.png" alt="" title="" /></p>

<p>Hello,<br />
I have a problem regarding the LVS verification: it says that the hierarchical LVs are not good, but all my sub-circuits have been verified with a good LVS. I show you an example with not_opt1.</p>

<p>This is the first time I've had this problem, do you have any idea where it's coming from?</p>
]]>
        </description>
    </item>
    <item>
        <title>Are the any special character that isn't supported by either GDS or OAS?</title>
        <link>https://www.klayout.de/forum/discussion/2330/are-the-any-special-character-that-isnt-supported-by-either-gds-or-oas</link>
        <pubDate>Fri, 21 Jul 2023 03:16:40 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>werk</dc:creator>
        <guid isPermaLink="false">2330@/forum/discussions</guid>
        <description><![CDATA[<p>And where can I find such document? Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>Resolving .lib control statements in SPICE netlists</title>
        <link>https://www.klayout.de/forum/discussion/2253/resolving-lib-control-statements-in-spice-netlists</link>
        <pubDate>Sat, 18 Mar 2023 19:07:31 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>tok</dc:creator>
        <guid isPermaLink="false">2253@/forum/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>Is there a way to load SPICE netlists which include transistor models via <code>.lib</code> statements?</p>

<p>The characterization tool lctime (Python) uses KLayout for parsing and analyzing spice netlists. That worked quite well for simple netlists. However, things seem to be more complicated as soon as <code>.lib</code> control statements are used to include transistor models. KLayout ignores control statements.</p>

<p>In the following example the <code>.lib</code> statement is skipped and therefore the transistor models will not be found.</p>

<pre><code>.lib "/XYZ/sky130/skywater-pdk-libs-sky130_fd_pr/models/sky130.lib.spice" tt

.subckt thesis_inv A Y VPWR VGND
X0 Y.t1 A.t0 VPWR.t1 VPWR.t0 sky130_fd_pr__pfet_01v8 ad=1.25045 pd=6.51 as=1.2364 ps=6.5 w=2.81 l=0.15
X1 Y.t0 A.t1 VGND.t0 VGND sky130_fd_pr__nfet_01v8 ad=0.3916 pd=2.65 as=0.3872 ps=2.64 w=0.88 l=0.15
.ends
</code></pre>

<p><code>sky130.lib.spice</code> contains <code>.include</code> statements in the following form:</p>

<pre><code>* Typical corner (tt)
.lib tt
.include "../a.spice"
.include "../b.spice"
.endl

* Slow-Fast corner (sf)
.lib sf
*...
.endl

*...
</code></pre>

<p>I see that NetlistSpiceReaderDelegate has a method 'control_statement'. However, I don't understand yet how it could be used to load <code>.lib</code>-style includes.</p>

<p>I'd appreciate any hints!</p>

<p>Thanks &amp; best regards<br />
Thomas</p>
]]>
        </description>
    </item>
    <item>
        <title>GDS/OAS Save As with different DBU ~ issue?</title>
        <link>https://www.klayout.de/forum/discussion/2243/gds-oas-save-as-with-different-dbu-issue</link>
        <pubDate>Thu, 23 Feb 2023 16:00:23 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>tomas2004</dc:creator>
        <guid isPermaLink="false">2243@/forum/discussions</guid>
        <description><![CDATA[<p>Hi Matthias,</p>

<p>I noticed something weird (KLayout 0.27.10):</p>

<p>1) Original file with DBU = 0.00005:                                                          TEST2.gds<br />
2) Saving as OAS file with the same DBU:                                               TEST2.oas<br />
3) Saving original file "TEST2.gds" as GDS file with DBU = 0.0001:     TEST2_DBU_0p1nm.gds<br />
4) Saving file "TEST2.oas" as OAS file with DBU = 0.0001:                   TEST2_DBU_0p1nm.oas</p>

<p>Files "TEST2.gds" and "TEST2.oas" are geometrically identical, as expected.</p>

<p>But files "TEST2_DBU_0p1nm.gds" and "TEST2_DBU_0p1nm.oas" are not geometrically identical. It seems the snapping to the new DBU is different for GDS and OAS files. The GDS versions looks ok (snapping to larger DBU as expected), but in the OAS version some small 0.1nm gaps appear, for instance in the "6" character.</p>

<p>Can you reproduce?</p>

<p>Cheers,</p>

<p>Tomas</p>

<p><img src="https://www.klayout.de/forum/uploads/editor/kc/1zwmd9jh6cja.png" alt="" title="" /></p>

<p><img src="https://www.klayout.de/forum/uploads/editor/m7/phxauqy2b733.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>mebes file format</title>
        <link>https://www.klayout.de/forum/discussion/2174/mebes-file-format</link>
        <pubDate>Tue, 25 Oct 2022 18:37:41 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>enuinc</dc:creator>
        <guid isPermaLink="false">2174@/forum/discussions</guid>
        <description><![CDATA[<p>Hi Matthias</p>

<p>I am trying to understand the file format details of this MEBES file. Can you point me to a way to get the detailed description of this format, or how to purhcase such format from AMAT?</p>

<p>Thanks<br />
enuinc</p>
]]>
        </description>
    </item>
    <item>
        <title>demofab_klayout_colors.lyp file</title>
        <link>https://www.klayout.de/forum/discussion/2199/demofab-klayout-colors-lyp-file</link>
        <pubDate>Tue, 22 Nov 2022 16:00:29 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>Cywue</dc:creator>
        <guid isPermaLink="false">2199@/forum/discussions</guid>
        <description><![CDATA[<p>I would like to import <strong>demofab_klayout_colors.lyp</strong> in the 'Manage Technologies' section of my KLayout since I just started to use Nazca together with KLayout. However, I cannot find where is the .lyp file. Could anyone please tell me how to find the <strong>demofab_klayout_colors.lyp</strong> file ?</p>
]]>
        </description>
    </item>
    <item>
        <title>Possible issue in LEF/DEF technology data</title>
        <link>https://www.klayout.de/forum/discussion/2135/possible-issue-in-lef-def-technology-data</link>
        <pubDate>Thu, 11 Aug 2022 14:50:17 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>stolbikov</dc:creator>
        <guid isPermaLink="false">2135@/forum/discussions</guid>
        <description><![CDATA[<p>Hellow <a href="https://www.klayout.de/forum/profile/Matthias" rel="nofollow">@Matthias</a> !</p>

<p>I faced with the following issue.<br />
I tunned options for DEF import in "Technology Manager-&gt;Reader options-&gt;LEF/DEF-&gt;Production".<br />
I enabled "Routing" and "Special routing" and defined "Layer name Suffix" and "GDS data type"  for each of them.<br />
And after I exported Technology data to XML file (see attached Tech_export.txt).</p>

<p>In this file I see that the field names are equal for routing and special routing and second overwrites first one.<br />
In result, after such XML importing I see in technology manager, that fields for Routing are filled with data from Special routing and fields for Special routing are empty.</p>

<p>Is this a bug and how can I fix it? I tried to rename  to  e.t.c without any success.</p>
]]>
        </description>
    </item>
    <item>
        <title>dxf conversion issues</title>
        <link>https://www.klayout.de/forum/discussion/2065/dxf-conversion-issues</link>
        <pubDate>Sat, 23 Apr 2022 07:21:48 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>dviole</dc:creator>
        <guid isPermaLink="false">2065@/forum/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>while trying to convert a photolitography mask made in AutoCAD (.dwg) to a klayout compatible file (.dwg) I stumbled upon some issues already discussed in the forum before. After adjusting the reader options(I tried 1e-06 and 1e-04 for database unit as well), the coordinate overflow error still remains. Are there any alternative approaches that can be tried to repair this?<br />
Link to files: <a href="https://easyupload.io/m/bce0kv" rel="nofollow">https://easyupload.io/m/bce0kv</a></p>

<p>Kind regards</p>
]]>
        </description>
    </item>
    <item>
        <title>dxf file cannot be opened by autoCAD after been edited by KLayout</title>
        <link>https://www.klayout.de/forum/discussion/886/dxf-file-cannot-be-opened-by-autocad-after-been-edited-by-klayout</link>
        <pubDate>Sat, 22 Oct 2016 23:58:53 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>yzhong</dc:creator>
        <guid isPermaLink="false">886@/forum/discussions</guid>
        <description><![CDATA[I use the following code to do boolean operation to some layers in the dxf file:<br />
# create the layout<br />
layout = RBA::Layout::new<br />
layout.read($input)<br />
cell = layout.cell("TOP")<br />
<br />
processor = RBA::ShapeProcessor.new<br />
layer_a = layout.layer('aSi Reverse')<br />
layer_b = layout.layer('aSi')<br />
layer_out = layout.layer('aSi')<br />
processor.boolean(layout, cell, layer_a, layout, cell, layer_b, cell.shapes(layer_out), RBA::EdgeProcessor::mode_anotb, false, false, false)<br />
layout.delete_layer(layer_a)<br />
<br />
layer_a = layout.layer('Al Top Layer Reverse')<br />
layer_b = layout.layer('Al Top Layer')<br />
layer_out = layout.layer('Al Top Layer')<br />
processor.boolean(layout, cell, layer_a, layout, cell, layer_b, cell.shapes(layer_out), RBA::EdgeProcessor::mode_anotb, false, false, false)<br />
layout.delete_layer(layer_a)<br />
layout.write($output)<br />
<br />
<br />
After this, I can use KLayout to view the layout, and it works correctly. However when I try to open the dxf file with autoCAD, it fails. Does anyone know the reason? Thanks.]]>
        </description>
    </item>
    <item>
        <title>Multiple devices in the reference netlist</title>
        <link>https://www.klayout.de/forum/discussion/2003/multiple-devices-in-the-reference-netlist</link>
        <pubDate>Fri, 31 Dec 2021 21:12:04 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>patrickmawet</dc:creator>
        <guid isPermaLink="false">2003@/forum/discussions</guid>
        <description><![CDATA[<p>I was able to get LVS working, but only with single devices. The reference netlist reader does not seem to recognize multiple devices (typically M=2 or more). Since I use multiple devices extensively, this is a potential problem for me to be able to use the Klayout LVS. Am I missing something?</p>
]]>
        </description>
    </item>
    <item>
        <title>Convert GDS to 1 Bit TIFF</title>
        <link>https://www.klayout.de/forum/discussion/1980/convert-gds-to-1-bit-tiff</link>
        <pubDate>Fri, 12 Nov 2021 17:49:04 +0000</pubDate>
        <category>File Formats</category>
        <dc:creator>Nakulh</dc:creator>
        <guid isPermaLink="false">1980@/forum/discussions</guid>
        <description><![CDATA[<p>Is it possible to convert the GDS layout to 1 Bit TIFF with a 1um resolution. Almost like a raster form that can trace the design into pixels of a single layer.<br />
Any help or guidance will be great.<br />
Thanks.<br />
Nakul</p>
]]>
        </description>
    </item>
   </channel>
</rss>
