<PAGE>   1

                                                                   EXHIBIT 10.18

             TENTH AMENDMENT TO FOURTH AMENDED AND RESTATED CREDIT
                              FACILITIES AGREEMENT

         THIS TENTH AMENDMENT TO FOURTH AMENDED AND RESTATED CREDIT FACILITIES
AGREEMENT (this "Amendment") is entered into as of July 3, 2001, by and among DT
INDUSTRIES, INC., a Delaware corporation ("Domestic Borrower"), DT INDUSTRIES
(UK) II LIMITED, ASSEMBLY TECHNOLOGIE & AUTOMATION GMBH, KALISH INC., formerly
Kalish Canada Inc., and DT CANADA INC. (together with Domestic Borrower,
separately and collectively, "Borrower"), BANK OF AMERICA, N.A., formerly
NationsBank, N.A., as administrative agent ("Administrative Agent"), and the
other lenders listed on the signature pages hereof (the "Lenders").

                                    RECITALS

                  (a) Borrower, Administrative Agent and the Lenders are parties
         to that certain Fourth Amended and Restated Credit Facilities Agreement
         dated as of July 21,1997 (as amended through the date hereof, the
         "Credit Agreement"; terms defined in the Credit Agreement and not
         otherwise defined herein shall be used herein as defined in the Credit
         Agreement).

                  (b) Borrower has requested that the Lenders waive certain
         Events of Default, and the Lenders have agreed to waive such Events of
         Default, subject to the terms and conditions contained herein.

                  (c) Borrower, Administrative Agent, and the Lenders desire to
         amend the Credit Agreement to provide for the retention by Borrower of
         certain asset sale proceeds, subject to the terms and conditions
         contained herein.

         NOW, THEREFORE, in consideration of the covenants, conditions and
agreements hereafter set forth, and for other good and valuable consideration,
the receipt and adequacy of which are all hereby acknowledged, the parties
hereto covenant and agree as follows:

         1. WAIVER. Subject to the satisfaction of the conditions of
