Interchangeable Format

The structure of interchangeable file format:

#0000-#03FF

(1024 bytes)

Color palette (4 bytes/color, each color stored as Delphi's TColor)

#0400-#0403

(4 bytes)

String 'mbrd' (identifies Interchangeable Format)

#0404-#0405

(2 bytes)

Version of Embird Interchangeable Format (Delphi's word)

#0406-#0409

(4 bytes)

Hoop width in tenths of millimeters (Delphi's single)

#040A-#040D

(4 bytes)

Hoop height in tenths of millimeters (Delphi's single)

#040E-#0411

(4 bytes)

Background Color (Delphi's TColor)

#0412-#0415

(4 bytes)

Minimal X-coordinate in tenths of millimeters (Delphi's single)

#0416-#0419

(4 bytes)

Maximal X-coordinate in tenths of millimeters (Delphi's single)

#041A-#041D

(4 bytes)

Minimal Y-coordinate in tenths of millimeters (Delphi's single)

#041E-#0421

(4 bytes)

Maximal Y-coordinate in tenths of millimeters (Delphi's single)

#0422-#0425

(4 bytes)

Number of stitches (Delphi's longint)

#0426-#07FF

(986 bytes)

Reserved, always 0

#0800-file end

(10 bytes/stitch)

Stitches (10 bytes per stitch, structure TStitch)

TStitch structure:

Code:byte;

(1 byte)

Stitch code:



#00=stop (next color)



#80=normal stitch (running stitch)



#81=floating stitch (jump stitch)



#87=trimming code (cut thread)

Flag:byte;

(1 byte)

Flag, Unused

X:single;

(4 bytes)

X-coordinate in tenths of millimeters

Y:single;

(4 bytes)

Y-coordinate in tenths of millimeters

Note: Stitch with X=0,Y=0 coordinates is in the hoop center.

In fact, Embird will pass two paths on the command line to the 3rd party application. The second path specifies the text file, which is empty. The 3rd party application can pass the full paths to designs stored in interchangeable format to Embird using this second text file. Embird will convert these files to format chosen by user, and then it will delete these temporary files. In other words, 3rd party software developers can use this second command line path to output designs from their application and make Embird to convert them into chosen format.

Example: User selects 3 designs in Embird's Files: box and then runs the Send to 3rd Party Application command. Embird will launch the application and pass 2 parameters on the command line:

Command Line: 3RDPARTY.EXE "C:\Program Files\Embird32\Temp1.tmp" "C:\Program Files\Embird32\Temp2.tmp"

The first command line file "C:\Program Files\Embird32\Temp1.tmp" contains 3 lines, e.g.:

 C:\Program Files\Embird32\design0.tmp        first design in interchangeable format

 C:\Program Files\Embird32\design1.tmp        second design in interchangeable format

 C:\Program Files\Embird32\design2.tmp        third design in interchangeable format

The second command line file "C:\Program Files\Embird32\Temp2.tmp" is empty.

3rd party application should process the 3 files from the first file. In case the 3rd party application wants to input some files into Embird, it should write the design paths into the second command line file, i.e. to "C:\Program Files\Embird32\Temp2.tmp". Finally, the 3rd party application should delete then first command line file, i.e. "C:\Program Files\Embird32\Temp1.tmp" to let Embird know about its completion.