Program to maintain the header of a LDraw Part (*.dat) and a tool for reviewing parts on the PT.
Please see „www.ldraw.org“ for the original standards.
Webside in french (http://jc-tchang.philohome.com/manuel/DATHeader.htm).
Thanks to J.C. Tchang
Author: Michael Heidemann
Version: 188.8.131.52 (2013-01-18)
Please find a detailed description of DATHeader in the DATHeader documentation.pdf
File needed for primitive tests (last update 2011-01-02): primitivescale.txt
For users that use MONO instead of .NET:
I am very sorry to inform you that based on a bug in MONO DATHeader does not work under MONO. As I am unable to do a workaround for that problem you will not be able to run DATHeader under MONO. Last check I did was with MONO 2.6.4 on Windows. I'll keep you informed.
History: Version 184.108.40.206 (2013-01-18)
Zip-file for windows only: datheader30104.zip
1) Lines with 0 only will be cleared to be an empty line.
2) Lines with 0 // only will be cleared to be an empty line.
3) 0 and 0 // will be treated as not specification conform comment.
4) On correction of not correct comment lines the empty lines now stay in the file.
5) Now the current user temp path is used if necessary.
6) No restriction to 64 characters for the part description.
Version 220.127.116.11 (2013-01-12)
Zip-file for windows only: datheader30103.zip
1) The missing CR_LF at file end now do not generate an error message.
Version 18.104.22.168 (2012-12-30)
Zip-file for windows only: datheader30102.zip
1) If run for first time you can not choose the license.
Version 22.214.171.124 (2012-12-02)
Zip-file for windows only: datheader30101.zip
1) Length of part description is not limited to 64 characters.
2) !TEXMAP and !: are not recognized as allowed Metacommands.
Version 126.96.36.199 (2012-11-25)
Zip-file for windows only: datheader30100.zip
1) Editor - Replace implemented
2) Postprocessing with Rectifier implemented.
1) Part description check warning messagebox for primitives disabled.
But the result of the check might still be wrong!
1) Detected '0 BFC CERTIFY CW' or similar was not been fixed.
2) If a line '0 BFC CW' or '0 BFC CCW' is in a file the bodycheck stopped with error message.
3) If the Header has been changed the linenumber in the editor was not correct.
4) In the Gui of the header data the field for Update is placed incorrect if window is resized.
5) Autocorrection claims for subparts not to use CATAGORY and KEYWORDS.
Version 188.8.131.52 (2011-11-12)
Zip-file for windows only: datheader3091.zip
1) Sortorder for History Entry has been changed.
2) Filenames with spaces will now be supported.
3) BFC set to nocertify will not generate a programm error.
Version 184.108.40.206 (2011-07-22)
Zip-file for windows only: datheader3090.zip
1) Detects unnecessary BFC INVERTNEXT. That means, if BFC INVERTNEXT is used on a part with origin at 0 and zero hight.
2) During body-correction this will be optimized.
3) In the Edit-menu a new command is added: "Show comment lines".
4) New button "sorting". This shows the sort order of the current description related to the official library.
1) The detection tolerance for scaled primitives has slightly changed from 0.0001 to 0.0005.
1) If part type is "Part Physical_Colour" a missing leading underscore has not been detected.
2) If you had selected empty lines in the editor and made reverse winding there has been an error.
3) If color 16 for linetype 2 or 5 has been detected, there has been no automatic correction to color 24.
4) If color 24 for linetype 1,3,4 has been detected, there has been no automatic correction to color 16.
5) If the last line has been '0 BFC CERTIFY' there has been an error.
6) If 'BFC CERTIFY INVERTNEXT' has been present the check for following by linetype 1 did not work.
Version 220.127.116.11 (2011-06-25)
Zip-file for windows only: datheader3080.zip
1) In the editor you can now search for a string.
1) Some messages have been corrected.
2) Autocorrection of Identical Vertices implemented
3) Check of parts description for whitespace has changed a little. (see LDraw-Wiki)
Version 18.104.22.168 (2011-02-27)
Zip-file for windows only: datheader3071.zip
1) If you have saved a part under another name there has been a backslash added in front of the name entry.
2) If a number with a absolut value greater than 32.768 appears in the part description an error occured.
Version 22.214.171.124 (2011-01-30)
Zip-file for windows only: datheader3070.zip
1) Now read and write UTF-8 without BOM (former read UTF-8, write ASCII).
2) All occurence of "1L" or "1.5L" or "4.5V" etc should now behave correct in leading spaces usage.
3) The trailing '0', '0 //' and empty lines will be deleted.
4) Now category and keywords allowed in subparts.(http://www.ldraw.org/Article340.html)
5) Many changes if you install DATHeader the first time to your system.
Version 126.96.36.199 (2011-01-02)
Zip-file for windows only: datheader3063.zip
If a subpart has been saved with another name the autocorrect method did not work correct.
Version 188.8.131.52 (2010-10-10)
Zip-file for windows only: datheader3062.zip
If BFC is not defined in file the correct header function add a BFC NOCERTIFY.
If the part description starts with 'Minifig Accessory' or 'Figure Accessory' the word 'Accessory' will be deleted on correct header and if part type is 'Part' or 'Unofficial_Part' the category will be changed to 'Minifig Accessory' or 'Figure Accessory'.
Version 184.108.40.206 (2010-06-23)
Zip-file for windows only: datheader3061.zip
There has been errors in generating the internal list for part types.
Changed shortcuts to not collidate with common cut and past commands.
Version 220.127.116.11 (2010-06-21)
Zip-file for windows only: datheader3060.zip
1) Autocorrection may result in bad split of quads to triangle if quads are bowtie.
2) Setting for the viewer where not remembered correctly for the menu.
3) A line with only the date as a history line caused an error.
4) '0 !LDRAW_ORG Unofficial Part' not detected as wrong.
5) Corrected errors with s\subpart.dat under Linux.
6) Gives wrong information for colors used in sticker.
7) For user that do not have a LDraw.org username it is not recommended
to use a username (example: James Jessiman)
8) If filename is empty the headerscan throws an error.
9) The qualifier "Alias" did not work, as it has not been put into the part type list.
1) During test for !TEXMAP section all errors will be displayed, but not documented in the error tab.
2) Clear filelist now leave the current file in the list and ask for deleting of all *.dat in download folder.
3) If a datheaderini.xml is found in the application folder that file is used.
4) Otherwise a datheaderini.xml is created in "My Documents" folder.
5) If path to Ldraw Base Directory is not set the application will not start.
6) If text is copied into the title, author realname, author username or
commandline field now DATHeader recognize that immediately.
7) A separate error will be generated if a keyword is used twice in the KEYWORDS section.
1) The Download folder is now only the target below that the folders parts,p etc are created.
2) Background color for internal viewer now changeable.
3) Many more options for internal viewer implemented.
4) Correct Header and Correct all now delete wrong keyword entries.
5) If double entries found within the keywords the second occurence will be deleted.
6) Keywords are treated case insensitive.
7) File can be marked as 'no curvature' so the planar check has no tolerance.
8) Matrix all zero errors will now be corrected on 'correct body'.
9) now copy, cut, paste are accessible by menu command
10) now two inline (line by line) functions with BFC aware are implemented
11) these two inline functions are 1) only one level or 2) until the end
12) all possible commands are shown but only those that are useful are selectable
13) now reverse winding can be applied to a range of lines, just mark the lines.
Version 18.104.22.168 (2010-03-28)
Zip-file for windows only: datheader3050.zip
1) If a file contains only "0 BFC CERTIFY" in the header there was an error.
2) word LDRAW_ORG has been treated as comment.
3) Check for correct line endings (CRLF) give wrong results if file has changed.
4) Detecting double lines did not work. (corrected 2010-03-31)
1) Viewer build in for first loading of a file.
2) Bodytext now editable.
3) Core features for texture mapping implemented.
4) BFC INVERTNEXT not followed by a linetype 1 line will be detected.
5) BFC INVERTNEXT not followed by a linetype 1 line will be corrected (deleted).
6) Usage for RGB colours implemented.
7) Usage for blended colours implemented.
8) Check for valid RGB value implemented (test on length, upper case, start with "0x2",only 0-9,A-F)
9) Correction for not upper case RGB value.
10) Correction for KEYWORDS length now writes the entries complete new.
11) Check for use of '~Moved to' files implemented.
12) Correction for use of '~Moved to' files implemented.
13) Reads now also notations like '4E-15' or '1.1E-14' as valid numbers.
HINT: As it is nowhere stated that the above notation is not valid no change will
be made if only such notation is found.
14) Result of optimization will now be shown in the body tab. Autoround function
will not write notation like '4E-3' but only '0.004'.
15) HELP line length restricted to 90 characters (before 50).
Version 22.214.171.124 (2010-01-10)
Works with MONO (http://www.mono-project.com) also on Linux and Mac!
Zip-file for all systems: datheader3040.zip
1) Full support for new localisation files.(See also LDTranslator)
2) New keyword edit/add window.
Version 126.96.36.199 (2010-01-03)
Zip-file for all systems: datheader3031.zip
1) A picture below the traffic light will show if not only color 16 and 24 is used.
Thanks to Philo for this idea.
Version 3.0.3 (2010-01-03)
Zip-file for all systems: datheader3030.zip
1) Colorpicker shows colornames in your language (If language pack is installed and the checkbox marked.)
2) New test for scaled primitives that should not be scaled implemented.
3) New test for scaled primitives that should only be scaled in one direction implemented.
4) Version info for installed Mono now in about dialog box.
1) Colorpicker now works also under MONO.
Version 3.0.2 (2009-12-28)
Zip-file for all systems: datheader3020.zip
1) Path for downloaded files from PT is now selectable.
2) Path for list files (see 5 and 6)is now selectable.
3) If path for external apps are not present the menu entry is disabled.
4) The fie datheaderini.xml is now located in MyDocuments.
5) The files parttype.txt, bfc.txt, licenses.txt are now build in and will not be shipped. If there is a need for that in the future, just create them and place them into the folder and they will be processed instead the default values.
6) The files ldconfig.ldr and category.txt will also not be shipped anymore. If they are missing DATHeader tries to download them from LDraw.org By this you can be sure to have the latest updates of that files.
Version 3.0.1 (2009-12-11)
Windows Installer: DATHeader301Release.zip
Zip-file for Linux: datheader3010.zip
1) Introduced Shortcut keys for many Menu commands.
ctrl-shift-o = Open from PT
ctrl-o = Open from system
ctrl-s = Save
ctrl-shift-s = Save As
ctrl-q = Exit
ctrl-a = Scan All
ctrl-h = Scan Header
ctrl-b = Scan Body
ctrl-shift-a = Correct All
ctrl-shift-h = Correct Header
ctrl-shift-b = Correct Body
ctrl-v = View with LDView Original
ctrl-e = Edit with LDDP Original
ctrl-m = Model with MLCad Original
ctrl-shift-v = View with LDView Corrected
ctrl-shift-e = Edit with LDDP Corrected
ctrl-shift-m = Model with MLCad Corrected
2) Removed unnecessary close meny entry.
1) Using category "Minifig Accessory" worked not correct for scan.
Version 3.0.0 (2009-11-28)
Windows Installer: DATHeader300Release.zip
Zip-file for Linux: datheader3005.zip
1) Progressbar to show you what happens.
2) Check for username in brackets in history line.
3) Autocorrect for username not in brackets in history line.
1) Traffic light does hold location also on resize.
2) Crashes if no file is loaded and Checkofficial is used.
3) Crashes if no file is loaded and Optimize Body is used.
4) Under Linux if Update LDConfig is done also a text "Update Category" is shown a second.
5) At file 3005.dat the line detection is wrong for body.
6) Save as dont generate an entry in the recent file list.
7) Correct filename to Name: entry the new filename will not be in the recent file list.
8) Correct filename to Name: entry the the file is not stored in the same folder than the original file.
9) Wrong ROTATION entry will not correctly be fixed.
10) Used a function that is not in NET-Framework 2.0.
Version 3.0.0 (2009-11-21) (DATHeader300Release.zip)
1) Mostly new GUI Design.
2) Click on color list shows the color in the tooltip.
3) History Entries will be in correct sort order.
4) Added support for history entry for LUT parts.
5) Category list can be automatically updated.
6) Check for the status of a file (official or not).
1) File ends now with CR LF.
2) Wrong line ends now correct detected.
3) Wrong line ends now correct corrected.
Version 2.0.10 (2009-10-04) (DATHeader2010Release.zip)
1) If clipboard has text with a length < 26 character this text is put into the box for the download from PT.
2) Added version info and date in error report.
3) Optimized detection of comment lines.
4) Correction of Colinear Quads implemented.
1) Blank lines generates an error at parsing.
2) after auto round now flag changed is set
3) after correct identical vertices now flag changed is set
4) after color change now flag changed is set
5) cancel in color picker now leave all as before
6) timer for pull now is enabled
7) non ldconfig color rises error
8) auto reload fixed
9) "0 //" now is correct detected
10) "0" does not generate an error in correction
11) categories with two words now correct detected
Version 2.0.9 (2009-10-03) (DATHeader209Release.zip)
1) Option to show all results or only errors.
This option can be set in the 'Preferences' dialog box.
2) Auto Round with different values for position and matrix values.
Auto Round can be called from menu 'Corrections'. The values used can be set in the 'Preferences' dialog box.
There is also a threshold value that is used if the file is saved. If a file is saved and any value has more
decimals than the threshold you will be asked to use auto round.
3) Function 'Clear recent file list' added.
4) If file is not found on the PT you will be asked for to search in official parts.
5) You can now change a wrong color if you doubleclick on the wrong entry in the list.
Version 2.0.8 (2009-09-27) (DATHeader208Release.zip)
1) Now detailed scan is disabled if any change has been made.
(This was necessary, as detailed scan needs the line number.)
2) History Dialog made new.
3) If last line is only "0" then "0 //" check gives no error.
4) Scan for Error Result window redesigned. Now only errors will be displayed.
5) Some minor GUI changed based on user suggestion.
6) If numbers with more than 3 digits found you will be asked for rounding at
file save. Rounding is also possible by menu entry. You will be asked for
the number of digits to round to.
7) The question for Triangle to Quad will only be asked if necessary.
Version 2.0.7 (2009-07-20) (DATHeader207Release.zip)
1) Identical vertices on quads made into triangle. Maybe by this the BFC is broken. Should only be made if visual ok.
2) Detailed Scan for double lines.
3) Detailed Scan for non planar quads.
4) Detailed Scan for all in one (double lines, coplanar, Matrix all zero, convex, identical vertices, colinear vertices).
5) Error Report based on Detailed Scan for all.
6) Check for Pov-Code integrated.(http://www.ldraw.org/Article479.html)
1) Scan for Errors result shown in textbox.
2) Workaround for problem with inputboxes under Mac.
3) Handling of ldconfig.ldr changed to make it quicker.
Version 2.0.6 (2009-06-29) (DATHeader206Release.zip)
1) Checks for Keywords line length with autocorrect
2) Checks for Keywords used
3) Checks for Help line length with autocorrect
4) Open file direct from www.ldraw.org
5) Correction of many things now also possible before saving the file.
6) Optimization by triangle to quad (thanks Philo)
7) Checks colors used in Sticker acc. http://www.ldraw.org/Article339.html
8) Integration of LDDP, LDView and MLCad (not sure it works under linux)
9) Deep Scan for Bad Vertex Sequence with message of bad lines.
10) Deep Scan for Concave Quads with message of bad lines.
Too many changes in the background to mention here.
1) If category <none> is choosen also at filesafe there will be no more question if that is correct.
Version 2.0.5 (2009-06-09) (DATHeader205Release.zip)
1) Checks for double lines now also under Linux.
2) Checks for matrix all zero now also under Linux.
3) Checks if all quads are convex.
4) Checks for identical vertices
5) Checks for colinear vertices acc. http://www.ldraw.org/Article512.html#colinear.
6) Checks for bad vertex sequenz
7) Edit of !CMDLINE enabled.
8) Update enabled of ldconfig.ldr from ldraw.org.(No version control.)
9) Deletes double lines on file save without asking.
1) '~' is seen as a flag and not part of the description.
2) If first word is 'MOVETO' also no category is requested.
3) Window can now also be minimized.
1) Date in !HISTORY lines now correct again.
2) If '(Needs Work)' is added or deleted now works correct.
Version 2.0.4 (2009-06-01) (DATHeader204Release.zip)
Some more adjustments to recognize part type correctly.
If EDIT commands are used the current file will be unloaded as there could be strange results if you would change the part type that is currently used by the part.
Notification about wrong color now only once and not for each line separately.
Now with question for correction of '0 <comments>' to '0 // <comments>'.
The window can now be maximized where the header fields will grow. Also the font in this fields now smaller.
Polling enabled. If the file is changed outside of DATHeader you get a notification.
Full support for using space and tab as whitespace (http://www.ldraw.org/Article218.html).
Doubleline check is now very fast (unabled under LINUX as there are still errors.)
Matrix all Zero check added (unabled under LINUX as there are still errors.)
Check if the words 'new' or 'old' used in the partdescription as that is not a helpful description for the part.
Version 2.0.3 (2009-05-24) (DATHeaderBUGFIX.zip)
DATHeader checks the partdescription against the part type.
The error was a check at Subparts that should contain a '~' as first character of the partdescription. That is wrong.
Correct is that the partdescription of Subparts should NOT start with '~' or '_' as first character.
This correction is made in this Bugfix. The Zip-file contains only the exe file. Please override your current version (2.0.3 only) with this exe file.
Versin 2.0.3 (2009-05-22) (DATHeader203Release.zip)
Optimized to work under MONO on Windows and Linux.
If default values are not set and the "Set Preferences" Button is pressed a msgbox is displayed that you have to set the preferences.
Reviewer mode introduced. A new top menu command is added "Scan for Errors". Commandline parameter /r = reviewer mode implemented. Added checkbox for "Scan for Errors on file load".
Optimized double line check - but still too slow (still not available under MONO)
Version 2.0.2 (2009-05-17)
Changed label "Liscense" to "License".
Adjusted some Objects in the GUI for a better look.
If default values are not set, the "Set Preferences" Button is disabled.
No more message for datheaderini.xml not found.
Changed in option dialog "double line check on file load".
Check for double lines can now manually done by clicking on the label "double lines".
Version 2.0.1 (2009-05-17)
The spaces in description feature is changed, so that a one digit number after the word "Type" do not need to have two leading spaces.
Version 2.0.0 (2009-05-16)
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 firstname.lastname@example.org.
Attention: The program is delivered “as it is” and I am not responsable for any fault or damage to your system or your files.