effectiveness set forth in Section 8 of this Amendment and the other conditions
contained herein, the Lenders hereby waive any Event of Default under Section
16.1. of the Credit Agreement which may have occurred as a result, directly or
indirectly, of (a) the failure of Borrower to comply with the terms and
conditions of the Bond Documents prior to the date hereof, and (b) any Event of
Default arising from the Borrower's requests for Advances of the Revolving Loan
while any of the above Events of Default existed (the "Existing Events of
Default"). The waiver provided in this Section 1 shall not be and shall not be
deemed to be a waiver of any Defaults or Events of Default under the Credit
Agreement other than the Existing Events of Default.

         2. WAIVER TERMINATION. Notwithstanding anything in Section 1 above to
the contrary, if at any time Fleet National Bank, formerly BankBoston, N.A.
("Fleet") shall take any collection action under the Bond Documents, the waiver
provided in Section 1 above shall be null and void and of no further


<PAGE>   2

force or effect, and the Administrative Agent and the Lenders may pursue any
rights and remedies afforded to them under the Loan Documents after the
occurrence and during the continuance of an Event of Default.

         3. AMENDMENT TO THE CREDIT AGREEMENT. The Credit Agreement is hereby
amended by amending and restating the first sentence of Section 6.2.3 thereof in
its entirety, as follows:

                  Promptly upon receipt by Borrower or any Subsidiary of
                  Borrower of the proceeds from any sale, transfer, exchange,
                  lease, or other dispositions of any of the assets of Borrower
                  or any Subsidiary of Borrower on or after September 24, 1999
                  (except for sales in the ordinary course of business and sales
                  of worn out or obsolete assets to be immediately replaced by
                  assets of equal or greater value or quality), Borrower shall
                  prepay the Loans in a principal amount equal to (i) 80% of the
                  Net Proceeds of (A) the sale of certain real and personal
                  property owned by Detroit Tool Metal Products Co. consummated
                  on or about June 25, 2001, and (B) the sale of certain real
                  and personal property owned by Pharma Group, Inc. consummated
                  on or about July 2, 2001, and (ii) 100% of the Net Proceeds of
                  any other such transaction.

         4. ACKNOWLEDGMENT OF THE BORROWER. The Borrower acknowledges and agrees
that the Lenders executing this Amendment have done so in their sole discretion
and without any obligation. The Borrower further acknowledges and agrees that
any action taken or not taken by the Lenders or the Administrative Agent prior
to, on or after the date hereof shall not constitute a waiver or modification of
any term, covenant or provision of any Loan Document other than with respect to
the Existing Events of Default or prejudice any rights or remedies other than
with respect to the Existing Events of Default which the Administrative Agent or
any Lender now has or may have in the future under any Loan Document, Applicable
Law or otherwise, all of which rights and remedies are expressly reserved by the
Administrative Agent and the Lenders.

         5. SUBSIDIARIES ACKNOWLEDGMENT. By signing below, each of the Domestic
Borrower's Subsidiaries which has executed a guaranty of the Loan Obligations
(a) consents and agrees to this Amendment's execution and delivery, (b) ratifies
and confirms its obligations under its guaranty, (c) acknowledges and agrees
that its obligations under its guaranty are not released, diminished, impaired,
reduced, or otherwise adversely affected by this Amendment, and (d) acknowledges
and agrees that it has no claims or offsets against, or defenses or
counterclaims to, its guaranty.

         6. RELEASE.

                  (a) Upon this Amendment becoming effective, the Domestic
         Borrower and each of its Subsidiaries hereby unconditionally and
         irrevocably remises, acquits, and fully and forever releases and
         discharges the Administrative Agent and the Lenders and all respective
         affiliates and subsidiaries of the Administrative Agent and the
         Lenders, their respective officers, servants, employees, agents,
         attorneys, principals, directors and shareholders, and their respective
         heirs, legal representatives, successors and assigns (collectively, the
         "Released Lender Parties") from any and all claims, demands, causes of
         action, obligations, remedies, suits, damages and liabilities


                                        2

<PAGE>   3

         (collectively, the "Borrower Claims") of any nature whatsoever, whether
         now known, suspected or claimed, whether arising under common law, in
         equity or under statute, which the Domestic Borrower or any of its
         Subsidiaries ever had or now has against the Released Lender Parties
         which may have arisen at any time on or prior to the date of this
         Amendment and which were in any manner related to any of the Loan
         Documents or the enforcement or attempted enforcement by the
         Administrative Agent or the Lenders of rights, remedies or recourses
         related thereto.

                  (b) Upon this Amendment becoming effective, the Domestic
         Borrower and each of its Subsidiaries covenants and agrees never to
         commence, voluntarily aid in any way, prosecute or cause to be
         commenced or prosecuted against any of the Released Lender Parties any
         action or other proceeding based upon any of the Borrower Claims which
         may have arisen at any time on or prior to the date of this Amendment
         and were in any manner related to any of the Loan Documents.

                  (c) The agreements of the Domestic Borrower and each of its
         Subsidiaries set forth in this Section 6 shall survive termination of
         this Amendment and the other Loan Documents.

         7. REPRESENTATIONS AND WARRANTIES. By its execution and delivery
hereof, the Borrower represents and warrants to the Lenders that, as of the date
hereof:

                  (a) after giving effect to the waiver set forth in Section 1
         of this Amendment, the representations and warranties contained in the
         Credit Agreement and the other Loan Documents are true and correct on
         and as of the date hereof as if made on and as of such date; and

                  (b) after giving effect to the waiver set forth in Section 1
         of this Amendment, no event has occurred and is continuing which
         constitutes a Default or an Event of Default.

         8. CONDITIONS OF EFFECTIVENESS. This Amendment shall be effective as of
July 3, 2001, so long as all corporate actions of Borrower and the Significant
Subsidiaries taken in connection herewith and the transactions contemplated
hereby shall be satisfactory in form and substance to Administrative Agent and
Lenders, and each of the following conditions precedent shall have been
satisfied:

                  (a) Administrative Agent and each Lender shall have received
         each of the following:

                           (i) a certificate of the Borrower, in form and
                  substance satisfactory to Administrative Agent, Required
                  Lenders and Administrative Agent's counsel, certifying (A) as
                  to the accuracy in all material respects, after giving effect
                  to this Amendment and the waiver in Section 1 hereof, of the
                  representations and warranties set forth in the Credit
                  Agreement, this Amendment and the other Loan Documents, and
                  (B) that there exists no Default or Event of Default, after
                  giving effect to this Amendment and the waiver in Section 1
                  hereof, and the execution, delivery and performance of this
                  Amendment will not cause a Default or Event of Default; and


                                        3
<PAGE>   4

                           (ii) such other documents, certificates and
                  instruments as the Administrative Agent shall require prior to
                  the date hereof.

         9. REFERENCE TO CREDIT AGREEMENT. Upon the effectiveness of this
Amendment, each reference in the Credit Agreement to "this Agreement,"
"hereunder," or words of like import shall mean and be a reference to the Credit
Agreement, as affected and amended by this Amendment.

         10. COUNTERPARTS; EXECUTION VIA FACSIMILE. This Amendment may be
executed in one or more counterparts, each of which shall be deemed an original,
but all of which together shall constitute one and the same instrument. This
Amendment may be validly executed and delivered by facsimile or other electronic
transmission.

         11. GOVERNING LAW: BINDING EFFECT. This Amendment shall be governed by
and construed in accordance with the laws of the State of Texas and shall be
binding upon the Borrower, the Administrative Agent, each Lender and their
respective successors and assigns.

         12. HEADINGS. Section headings in this Amendment are included herein
for convenience of reference only and shall not constitute a part of this
Amendment for any other purpose.

         13. LOAN DOCUMENT. This Amendment is a Loan Document and is subject to
all provisions of the Credit Agreement applicable to Loan Documents, all of
which are incorporated in this Amendment by reference the same as if set forth
in this Amendment verbatim.

         14. NO ORAL AGREEMENTS. THIS WRITTEN AGREEMENT AND THE OTHER LOAN
DOCUMENTS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY NOT BE
CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL
AGREEMENTS OF THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE
PARTIES.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]


















                                        4

