home *** CD-ROM | disk | FTP | other *** search
- ' DesignCAD Pro 2000 DWG Batch Export Program
- '
- ' Please follow these steps to get results
- '
- ' 1) Browse to the target directory
- ' 2) Goto DOS in that directory
- ' 3) Type Dir /b >Files.txt and press enter
- ' 4) Type Edit files.txt and remove the listing for
- ' files.txt in the files listing
- ' 5) Exit the DOS prompt and switch to D2k
- ' 6) Press Q and goto the File Locations tab
- ' 7) For Drawing files, browse to the target directory
- ' Note that too long a path will cause DesignCAD
- ' to report an error, so keep the path short.
- ' 8) Run the program
- ' 9) Don't forget to erase the files.txt file.
- '
- ' 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$]
- }
- >FitToAllWindow
- {
- }
- ' 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
- ' End of file
-