D X F F I L E T R A N S L A T I O N REFERENCE MANUAL Copyright CADOLOGY 1988,1989 CONTENTS LICENSE AGREEMENT . . . . . . . . . . . . . . . . . . . . . . 3 REGISTRATION AND ORDERING INFORMATION . . . . . . . . . . . . 4 ORDER FORM . . . . . . . . . . . . . . . . . . . . . . . . . 5 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . 6 CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . 7 Minimum configuration . . . . . . . . . . . . . . . . . 7 USING STEPBACK . . . . . . . . . . . . . . . . . . . . . . . 8 Producing the DXF file . . . . . . . . . . . . . . . . . 8 Running Stepback . . . . . . . . . . . . . . . . . . . . 8 Conversion type . . . . . . . . . . . . . . . . . . 8 Loading the modified DXF into AutoCAD . . . . . . . . . 9 Single step program execution . . . . . . . . . . . . . 10 TRANSLATION DETAILS . . . . . . . . . . . . . . . . . . . . . 11 Release 10.0 ---> 9.0 . . . . . . . . . . . . . . . . . 11 Release 9.0 ---> 2.6 . . . . . . . . . . . . . . . . . . 11 AutoCAD 2.6 ---> 2.5 . . . . . . . . . . . . . . . . . . 11 USEFUL AutoLISP FUNCTIONS . . . . . . . . . . . . . . . . . . 12 Associative dimensioning . . . . . . . . . . . . . . . . 12 3D Polygon Meshes . . . . . . . . . . . . . . . . . . . 12 ERROR MESSAGES . . . . . . . . . . . . . . . . . . . . . . . 13 WHAT IF THE TRANSLATION HAS FAILED . . . . . . . . . . . . . 14 Corrupt DXF file . . . . . . . . . . . . . . . . . . . . 14 Unknown entities . . . . . . . . . . . . . . . . . . . . 14 Some entities are missing . . . . . . . . . . . . . . . 14 APPENDIX . . . . . . . . . . . . . . . . . . . . . . . . . . 15 USER REGISTRATION . . . . . . . . . . . . . . . . . . . 15 COMPUSERVE - Autodesk Forum . . . . . . . . . . . . . . 16 2 LICENSE AGREEMENT CADOLOGY LIMITED(UK) designed and provides this computer program(STEPBACK) and documentation as is and licenses its use. The user assumes responsibility for the choice of this program to achieve its intended results, and for the installation, use and results achieved. Stepback is not, nor has ever been, public domain or free computer software. Stepback is distributed under the User Supported software concept. Non-registered users of Stepback are granted a limited license to use Stepback for a trial period(typically 1 month), in order to determine if it suits their needs. Any other use of Stepback or use past this period requires registration. Any use of non-registered copies of Stepback by a business, organisation, or any kind of institution is forbidden. User Distribution All users are granted a limited license to copy Stepback only for the purpose of allowing others to try it, subject to the above restrictions as well as these below: . Stepback must be distributed in absolutely unmodified form, including ALL programs(executable and AutoLISP functions), documentation, and any other files. . Stepback may not be included with any other product for any reason whatsoever without a license or written permission from CADology. . No charge or payment may be levied or accepted for Stepback. Limited Warranty: Stepback is provided without warranty of any kind. The complete risk as to the results produced by this program is assumed by purchaser/user. If the program becomes defective, the purchaser/user assumes the complete cost of all associated damages. Cadology Limited shall have no responsibility or liability to any person or company. The Governing Law The Governing law of this Agreement shall be that of England, UK. Acknowledgements AutoCAD, AutoLISP, DXF are trademark of AUTODESK PC-DOS is a trademark of IBM MS-DOS is a trademark of Microsoft 3 REGISTRATION AND ORDERING INFORMATION Registering Stepback allows you to use the product after the trial period. Registered Stepback users get mailed notification of Stepback updates(Usually after a new Release of AutoCAD). Stepback registration costs $50 US, and includes a copy of the latest version of Stepback on floppy disk. Cheques and international money orders are accepted for payment. An evaluation disk with the current version of Stepback on it is available for $20 US(this may be the same version you already have. This is to be used to try out Stepback, and does not include registration. The fee covers the cost of postage, diskette(s), and handling. To place an order, please use the order form on the following page. 4 ORDER FORM ------------------------------------------------------------- Remit to: CADology Limited 7 Pollards Wood Road, Norbury London S.W.16 4PB United Kingdom ------------------------------------------------------------- Quantity Item US $ ___ Stepback Registration............. @ $50 ea (includes registration + program and manual on disk) ___ Stepback evaluation disk.......... @ $20 ea (includes program and manual on disk, but not registration) Please circle floppy disk type: 5 1/4(360K) or 3 1/2(720K) Total $________ Cheques or money orders accepted. -------------------------------------------------------------- Name _______________________________________________________ Company_______________________________________________________ Address_______________________________________________________ _______________________________________________________ Phone _________________________ Autodesk compuserve area user id(for Email) ____________ Where did you obtain Stepback? _______________________________________________________ Comments_______________________________________________ _______________________________________________________ _______________________________________________________ _______________________________________________________ The name on the order form is considered the contact and is the person with whom all correspondence will take place. 5 INTRODUCTION DXF files are drawing interchange files, they are basically an ASCII representation of the drawing database, which is normally stored in a binary format. The DXF format was designed by Autodesk to enable interchange between different implementations of AutoCAD on different machines, and between AutoCAD and other programs. Most PC CAD systems today can handle DXF for both input and output of drawing data. STEPBACK will enable AutoCAD users to translate back a drawing that has been edited on the latest version of AutoCAD. 6 CONFIGURATION Minimum configuration STEPBACK will run on any IBM XT or AT with a hard disk or 100% compatible, STEPBACK requires PC-DOS or MS-DOS version 3.0 or higher and 512K of DOS memory. You may place STEPBACK in any directory you wish. 7 USING STEPBACK Producing the DXF file from AutoCAD A DXF file is produced by using the DXFOUT command whilst in AutoCAD, also their are some third-party software packages that produce DXF from a AutoCAD drawing too but these have NEVER been tested for use with Stepback. After entering the DXFOUT command AutoCAD will prompt the following:- Enter decimal places of accuracy (0 to 16)/Entities/Binary <6): The number of decimal places of accuracy AutoCAD will prompt for, will not effect the translation except in the duration of execution. So enter the decimal place accurate enough for your drawing. Do not select Entities or Binary as this will produce a DXF file that may not be complete(Entities only) or not understandable by STEPBACK(Binary). NOTE: DXF from Release 10 When producing DXF from Release 10 set the FLATLAND variable to 1 before using the DXFOUT command. This can be achieved by entering at the AutoCAD command prompt: Command:SETVAR Variable name or ?: FLATLAND New value for FLATLAND<0>: 1 Running Stepback When running STEPBACK the first requirement is to input the DXF file to be translated, this file must be in the current working directory. Then STEPBACK will prompt for the output filename, this file will contain the new DXF information after the translation has been performed and will also be created in the current working directory. Conversion type Once the two filenames have been entered, a bar menu will appear that will determine which previous release of AutoCAD the translator is required to translate too. The options are: Back to AutoCAD 2.5 DXF format Back to AutoCAD 2.6 DXF format Back to AutoCAD 9.0 DXF format Exit STEPBACK 8 To use the menu bar press the up and down arrows keys to move the bar and press the 'ENTER' key of the conversion required. Now that all the necessary information has been gathered the translation now starts. A window will pop up and display the DXF ASCII file as its being translated. Also the area at the bottom part of the screen will display the current DXF section the translator is working on. Loading the modified DXF into AutoCAD Once the translation is complete the new DXF file may be loaded by using the AutoCAD command DXFIN - See the AutoCAD reference manual for further details. 9 Single step program execution You can execute STEPBACK without it prompting for options by using the following format: C> STEPBACK where : 1 - Back to AutoCAD 2.5 DXF format(Release 7) 2 - Back to AutoCAD 2.6 DXF format(Release 8) 3 - Back to AutoCAD 9.0 DXF format(Release 9) e.g. C> STEPBACK 1 INPUT.DXF OUTPUT.DXF This facility can be incorporated in a normal DOS batch file to permit multiple translation at once. Please note that DXF files do take up a lot of disk space. Further details about the DXF format, the DXFIN and DXFOUT commands can be found in the AutoCAD reference manual. 10 TRANSLATION DETAILS The process of the translator means that some graphic entities, headers etc may have to be removed or changed. The following is a list of the major changes to the DXF file that STEPBACK will make. Release 10.0 ---> 9.0 - ALL NEW 3D co-ordinate information in Release 10.0 is removed COMPLETELY - All entity handles are removed if present - A few tables are removed(DWGMGR,VPORT,UCS and VIEW) 3DFACE This graphic entity will lose any invisible edges that have been placed in Release 10.0 3DMESH Any meshes and 3D polylines will be removed unless they are EXPLODEd back to normal 3DFACE entities - See enclosed LISP function 3DPOLY Any 3D polylines will be removed Release 9.0 ---> 2.6 SPLINES If a 2D spline(polyline) curve is found in the DXF format it is reduced to its control points or frame, of the curve AutoCAD 2.6 ---> 2.5 3DFACE This graphic entity will be removed completely 3DLINE This graphic entity will be removed completely DIMENSION This graphic entity will be removed completely unless they are EXPLODEd to normal entities- See enclosed LISP function 11 USEFUL AutoLISP FUNCTIONS To assist with the translation back to earlier AutoCAD version a few AutoLISP function are supplied to enhance and increase the chances of total backwards translation. Associative dimensioning When translating drawings back to AutoCAD version 2.5, the translator will remove any DIMENSION entities it finds. But to include the dimensions they must all be reduced back to basic entities e.g. Lines, Arcs, Text etc. This can be performed by using the AutoCAD command EXPLODE on all the Dimension entities in the drawing. As this is a slow tedious method there is a LISP program called 'EXDIM.LSP' that comes with STEPBACK which will search the complete drawing database and explode any dimension entities. This LISP program is loaded and executed by typing the following at the AutoCAD command prompt:- Command: (LOAD "EXDIM") Loading EXDIM.....Loaded Command: EXDIM Searching for Dimensions..... . . . . . . Command: Note : This file does not explode any DIMENSION entities that are defined in the BLOCKS section. 3D Polygon Meshes AutoCAD Release 10.0 provides several methods for generating polygon meshes(3DMESH, RULESURF, TABSURF, REVSURF, EDGESURF). These meshes are NOT compatible with any earlier versions, but we are allowed to use the EXPLODE command which will reduce these meshes to many 3DFACE entities which AutoCAD 2.6 and 9.0 understand. A LISP program called EXMESH.LSP will search the drawing database and EXPLODE any polygon meshes. This LISP program is loaded and executed by typing the following at the AutoCAD command prompt:- Command: (LOAD "EXMESH") Loading EXMESH.....Loaded Command: EXMESH Searching for 3D Polygon meshes..... . . . . . . Command: Note : This file does not explode any polyline mesh entities that are defined in the BLOCKS section. 12 ERROR MESSAGES The translation will terminate if the DXF file does not have the required DXF end of file group code and group text. STEPBACK will display one of the following error messages: Expecting group code This means that an attempt was made to read the group code in the input file but a read error has occurred. The most common read error is that there are no more DXF lines to input. Expecting group This is similar to the above except that group text was expected instead of a read error. If one of these errors is displayed it would appear that the DXF is corrupt, the best solution would be to enter AutoCAD and reproduce the DXF file again, using the DXFOUT command. 13 WHAT IF THE TRANSLATION HAS FAILED If after the translation the DXFIN command fails and returns to the AutoCAD main menu. Please note the line number it failed at and check that one of the following has occurred:- Corrupt DXF file In some drawings AutoCAD CAN PRODUCE A BAD DXF file from the DXFOUT command. To check if your DXF is good, use the same version of AutoCAD that produced the DXF file and begin a new drawing. Then at the AutoCAD 'Command:' prompt use the DXFIN command to build up a identical drawing. If this DXFIN fails then this means your version of AutoCAD produced a bad DXF file - Contact your dealer or Autodesk. Unknown entities If the DXFIN stops it might be because a unknown entity to AutoCAD exists in the DXF file. e.g. AutoCAD version 2.5 does not known about the '3DLINE' and '3DFACE' entities. To check if this may of happened, edit the DXF file with a text editor and go to the line number in question and have a look. If it is an unknown entity this may by due to selecting the wrong conversion type in STEPBACK or that the 'EXDIM.LSP' function has not been run. Some entities are missing If the drawing was created on a white background and some entities were drawn with the colour 8 (Black), when this is loaded into a AutoCAD system that has black background then the entities are there but are not displayed because the entities are black and displayed on a black background. 14 APPENDIX - USER REGISTRATION Please complete the following details and return to CADOLOGY only if you are a registered user of STEPBACK. Product : STEPBACK Version Number : Serial number : Date of Purchase : Supplier : Name : Company : Address : Telephone : EQUIPMENT - Computer : DOS : AutoCAD version: Other AutoCAD related software: If you belong PRESTEL or COMPUSERVE, please write the system and user id number for contact by electronic mail. CADology Limited, 7 Pollards Wood Road, London S.W.16 4PB, Great Britain 15 COMPUSERVE - Autodesk Forum If you have any problems or require any further details please contact us via Compuserve: Contact: Dawson Bunn User id : 72357,1330 Cadology Limited 16