<PAGE>   5

         IN WITNESS WHEREOF, the parties hereto have executed this Amendment as
the date first above written.

<TABLE>
<S>                                         <C>
DT INDUSTRIES, INC.,                        KALISH INC. formerly Kalish Canada Inc.,
a Delaware corporation                      a New Brunswick, Canada corporation


By:    /s/ John M. Casper                   By:    /s/ John M. Casper
   ---------------------------------------     ---------------------------------------
Name:  John M. Casper                       Name:  John M. Casper
     -------------------------------------       -------------------------------------
Title: Senior Vice President-Finance, CFO   Title: Vice President
      ------------------------------------        ------------------------------------


DT CANADA INC.,                             ASSEMBLY TECHNOLOGIE &
a New Brunswick, Canada corporation         AUTOMATION GMBH, a German
                                            limited liability company

By:    /s/ John M. Casper                   By:    /s/ John M. Casper
   ---------------------------------------     ---------------------------------------
Name:  John M. Casper                       Name:  John M. Casper
     -------------------------------------       -------------------------------------
Title: Vice President                       Title: Geschaftsfuhrer
      ------------------------------------        ------------------------------------


DT INDUSTRIES (UK) II LIMITED,
a corporation of England and Wales


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Managing Director
      ------------------------------------
</TABLE>


<PAGE>   6

<TABLE>
<S>                                         <C>
BANK OF AMERICA, N.A., formerly             DRESDNER BANK AG, NEW YORK
NationsBank, N.A., as Administrative Agent  AND GRAND CAYMAN BRANCHES
and a Lender


By:    /s/ E. J. Joost                      By:    /s/ James M. Gallagher
   ---------------------------------------     ---------------------------------------
Name:  E. J. Joost                          Name:  James M. Gallagher
     -------------------------------------       -------------------------------------
Title: Managing Director                    Title: Director
      ------------------------------------        ------------------------------------

                                            By:    /s/ Richard J. Sweeney
                                               ---------------------------------------
                                            Name:  Richard J. Sweeney
                                                 -------------------------------------
                                            Title: Vice President
                                                  ------------------------------------

MERRILL LYNCH, PIERCE,                      THE BANK OF NOVA SCOTIA
FENNER & SMITH, INCORPORATED


By:                                         By:
   ---------------------------------------     ---------------------------------------
Name:                                       Name:
     -------------------------------------       -------------------------------------
Title:                                      Title:
      ------------------------------------        ------------------------------------


SUMITOMO MITSUI BANKING
CORPORATION                                 FIRSTAR BANK, N.A.


By:                                         By:    /s/ Timothy N. Schneer
   ---------------------------------------     ---------------------------------------
Name:                                       Name:  Timothy N. Schneer
     -------------------------------------       -------------------------------------
Title:                                      Title: Vice President
      ------------------------------------        ------------------------------------


GENERAL ELECTRIC CAPITAL CORPORATION


By:
   ---------------------------------------
Name:
     -------------------------------------
Title:
      ------------------------------------


NATIONAL CITY BANK


By:    /s/ Sharon L. Johnston
   ---------------------------------------
Name:  Sharon L. Johnston
     -------------------------------------
Title: Vice President
      ------------------------------------
</TABLE>


<PAGE>   7

ACKNOWLEDGED AND AGREED:

ADVANCED ASSEMBLY AUTOMATION, INC.



By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


ASSEMBLY TECHNOLOGY & TEST, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


DETROIT TOOL AND ENGINEERING COMPANY


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


DETROIT TOOL METAL PRODUCTS CO.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


HANSFORD MANUFACTURING CORPORATION


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


PHARMA GROUP, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------



<PAGE>   8


MID-WEST AUTOMATION ENTERPRISES, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


MID-WEST AUTOMATION SYSTEMS, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


SENCORP SYSTEMS, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


VANGUARD TECHNICAL SOLUTIONS, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


ARMAC INDUSTRIES CO.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------


ASSEMBLY MACHINES, INC.


By:    /s/ John M. Casper
   ---------------------------------------
Name:  John M. Casper
     -------------------------------------
Title: Vice President
      ------------------------------------