This document is ALPHA quality and is under construction.

File Formats in gEDA

This file is the official documentation for the file formats in gEDA. The primary file format used in gEDA is the schematic/symbol format. Files which end with .sch or .sym are schematics or symbol files. This file format is current as of gEDA version 19990327.

  1. Schematic/Symbol File Format
    1. Basic Info
    2. All coords are in mils (1/1000 or an inch).
      Origin is in lower left hand corner.
      Files should end in either .sch or .sym

    3. Coordinate system
    4.    ^
       ^ |
       | |
       y |
         +-------->
       0,0  x->
      
      Origin in the lower left hand corner. X increases going to the right. Y increase going up. Coordinate system is landscape and corresponds to a sheet of paper turned on its side.

    5. Object types
    6. The object type letter must start in the first column. Schematic/Symbol files are case sensitive.

      Version number

      Example:
      v 19990327

      type versionnumber

        type = v
        versionnumber = version of gEDA which created this file

      Components

      Example:
      C 18600 19900 1 0 0 7400-1.sym

      type x y selectable angle mirror basename

        type = C
        x y = location of lower left corner point
        selectable = 1 if selectable or 0 if not
        angle = rotation, 0, 90, 180, 270 (only)
        mirror = 0 if not mirrored or 1 if mirrored
        basename = component name, does not include any path!

      Text

      Example:
      T 16900 35800 3 10 1 0 0
      I'm a string!

      type x y color size visibility show_name_value angle
      string

        type = T
        x y = same as above
        color = see include/colors.h
        size = height in points of the text
        visibility = 0 if invisible or 1 if visible
        show_name_value = show both name and value 0
          show value only 1
          show name only 2
        angle = rotation, 0, 90, 180, 270 (only)
        string = text string

      Net
      Pin
      Line

      Bus

      Examples:
      N 12700 29400 32900 29400 4
      P 17800 33100 22300 33100 1
      L 27300 37400 37200 35300 3

      U 27300 37400 37200 35300 3

      type x1 y1 x2 y2 color

        type = N L P U (net line pin bus respectively)
        x1 y1 = first point
        x2 y2 = second point
        color = see include/colors.h

      Arc

      Example:
      A 0 500 400 -50 90 3

      type x y radius start_angle sweep_angle color

        type = A
        x y = center of arc
        radius = radius of arc
        start_angle = starting angle in degrees / Standard cartesian layout
        sweep_angle = degrees to sweep arc
        color = see include/colors.h

      Box

      Example:
      B 300 300 1400 2900 3

      type x y width height color

        type = B
        x y = lower left hand corner
        width height = width and height of the box
        color = see include/colors.h

      Circle

      Example:
      V 250 700 50 6

      type x y radius color

        type = V
        x y = center of circle
        radius = radius of the circle
        color = see include/colors.h

      Special font definition object

      Example:
      F A 29

      type character width [optional_flag]

        type = F
        character = the character being defined
        width = the width of the character in mils
        optional_flag = is only used in space char definition

        This is a special tag and should ONLY show up in font definition files. The space character is special and is defined as follows:

        F _ 11 1

        The last one signifies that this definition is the space character.

    7. Attributes
    8. Attributes are enclosed in { } and can only be text. Attributes are text items which take on the form name=value. If it doesn't have name=value it's not an attribute. Attributes are attached to the previous object. Here's an example:

      P 988 500 1300 500 1
      {
      T 1000 550 5 8 1 1 0
      pin3=3
      }

      The object is a pin which has an attribute pin3=3 (name=value). You can have multiple text objects (both the T ... and text string are required) in between the { }

      You can also have "toplevel" attributes. These attributes are not attached to any object, but instead are just text objects that take on the form name=value. These attributes are useful when you need to convey some info about a schematic page and need the netlister to have access to this info.

    9. Embedded objects
    10. Embedded objects take on the following form:

      C 18600 21500 1 0 0 EMBEDDED555-1.sym
      [
      ...
      ... Embedded primitive objects
      ...
      ]

      Where the basename is EMBEDDEDcomponent_name.sym In the example above 555-1.sym is the basename. The EMBEDDED tag and the [ ] are the distinguishing characteristics of embedded components. component_name.sym must exist in one of the specified component-libraries if you want to unembed a component.

    11. Extra info
    12. Currently, nets and other components should NOT be inside components.

      gschem and friends do not like bad schematic/symbol files, ie file syntax checking is non-existent and gschem and friends will exit if they find an invalid file.

Up one level