GDSII Import and Export
This example illustrates how to import a GDSII design with customized options.
def import_design(gds_file_path: str, dest_lib: de.Library, layer_map_path: str) -> None:
# create the importer
importer = ael.call.gds_create_importer()
# set import options
ael.call.gds_import_set_overwrite(importer, True)
ael.call.gds_import_set_ignore_box(importer, True)
# set layer map
ael.call.gds_import_set_layermap_path(importer, layer_map_path)
# call gds import
ael.call.gds_import_design(importer, gds_file_path, dest_lib.name)
This example illustrates how to import a GDSII design with defaults.
def import_design_with_defaults(gds_file_path: str, dest_lib: de.Library) -> None:
ael.call.gds_import_design(None, gds_file_path, dest_lib.name)
This example illustrates how to export an ADS design to a GDSII file with customized options.
def export_design(design: db_uu.Design, gds_file_path: str, layer_map_path: str) -> None:
# create the exporter
exporter = ael.call.gds_create_exporter()
# set export options
ael.call.gds_export_set_flatten_type(exporter, ael.decl.GDS_FLATTEN_ALL)
ael.call.gds_export_set_rectangles_as_box(exporter, True)
ael.call.gds_export_set_max_num_polygon_vertices(exporter, 4000)
# set layer map
ael.call.gds_export_set_layermap_path(exporter, layer_map_path)
# call gds export
ael.call.gds_export_design(exporter, design, gds_file_path)
This example illustrates how to export an ADS design to a GDSII file with defaults.
def export_design_with_defaults(design: db_uu.Design, gds_file_path: str) -> None:
ael.call.gds_export_design(None, design, gds_file_path)