1ef01931fSBen Gras 2ef01931fSBen Gras#------------------------------------------------------------------------------ 3*0a6a1f1dSLionel Sambuc# $File: cad,v 1.13 2014/03/23 18:05:38 christos Exp $ 4ef01931fSBen Gras# autocad: file(1) magic for cad files 5ef01931fSBen Gras# 6ef01931fSBen Gras 7ef01931fSBen Gras# Microstation DGN/CIT Files (www.bentley.com) 8ef01931fSBen Gras# Last updated July 29, 2005 by Lester Hightower 9ef01931fSBen Gras# DGN is the default file extension of Microstation/Intergraph CAD files. 10ef01931fSBen Gras# CIT is the proprietary raster format (similar to TIFF) used to attach 11ef01931fSBen Gras# raster underlays to Microstation DGN (vector) drawings. 12ef01931fSBen Gras# 13ef01931fSBen Gras# http://www.wotsit.org/search.asp 14ef01931fSBen Gras# http://filext.com/detaillist.php?extdetail=DGN 15ef01931fSBen Gras# http://filext.com/detaillist.php?extdetail=CIT 16ef01931fSBen Gras# 17ef01931fSBen Gras# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2 18ef01931fSBen Gras# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928 19ef01931fSBen Gras# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682 20ef01931fSBen Gras# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F 21ef01931fSBen Gras0 string \010\011\376 Microstation 22ef01931fSBen Gras>3 string \002 23ef01931fSBen Gras>>30 string \026\105 DGNFile 24ef01931fSBen Gras>>30 string \034\105 DGNFile 25ef01931fSBen Gras>>30 string \073\107 DGNFile 26ef01931fSBen Gras>>30 string \073\110 DGNFile 27ef01931fSBen Gras>>30 string \106\107 DGNFile 28ef01931fSBen Gras>>30 string \110\103 DGNFile 29ef01931fSBen Gras>>30 string \120\104 DGNFile 30ef01931fSBen Gras>>30 string \172\104 DGNFile 31ef01931fSBen Gras>>30 string \172\105 DGNFile 32ef01931fSBen Gras>>30 string \172\106 DGNFile 33ef01931fSBen Gras>>30 string \234\106 DGNFile 34ef01931fSBen Gras>>30 string \273\105 DGNFile 35ef01931fSBen Gras>>30 string \306\106 DGNFile 36ef01931fSBen Gras>>30 string \310\104 DGNFile 37ef01931fSBen Gras>>30 string \341\104 DGNFile 38ef01931fSBen Gras>>30 string \372\103 DGNFile 39ef01931fSBen Gras>>30 string \372\104 DGNFile 40ef01931fSBen Gras>>30 string \372\106 DGNFile 41ef01931fSBen Gras>>30 string \376\103 DGNFile 42ef01931fSBen Gras>4 string \030\000\000 CITFile 43ef01931fSBen Gras>4 string \030\000\003 CITFile 44ef01931fSBen Gras 45*0a6a1f1dSLionel Sambuc# AutoCAD 46*0a6a1f1dSLionel Sambuc# Merge of the different contributions and updates from http://en.wikipedia.org/wiki/Dwg 47*0a6a1f1dSLionel Sambuc# and http://www.iana.org/assignments/media-types/image/vnd.dwg 48*0a6a1f1dSLionel Sambuc0 string MC0.0 DWG AutoDesk AutoCAD Release 1.0 49*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 50*0a6a1f1dSLionel Sambuc0 string AC1.2 DWG AutoDesk AutoCAD Release 1.2 51*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 52*0a6a1f1dSLionel Sambuc0 string AC1.3 DWG AutoDesk AutoCAD Release 1.3 53*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 54*0a6a1f1dSLionel Sambuc0 string AC1.40 DWG AutoDesk AutoCAD Release 1.40 55*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 56*0a6a1f1dSLionel Sambuc0 string AC1.50 DWG AutoDesk AutoCAD Release 2.05 57*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 58*0a6a1f1dSLionel Sambuc0 string AC2.10 DWG AutoDesk AutoCAD Release 2.10 59*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 60*0a6a1f1dSLionel Sambuc0 string AC2.21 DWG AutoDesk AutoCAD Release 2.21 61*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 62*0a6a1f1dSLionel Sambuc0 string AC2.22 DWG AutoDesk AutoCAD Release 2.22 63*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 64*0a6a1f1dSLionel Sambuc0 string AC1001 DWG AutoDesk AutoCAD Release 2.22 65*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 66*0a6a1f1dSLionel Sambuc0 string AC1002 DWG AutoDesk AutoCAD Release 2.50 67*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 68*0a6a1f1dSLionel Sambuc0 string AC1003 DWG AutoDesk AutoCAD Release 2.60 69*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 70*0a6a1f1dSLionel Sambuc0 string AC1004 DWG AutoDesk AutoCAD Release 9 71*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 72*0a6a1f1dSLionel Sambuc0 string AC1006 DWG AutoDesk AutoCAD Release 10 73*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 74*0a6a1f1dSLionel Sambuc0 string AC1009 DWG AutoDesk AutoCAD Release 11/12 75*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 76*0a6a1f1dSLionel Sambuc# AutoCAD DWG versions R13/R14 (www.autodesk.com) 77*0a6a1f1dSLionel Sambuc# Written December 01, 2003 by Lester Hightower 78*0a6a1f1dSLionel Sambuc# Based on the DWG File Format Specifications at http://www.opendwg.org/ 79ef01931fSBen Gras# AutoCad, from Nahuel Greco 80ef01931fSBen Gras# AutoCAD DWG versions R12/R13/R14 (www.autodesk.com) 81*0a6a1f1dSLionel Sambuc0 string AC1012 DWG AutoDesk AutoCAD Release 13 82*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 83*0a6a1f1dSLionel Sambuc0 string AC1014 DWG AutoDesk AutoCAD Release 14 84*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 85*0a6a1f1dSLionel Sambuc0 string AC1015 DWG AutoDesk AutoCAD 2000/2002 86*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 87*0a6a1f1dSLionel Sambuc 88835f6802SDirk Vogt# A new version of AutoCAD DWG 89835f6802SDirk Vogt# Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru, 90835f6802SDirk Vogt# ICQ 358572321) 91835f6802SDirk Vogt# From various sources like: 92835f6802SDirk Vogt# http://autodesk.blogs.com/between_the_lines/autocad-release-history.html 93835f6802SDirk Vogt0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006 94*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 95835f6802SDirk Vogt0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009 96*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 97*0a6a1f1dSLionel Sambuc0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012 98*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 99*0a6a1f1dSLionel Sambuc0 string AC1027 DWG AutoDesk AutoCAD 2013/2014 100*0a6a1f1dSLionel Sambuc!:mime image/vnd.dwg 101835f6802SDirk Vogt 102835f6802SDirk Vogt# KOMPAS 2D drawing from ASCON 103835f6802SDirk Vogt# This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor 104835f6802SDirk Vogt# gathered nor specification 105835f6802SDirk Vogt# ASCON http://ascon.net/main/ in English, 106835f6802SDirk Vogt# http://ascon.ru/ main site in Russian 107835f6802SDirk Vogt# Extension is CDW for drawing and FRW for fragment of drawing 108835f6802SDirk Vogt# Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru, 109835f6802SDirk Vogt# ICQ 358572321, http://vkontakte.ru/id16076543) 110835f6802SDirk Vogt# From: 111835f6802SDirk Vogt# http://sd.ascon.ru/otrs/customer.pl?Action=CustomerFAQ&CategoryID=4&ItemID=292 112835f6802SDirk Vogt# (in russian) and my experiments 113835f6802SDirk Vogt0 string KF 114835f6802SDirk Vogt>2 belong 0x4E00000C Kompas drawing 12.0 SP1 115835f6802SDirk Vogt>2 belong 0x4D00000C Kompas drawing 12.0 116835f6802SDirk Vogt>2 belong 0x3200000B Kompas drawing 11.0 SP1 117835f6802SDirk Vogt>2 belong 0x3100000B Kompas drawing 11.0 118835f6802SDirk Vogt>2 belong 0x2310000A Kompas drawing 10.0 SP1 119835f6802SDirk Vogt>2 belong 0x2110000A Kompas drawing 10.0 120835f6802SDirk Vogt>2 belong 0x08000009 Kompas drawing 9.0 SP1 121835f6802SDirk Vogt>2 belong 0x05000009 Kompas drawing 9.0 122835f6802SDirk Vogt>2 belong 0x33010008 Kompas drawing 8+ 123835f6802SDirk Vogt>2 belong 0x1A000008 Kompas drawing 8.0 124835f6802SDirk Vogt>2 belong 0x2C010107 Kompas drawing 7+ 125835f6802SDirk Vogt>2 belong 0x05000007 Kompas drawing 7.0 126835f6802SDirk Vogt>2 belong 0x32000006 Kompas drawing 6+ 127835f6802SDirk Vogt>2 belong 0x09000006 Kompas drawing 6.0 128835f6802SDirk Vogt>2 belong 0x5C009005 Kompas drawing 5.11R03 129835f6802SDirk Vogt>2 belong 0x54009005 Kompas drawing 5.11R02 130835f6802SDirk Vogt>2 belong 0x51009005 Kompas drawing 5.11R01 131835f6802SDirk Vogt>2 belong 0x22009005 Kompas drawing 5.10R03 132835f6802SDirk Vogt>2 belong 0x22009005 Kompas drawing 5.10R02 mar 133835f6802SDirk Vogt>2 belong 0x21009005 Kompas drawing 5.10R02 febr 134835f6802SDirk Vogt>2 belong 0x19009005 Kompas drawing 5.10R01 135835f6802SDirk Vogt>2 belong 0xF4008005 Kompas drawing 5.9R01.003 136835f6802SDirk Vogt>2 belong 0x1C008005 Kompas drawing 5.9R01.002 137835f6802SDirk Vogt>2 belong 0x11008005 Kompas drawing 5.8R01.003 138ef01931fSBen Gras 139ef01931fSBen Gras# CAD: file(1) magic for computer aided design files 140ef01931fSBen Gras# Phillip Griffith <phillip dot griffith at gmail dot com> 141ef01931fSBen Gras# AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications. 142ef01931fSBen Gras# 143ef01931fSBen Gras0 belong 0x08051700 Bentley/Intergraph MicroStation DGN cell library 144ef01931fSBen Gras0 belong 0x0809fe02 Bentley/Intergraph MicroStation DGN vector CAD 145ef01931fSBen Gras0 belong 0xc809fe02 Bentley/Intergraph MicroStation DGN vector CAD 146ef01931fSBen Gras0 beshort 0x0809 Bentley/Intergraph MicroStation 147ef01931fSBen Gras>0x02 byte 0xfe 148ef01931fSBen Gras>>0x04 beshort 0x1800 CIT raster CAD 14908ff44c4SLionel Sambuc 15008ff44c4SLionel Sambuc# 3DS (3d Studio files) Conflicts with diff output 0x3d '=' 15108ff44c4SLionel Sambuc#16 beshort 0x3d3d image/x-3ds 152*0a6a1f1dSLionel Sambuc 153*0a6a1f1dSLionel Sambuc# MegaCAD 2D/3D drawing (.prt) 154*0a6a1f1dSLionel Sambuc# http://megacad.de/ 155*0a6a1f1dSLionel Sambuc# From: Markus Heidelberg <markus.heidelberg@web.de> 156*0a6a1f1dSLionel Sambuc0 string MegaCad23\0 MegaCAD 2D/3D drawing 157