ptn2wif, a weaving file converter

Introduction and basic usage

This is a small program that I wrote to convert into WIF (Weaving Information File) format the .ptn files produced by Brad Keister's free WinWeave drawdown programs. It should also work for files produced by his earlier Weave program (for DOS; WinWeave is for Windows).

The ptn2wif program is not a fancy Windows program with a graphical user interface; instead, it designed to run in a conventional ``command line'' environment, like an MS-DOS prompt window under Windows 95 or Windows NT, or like a Linux or Unix shell. Suppose you have a file called mydraft.ptn. Then at the MS-DOS prompt or Linux/Unix shell prompt, you could type

ptn2wif mydraft.ptn
and the WIF output would come spilling out onto your screen. If instead you would rather it went into a file, for example one called mydraft.wif, you would instead use the command
ptn2wif mydraft.ptn >mydraft.wif

About the color palette

The .ptn files contain only an indication of which threads should be in color 1, color 2, etc., up to color 16, but not what actual color each of those 16 color numbers should be. If you use ptn2wif as shown above, it will first look to see if there is a winweave.clr file. That is the file that WinWeave stores your default color settings in, if you choose to save them. If this file exists, then ptn2wif uses it as the source of the information regarding what color each of the 16 color numbers is. If the file doesn't exist, than ptn2wif will assume the default color settings that WinWeave starts up with.

If you want to use a different palette of colors, you can explicitly tell ptn2wif to use a .clr file saved out from WinWeave. For example, suppose you had saved your color choices out in mycolors.clr. Then you could use the command

ptn2wif mydraft.ptn mycolors.clr >mydraft.wif

You get what you don't pay for

I am providing this program completely free of both payment and restrictions. However, in turn you have to understand that it may not work correctly. I have tested it a little, but not extensively. If you do find a bug, I'd appreciate hearing about it; please drop me an email at If it has been a while since you downloaded ptn2wif, you might first want to check whether a new version has appeared. The current version is version 0.1; you can see your copy's version number in its WIF output.

How to get the program

If you want a ready-to-run program, you can grab ptn2wif.exe, which will run in an MS-DOS prompt window under Windows 95 or NT. Important note: due to a limitation of how I compiled this program, it works in only one of the three possible ways of running the program:
The way that works
While running under Windows 95 or NT, select "MS-DOS prompt" from the Program sub-menu of the Start menu. Then, change directory if necessary (using the cd command, for example, cd \winweave to change to the \winweave directory) and run ptn2wif as shown above.
A way that doesn't work
If you switch to "MS-DOS mode" or boot the computer directly into MS-DOS, you will have an MS-DOS prompt, but ptn2wif won't work; it will give you a message telling you as much.
Another way that doesn't work
You also can't directly run ptn2wif from Windows, without going into the MS-DOS prompt. For example, you can't just double-click on the icon, or use the Run command from the Start menu. If you try this, you'll see a window flash up on the screen briefly and immediately disappear again.

If you are a programmer and want the source code for the program, written in C, you are welcome to ptn2wif.c. That would let you recompile it to run on other systems; I've only tested it under Linux and Windows 95/NT, but the code should be portable. You could also make modifications, or make a Windows or DOS version that is less picky about how it is run. If you come up with something useful and are in the mood to share, let me know and I'd be happy to make it available from this web page. Thanks.

About PPThumbs.ptn files

A number of people have found this web page while searching for information about .ptn files, because they are concerned about PPThumbs.ptn files that are clogging up their disk. They then contact me by email and ask me what these files are. Therefore, I am adding this section to answer this frequently asked question.

The answers are as follows:

  1. These PPThumbs.ptn files have nothing to do with weaving software. It is just a coincidence that two programmers both chose the .ptn extension for their files.
  2. PPThumbs.ptn files are created by Scansoft's program called Paperport, to hold "thumbnail" images. According to Scansoft technical support, you may delete these files, but they will be recreated as soon as you run Paperport again.

Max Hailperin
Voice: (507) 933-7466
Fax: (507) 933-7041
Mathematics and Computer Science Department
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082