

The MAXDXF program was written to:

1) Translate a Mechanical Drawing in AutoCAD DXF format
    to Layout MAX format to define

        Board Outlines
        Component Keepout Areas
        Component Height Restriction Areas
        Mounting Holes

2) Translate a complex Component Definition in AutoCAD DXF format
    to Layout MAX format to define

        Component Outlines
        Net Attributed Obstacles (a Trace who takes his netname
            from the Pin to which it is attached)
        Copper Obstacles (a custom pad shape or a component shield)

3) Translate a Layout MAX format to AutoCAD DXF format
    to create

        Customizable Assembly drawings
        Customizable Drill drawings

Since neither the copper pour or plane thermals are included in the DXF
output, the translated DXF should not be used to create artwork for your
copper layers.  It is possible for Layout itself to create DXF output which
can be input to a CAD program to create copper layer artwork.


MAXDXF is a WINDOWS program which is invoked from the Layout Shell under
the IMPORT and EXPORT menus.  The menu picks will say "MAX to DXF" and "DXF
to MAX".  If you wish to create your own ICON in a WINDOWS program group,
simply create a new program entry which invokes "MAXDXF.exe" with no
operands to translate from MAX to DXF formats and a separate ICON and
program entry which invokes "MAXDXF.exe" with the "-X" switch to translate
from DXF to MAX.  If you are running Windows NT or Windows 95, you can
start MAXDXF from a DOS window and specify the names of the input and
output files directly on the command line.  The MAXDXF dialog will then
display with those fields already initialized by the command line.


The primary control for MAXDXF is an ASCII file called MAXDXF.INI which you
should install in the DATA subdirectory (where your DEFAULT.TCH technology
file is kept).  The file can be edited with any ASCII editor and the
software which parses the file will tolerate extra blank lines and extra
spaces or tabs so long as you follow a few rules:

    1) Section names are enclosed in square brackets as in: [VERSION].
    2) One section or definition per line.
    3) An equal sign separates each definition into two pieces:
        A LAYOUT LAYER  =  AN AUTOCAD LAYER
    4) Definitions for system control variables like "UNITS_DIVISOR" can
        be placed as frequently as you need to change them.  In theory,
        you could specify new control values for every layer.


The MAXDXF INI file itself contains comments introduced by a semicolon to
document the system control variables.  As we gather customer input,
additional control variables and sections will be added to the INI file.
If you obtain a BETA version of the software, the best way to learn of the
newest features is to print and read the INI file itself.

Pressing the TRANSLATE button on the MAXDXF dialog, will cause the program
to translate your file according to the rules you have specified in your
MAXDXF.INI file.  Pressing the INTERACT button on the DXF to MAX specific
dialog, will cause MAXDXF to load your MAXDXF.INI file, then it will start
the Visual CAD program and automatically load your DXF file.  From the
Visual CAD screen, you may interactively select polygons or traces using
the various selection mechanisms listed under the "Select By" popup menu
(right mouse button).  You can select ALL, or BY LAYER, or inidividual
OBJECTS, or inside a WINDOW, or CROSSING a WINDOW, or ADJOINING (which is
useful for lines and arcs which you want brought into the MAX file as a
single long connected entity).  Selecting one or more objects will cause
them to be highlighted on the screen.  After making your selections, click
the toolbar button on the left of the screen which looks like the OrCAD
logo (a red pointer overlaid on a square grid).  If you have forgotten to
select one or more objects for translation, you will receive an error
message and be returned to Visual CAD.  If there are objects selected, you
will see a dialog listing the number of entities selected, a drop-list box
in which you specify the kind of Layout object you would like to create
such as Board Outline or Height Keepout or Copper Pour, etc, and a second
drop-list box below it in which you specify the MAX layer on which to place
the selected entities.  Lastly there is a checkbox you may select to have
the entities deleted from Visual CAD after they are translated.  (This is
just to help you track which entities you have already translated.)
Pressing the OK button on this dialog performs the indicated translation on
the selected entities and then returns you to Visual CAD.  Pressing CANCEL
merely returns you to Visual CAD.  When you are once again in Visual CAD,
you may or may not have the previously selected entities still highlighted
on the screen.  Because of a bug in this release of Visual CAD, you may
have to bring up the popup menu and choose Select By then Clear List.  You
can repeat the process of selecting entities and translating them to MAX
format as often as necessary.  When you are done, choose File and Exit from
the Visual CAD menu.  If you are prompted by Visual CAD to save the
modified DXF file, click on NO...the deletions done while in Visual CAD
were strictly for bookkeeping and you probably do not want to write an
empty DXF file to disk over the top of your original file.  As soon as
Visual CAD exits, MAXDXF will flush the translated objects to disk to the
filename you specified on the original MAXDXF dialog.  Notepad is then
executed to display the translation log generated by MAXDXF.

