Purpose: Program to maintain the header of a LDraw Part (*.dat).
Please see „http://www.ldraw.org/Article398.html“ for the original standard.
Author: Michael Heidemann
Version: 2.0.0 (2009-05-16)
Use: The „normal“
use of this program is that you open your existing part with „File
Open“ and then change the sections that you need to change.
After you have done your changes you simply select „File Save“
and the header of your part is being written according to the actual
standard. With „Option“ you can save your own „Real
Name“ and „Username“ and your „License Type“
like you want to have as your default values and by pushing the „Set
Default“ - button these fields are filled with your default
The new generated header can be seen in the textfield “New Header” and you can compare it with the old header that is shown in the “Old Header” textfield.
Color correct: Since
version 1.2.2 you have now the possibility to correct colors in the
main part of
the file. If you know your file should only have Main_Color and Edge_Color then you can mark that file as “Uncolored” and push the “Correct Color”-Button. By this all lines with linetype 1, 3, 4 will be set to colorcode 16 (Main_Color) and linetype 2, 5 will be set to colorcode 24 (Edge_Color).
Features: To give this program flexibility you can change the values of “Part Type”, “Category”, “BFC Statements” and “License Types”. This can be done (for example) by “Edit Category” that will rise the following new window:
Add: If you want to add a new category, you have to push the “Add” button. A new window will open.
Here you can now enter the new category name. After you have confirmed your entry by pushing the “OK” button your new category will be added to the “Current Values” list in alphabetical order.
Change: First you have to select the entry in the “Current Values” list. This entry is then shown in the upper textfield. Now you can edit this entry and after you have pushed the “Update” button the changed entry is shown in the “Current Values” list in alphabetical order.
Delete: First you have to select the entry in the “Current Values” list. This entry is then shown in the upper textfield. Now you can push the “Delete” button and the entry is deleted from the “Current Values” list.
All these values are stored in four text files (*.txt) in the program directory. These files can also be edited by a text editor, but it is strongly recommended not to do this.
Nearly complete rewritten with Visual Basic Express 2005.
The old version written in Visual Basic 5 will not be continued.
1) Some Parttypes requires to set category if the first word of the description does not fit the category list.(http://www.ldraw.org/Article398.html)
2) A check (same as planarcheck) is done for the file itself. Coplanarity is green if ok or red if not ok. (http://www.ldraw.org/Article512.html#coplanar)
3) If the part description is missing saving of file is not possible.
4) Option for check for double lines. As this feature is not well implemented it will take some time to perform on large files.
For that reason this check is optional. If doublelines is ok then the background will be green, if double lines detected the background will be red.
5 ) To enable at one day to run also on Linux systems, the default values are now stored in a file called datheaderini.xml.
This file has to be in the same directory as the exe file.
If you use the new DATHeader the first time you have to enter the default values again in the option dialog.
Added check of part description to ensure a one digit number to have two leading spaces.
Added check for Shortcut. If parttype is set to Shortcut then in most cases the filetitle will contain a 'c' or 'd'. If not a warning is given but the file will be saved immediately.
Added check on colors used in the file vs LDConfig.ldr.
Added check on use of colorcode 16 and 24 according to linetype with autocorrect.
Added check on filename vs. ‘Name:’ entry with autocorrect.
No real bugfixes necessary, but many details in handling optimized.
Added some checks for consistence with existing rules. (See document http://news.lugnet.com/cad/?n=15628)
If you had a part that were already released the UPDATE portion of the !LDRAW line where put also into the new header. Now if the part is called “Unofficial...” the UPDATE portion will be removed.
Now you can drag and drop from Windows Explorer direct on the open Window of DATHeader the file you want. But keep in mind, only on the form, not on the text fields.
If you have changed the category there where one more entry with <none> for every time you have changed the categories.
You can now open a file by send it as a parameter. (DATHeader “F:\file.dat”) You have to specify the full path. There is no check for correct file path.
Now you can select the CATEGORY “<none>” and there will be no CATEGORY statement in the header.
There was an error if the first line after the header was a “0 BFC CERTIFY INVERTNEXT” line. This line itself has an error but is produced by MLCad. Caused by this wrong line the first INVERTNEXT line was lost.
According to the latest specification extension (http://www.ldraw.org/Article398.html – Appendix III) there was a minor change necessary in the edit procedure for the part types. This version is shipped with an updated part types list.
Bugfix because of limitations
It is now possible to handle large (approx. 1.7 GByte) part files. I also have to mention that the header should not exceed approx. 65000 charaters.
With this limitations I think this prog can work for years.
As there will be a problem for the part tracker if there is a TAB character in the part description now the part description is tested for TAB characters and if there will be any found they will be deleted.
If there are “0 WRITE” statements you will be asked to delete the word WRITE, the rest of the line will remain as before.
The following testing will be done additionally if you want to save the file:
Now you have to set a License Type and BFC Statement.
Also you need to set the Author Name.
A Warning will be shown if you have forgotten to set your Username.
If there are “0 COLOR” statements you will be asked to delete them.
If there are “0 ROTATION” statements you will be asked to delete them.
If there are “0 BFC CERTIFY INVERTNEXT” statements you will be asked to correct them.
There is now a checkbox in the preferences for creating backup files.
The last used directory is now used for the open file dialog.
Also a new 3D Icon is now used.
Due to recent discussion also support for reading non DOS-conform text files has been added. But it will be saved DOS-conform.
Now the last ten opened files are displayed in the file menu.
If you have changed a file you will now be asked for saving before the next file is loaded.
The textfield for the new and the old header are a little extended in height.
Bugfix: Some minor errors fixed and also the Set Preferences now also changes directly the new header.
This version is tested for long filenames and for filenames with spaces. Both worked.
New in this version is that you will be asked for generating a backup of your file.
Bugfix: If you hit the “new”-button for history the current username is set in brackets.
Handling of comments in the header is improofed.
Message for new !History entry has been changed.
By doubleclick on History, Keywords and Comments Entry now the edit box will open.
Part Type has to be set to save the file.
Bugfixes: Empty lines in the data section will be kept. Set Preferences now working.
Handling for the “(needs work)” part description is implemented. If the words “need” and “work” are found in the part description then there has to be a comments entry otherwise saving the file is not possible. Also the part description length is now checked for to be at maximum 64 charaters long. Due to this there is a new list with all comments that can be edited.
If you have additional whishes or if you run into bugs, please send me an email at email@example.com.
Attention: The program is delivered “as it is” and I am not responsable for any fault or damage to your system or your files.