home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / 3D Acad Out.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  1.7 KB  |  75 lines

  1. ' DesignCAD 3000 Batch AutoCAD Export for 3D Drawings Models
  2. ' Since AutoCAD uses Z axis for Height, and the Y axis for depth
  3. ' each drawing is loaded, rotated 90 degrees on the X axis so it
  4. ' will "stand up" correctly in AutoCAD, then exported to DWG.
  5. '
  6. ' This means you should only use this macro on 3D models going to Acad.
  7. '
  8. ' Please follow these simple steps to get results
  9. '
  10. ' 1) Browse to your DesignCAD directory 
  11. ' 2) Goto DOS in that directory
  12. ' 3) Type Dir *.dc /b >Files.txt and press enter
  13. ' 5) Make an Export folder underneath the DesignCAD folder
  14. ' 5) Open DesignCAD
  15. ' 6) Press Q and go to the File Locations tab
  16. ' 7) For Drawing files, browse to the DesignCAD directory and save
  17. '    your changes, so that DesignCAD is looking there to open files.
  18. ' 8) While there, set the Export path to the Export directory you just
  19. '    created.
  20. ' 9) Run the program
  21. ' 10) Don't forget to erase the files.txt file after you run the macro.
  22. ' each time.
  23. '
  24. ' Set's the target file to open
  25.     Root$ = Sys$(20)
  26.     File$ = Root$ + "\" + "Files.txt"
  27. ' Opens the file
  28.     open "i", 1, File$
  29. ' Loop Until End of File
  30.     do while eof(1) = 0
  31.     input #1, A$
  32.     Path$ = Sys$(20)
  33.     B$ = Path$ + "\" +A$
  34. ' Opens the file, Fits it to Window
  35.     >Open
  36.       {
  37.     <Filename [B$]
  38.       }
  39. ' Fit file to window
  40.     >FitToAllWindow
  41.      {
  42.       }
  43. ' Select entire file
  44.     >SelectAll
  45.     {
  46.     }
  47. ' Rotate for AutoCAD
  48.     >Rotate
  49.     {
  50.     <Axis 0
  51.     ' [0 = x, 1 = y, 2 = z, 3 = 2-point, 4 = line, 5 = plane]
  52.     <Angle 90
  53.     }
  54. ' Makes Output File Strings
  55.     Bob = LEN(B$)
  56.     Bob = Bob -2
  57.     C$ = LEFT$(B$, Bob)
  58.     D$ = C$ + "DWG"
  59. ' Exports the file to DWG
  60.     >DwgOut
  61.      {
  62.     <Filename [D$]
  63.      }
  64. ' Closes each file
  65.     >Close
  66.      {
  67.     <SaveChanges 0
  68.     <FileName [B$]
  69.      }
  70.     loop
  71. ' End of file
  72. ' End of macro
  73. End
  74.