Using the INTERACT process, you may translate to MAX format any file format
which is read and understood by Visual CAD.  In addition to DXF (AutoCAD
exchange format), Visual CAD can read DWG (AutoCAD binary format), GCD
(Generic CAD format) and VCD (Visual CAD's native format).

Translating from DXF to Layout formats is a lot like transliterating an
alphabet.  You provide the vocabulary and grammar using the MAXDXF.INI file
or using the drop-list boxes during interactive translation.  You should
not expect to use this facility as a general purpose translator of DXF
files from some other Printed Circuit Board package into Layout.  This
would be like expecting a simple transliteration of the Cyrillic alphabet
into the American English alphabet to give you a useable Russian to English
translation.  If you would like to work with OrCAD on the creation of the
required vocabulary and grammar to support such a translation, please
contact the OrCAD product marketing department.


This document explores the use of the software from the standpoint of "here
is a problem" and "here is how MAXDXF allows you to solve this problem".
If you are reading this file using a text editor, simply scan for the word
"PROBLEM:" to find the start of each problem definition.  If the problem is
not of interest to you, simply scan for the next occurence of that word (it
is always uppercased).


PROBLEM:
The DXF files I receive differ wildly in the layer names used, units used,
and in the processing I want MAXDXF to do for me.  This means each project
has his own customized MAXDXF.INI file.  Furthermore, when I archive this
job I would like to archive the MAXDXF.INI file with the rest of the data.

SOLUTION:
MAXDXF searches for the MAXDXF file using this search order:
    1) In the current directory
    2) In the directory where you keep MAXDXF.exe
    3) In the WINDOWS system directory
    4) In the Layout DATA directory
As you can see, the DATA directory where we install the MAXDXF.INI file is
last in the search order.  This allows you to place individual customized
MAXDXF.INI files in the project directories with your other LAYOUT files.
If you do this and you are running Windows NT or Windows 95, you should
invoke MAXDXF from within a DOS window inside the project directory.
Invoke "MAXDXF" to convert from MAX to DXF and invoke "MAXDXF -X" to
convert from DXF to MAX.


PROBLEM:
The DXF files I receive from the Mechanical Engineering group have the
Board Outline, Keepout Areas, and Mounting Holes all placed on the same
default AutoCAD layer:  layer 0.  Since I do not have AutoCAD on my system,
how do I split them apart?

SOLUTION:
Create a MAXDXF.INI file which uses the AutoCAD layer 0 twice:  once to
translate all the polygons in the DXF file into obstacles and once to
translate the circles into holes:

[OBSTACLE]

TOP = 0

[MECHANICAL]

UNPLATED_MOUNTING_HOLES = 0

The polygons will all be on the TOP layer along with one extra obstacle for
each hole.  Select and then edit the obstacles in Layout to move them to
the proper layer and change them to the appropriate Obstacle type:  Board
Outline or Keepout.


PROBLEM:
The DXF files I receive are in millimeters and I want my translated MAX files
to be in millimeters.

SOLUTION:
In your MAXDXF.INI file set the UNITS_DIVISOR to 25.4 as in
"UNITS_DIVISOR=25.4", and when you are prompted for a Technology file,
select the name of a Technology file which is in millimeters.


PROBLEM:
The DXF files I receive are split apart into multiple files:  one file
contains the Board Outline while another file contains the Keepouts and a
third file contains the Mounting Holes.

SOLUTION:
Make a copy of your MAXDXF.INI file in the project directory under a
different name:  "copy MAXDXF.INI fred".  Edit fred and delete all the
lines but the ones for the definitions and sections you need:

[MECHANICAL]

BOARD_OUTLINE         = file1.dxf

COMP_KEEPOUT_ALL      = file2.dxf

PLATED_MOUNTING_HOLES = file3.dxf

When MAXDXF prompts you for the name of the input DXF file, give it fred
instead.  MAXDXF will read the three files listed in the example and
translate them into the appropriate Layout objects within your output MAX
file.  The first line of your special INI file must be a comment line
beginning with a semicolon for MAXDXF to recognize it.


PROBLEM:
Sometimes the Mechanical Engineers use AutoCAD Traces as polygons to define
an area and sometimes they use Traces as lines with a specified width.

SOLUTION:
MAXDXF.INI has a section called [COPPER] to translate AutoCAD layers
with Traces which you want turned into polygons.  Place the AutoCAD
layers with Traces which you want as lines into the [OBSTACLE] section.
If the Mechanical Engineer has placed them both on the same AutoCAD
layer, you will have to reference the AutoCAD layer twice (once
in each section) and then use Layout to delete the translated object
you do not want.


KNOWN BUGS:

1) The output from MAXDXF cannot itself be recompiled to give you back the
original board.  According to our customers, this feature is not terribly
useful and has a much lower priority than other enhancements and bug fixes.

