home *** CD-ROM | disk | FTP | other *** search
- ' DesignCAD 3000 Batch AutoCAD Export for 3D Drawings Models
- '
- ' Since AutoCAD uses Z axis for Height, and the Y axis for depth
- ' each drawing is loaded, rotated 90 degrees on the X axis so it
- ' will "stand up" correctly in AutoCAD, then exported to DWG.
- '
- ' This means you should only use this macro on 3D models going to Acad.
- '
- ' Please follow these simple steps to get results
- '
- ' 1) Browse to your DesignCAD directory
- ' 2) Goto DOS in that directory
- ' 3) Type Dir *.dc /b >Files.txt and press enter
- ' 5) Make an Export folder underneath the DesignCAD folder
- ' 5) Open DesignCAD
- ' 6) Press Q and go to the File Locations tab
- ' 7) For Drawing files, browse to the DesignCAD directory and save
- ' your changes, so that DesignCAD is looking there to open files.
- ' 8) While there, set the Export path to the Export directory you just
- ' created.
- ' 9) Run the program
- ' 10) Don't forget to erase the files.txt file after you run the macro.
- ' each time.
- '
- ' Set's the target file to open
- Root$ = Sys$(20)
- File$ = Root$ + "\" + "Files.txt"
- ' Opens the file
- open "i", 1, File$
- ' Loop Until End of File
- do while eof(1) = 0
- input #1, A$
- Path$ = Sys$(20)
- B$ = Path$ + "\" +A$
- ' Opens the file, Fits it to Window
- >Open
- {
- <Filename [B$]
- }
- ' Fit file to window
- >FitToAllWindow
- {
- }
- ' Select entire file
- >SelectAll
- {
- }
- ' Rotate for AutoCAD
- >Rotate
- {
- <Axis 0
- ' [0 = x, 1 = y, 2 = z, 3 = 2-point, 4 = line, 5 = plane]
- <Angle 90
- }
- ' Makes Output File Strings
- Bob = LEN(B$)
- Bob = Bob -2
- C$ = LEFT$(B$, Bob)
- D$ = C$ + "DWG"
- ' Exports the file to DWG
- >DwgOut
- {
- <Filename [D$]
- }
- ' Closes each file
- >Close
- {
- <SaveChanges 0
- <FileName [B$]
- }
- loop
- ' End of file
- ' End of macro
- End
-