next up previous contents index
Next: Conversion Export Up: Operating System and Input/Output Previous: Archive File Context   Contents   Index

Conversion

(real) SetConvertScale(scale, which)
This sets the scale used for conversions. There are three such scales, and the one to set is specified by the second argument, which is an integer 0-2.
which = 0
Set the scale used when converting an archive file directly to another format with the FromArchive script function or similar, or with the Conversion pop-up.
which = 1
Set the scale used when writing a file with the ToXXX script functions or similar, or the Conversion - Export panel.
which = 2
Set the scale used when reading a file into Xic with the Edit or OpenCell functions or similar, or from the Conversion - Import panel in Xic.
Script functions that read, write, or convert archive file data will in general make use of one of these scale factors, however if the function takes a scale value as an argument, that value will be used rather than the values set with this function.

The scale argument is a real value in the inclusive range 0.001 - 1000.0. The return value is the previous scale value.

(int) SetMapToLower(state, rw)
This function sets a flag which causes upper case cell names to be mapped to lower case when reading, writing, or format converting archive files. The first argument is a boolean value which if nonzero indicates case conversion will be applied, and if zero case conversion will be disabled. The second argument is a boolean value that if nonzero will apply case conversion when writing an archive file from memory, and if zero indicates that case conversion will be applied when reading or format converting archive files.

Within Xic, this flag can also be set from the panels available from the Convert Menu. The internal effect is to set or clear the InToLower or OutToLower variables. The return value is the previous setting of the flag.

(int) SetMapToUpper(state, rw)
This function sets a flag which causes lower case cell names to be mapped to upper case when reading, writing, or format converting archive files. The first argument is a boolean value which if nonzero indicates case conversion will be applied, and if zero case conversion will be disabled. The second argument is a boolean value that if nonzero will apply case conversion when writing an archive file from memory, and if zero indicates that case conversion will be applied when reading or format converting archive files.

Within Xic, this flag can also be set from the panels available from the Convert Menu. The internal effect is to set or clear the InToUpper or OutToUpper variables. The return value is the previous setting of the flag.

(int) FromArchive(archive_file, destination)
This function will read an archive (GDSII, CIF, CGX, or OASIS) file and translate the contents to another format. The type of file written is implied by the destination. If the destination is null or empty, native cell files will be created in the current directory. If the destination is the name of an existing directory, native cell files will be created in that directory. Otherwise, the extension of the destination determines the file type:

CGX .cgx
CIF .cif
GDSII .gds, .str, .strm, .stream
OASIS .oas

Only these extensions are recognized, however CGX and GDSII allow an additional .gz which will imply compression.

The scale factor used can be set with the SetConvertScale function. The windowing and flatting functions will be applied if the corresponding flags are set with the SetConvertFlags and SetConvertArea functions. The scale, flags and area rectangle can also be set from the Conversion pop-up in Xic.

The value 1 is returned on success, 0 otherwise, with possibly an error message available from GetError. This function is aliased to FromCGX, FromCIF, FromGDS, and FromOASIS for backward compatibility.

(int) FromTxt(text_file, gds_file)
This function will translate a text file in the format produced by the ToTxt function into a GDSII format file. This is useful after text mode editing has been performed on the file, to repair corruption or incompatibilities. If gds_file is null or empty, the name is generated from the text_file and given a ``.gds'' suffix.


next up previous contents index
Next: Conversion Export Up: Operating System and Input/Output Previous: Archive File Context   Contents   Index
Stephen R. Whiteley 2006-10-23