I reverse-engineered the file format to implement my OrTie page tie generator.
Use at your own risk. Sorry, I don't have anything on the library file format
(complex, can be translated into text form), or the 32-bit format (probably
very similar structure).
Header Format
0000-0010 "Schematic FILE", cr, lf, eof
0011-0015 00 ???
0016-0019 Byte count (offset component list - 0020)
001a-001b current x cursor position
001c-001d current y cursor position
001e current level (1/2/5/10)
001f 00 ??
0020 title block tag = 0
0021-0022 byte count (fixed)
0023-0024 sheet number (1..32767, 0 = invisible)
0025-0026 number of sheets (1..32767, 0 = invisible)
0027 0x = visible title block
8x = invisible title block
x0 = A size
x1 = B size
x2 = C size
x3 = D size
x4 = E size
0028-003a date (string)
003b-005f document number (string)
0060-0063 revision number (string)
0064-0090 title of sheet (string)
0091-00bd organization name (string)
00be-00ea address line 1 (string)
00eb-0117 address line 2 (string)
0118-0144 address line 3 (string)
0145-0171 address line 4 (string)
{rec} Records (see below)
xxxx End of file tag = 0f
length = 0
{str} Component list. The library name of each component used
is given in the sequence it appears in the preceding
records.
Record Format
- Each wire segment is stored separately, and can point in any
direction.
- Except for the header and the end of file record, the elements seem
to come in any sequence.
- Only the lower four bits of the tag value seem to be valid, the fourth
bit seems to be used internally by OrCAD.
01 Tag = SHEET
cccc Byte count
xxx1 Position top left
yyy1
xxx2 Position bottom right
yyy2
???? Junk ?
???? Junk ?
cc Number of sheet nets
File name
Sheet name
Sheet nets: 0 to 255 records
?? Junk ?
pp 00 = left
FF = right
yyyy vertical offset from top, 14, 24 ... on normal grid
tt Type 00 = unspecified
01 = output
02 = input
03 = bidirectional
Port name
Note: The name of the library symbol is stored at the
end of the file.
02 Tag = COMPONENT
cccc Byte count
xxxx Position
yyyy
xofs Reference designator offset
yofs
xofs Part value offset
yofs
dd Device number (1..26)
Orientation: 00 = -> 80 = mirror
20 = ^
40 = <-
60 = v
ff Flags: 01 = use converted symbol
02 = reference invisible
04 = part value invisible
40 = include field attributes
80 = device number
vv Visibility: 01 = first attribute invisible
02 = second attribute invisible
..
80 = eight attribute invisible
ss Sheetpart: 40 = sheetpart name invisible
80 = include sheetpart name
FFFF ???
xxxx ???
xxxx ???
xxxx ??? part of time stamp ?
tsts 4 byte time stamp, recognized by INET
tsts
Reference designator, includes optional device number
Part value
Field attributes (optional section), eight repetitions:
xofs Attribute offset
yofs
Field attribute
Sheet part name (optional section):
xofs Sheet part name offset
yofs
Sheet part name
03 Tag = WIRE
0008 Byte count
xxx1 First position
yyy1
xxx2 Second position
yyy2
04 Tag = BUS
0008 Byte count
xxx1 First position
yyy1
xxx2 Second position
yyy2
04 Tag = BUS
05 Tag = JUNCTION
0004 Byte count
xxxx Position
yyyy
06 Tag = MODULE PORT
0xxx Byte count = 0007 + number of characters
xxxx Position
yyyy
1E Width in pixels (min. 30)
tt Type: 00 = unspecified 00 = neither pointing
40 = output 10 = left pointing
80 = input 20 = right pointing
C0 = bidirectional 30 = both pointing
String
07 Tag = LABEL
0xxx Byte count = 0007 + number of characters
xxxx Position
yyyy
ssss Size: +1, +2 ... horizontal
-1, -2 ... vertical
String
08 Tag = ENTRY
0005 Byte count
xxxx Position
yyyy
tt Type: 00 = /
01 = \
09 Tag = DASHED LINE
0008 Byte count
xxx1 First position
yyy1
xxx2 Second position
yyy2
0A Tag = POWER
0xxx Byte count = 0006 + number of characters
xxxx Position
yyyy
tt Type: 00 = circle 00 = top
01 = arrow 04 = bottom
02 = bar 08 = left
03 = wave 0C = right
String
0B Tag = TEXT
0xxx Byte count = 0007 + number of characters
xxxx Position
yyyy
ssss Size: +1, +2 ... horizontal
-1, -2 ... vertical
String
0C Tag = MARKER
cccc Byte count
tt Type: 00 = Trace name
01 = Vector column
02 = Stimulus
03 = Error
04 = NoConnect
05 = Layout directive
xxxx Position
yyyy
Trace name, vector column:
0000 ??
String
Stimulus:
llll String length + 2
String
0 End of string
Error, layout directive:
String
NoConnect:
no additional fields
0F Tag = END OF FILE
0000 Byte count
Trademarks
OrCAD SDT is a
trademark of Cadence Design
Systems.
|