DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Batch Convert to AutoCAD Macro Problem in DesignCAD Verison 18.2

Started by Robert Willis, July 09, 2008, 09:14:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Robert Willis

The macro listed below use to work prior to my update to Version 18.x. The macro will execute and apparently does the proper conversion of a DesignCAD file to AutoCAD Version 14. In the previous version the macro would automatically save the file with a DWG extension and then cycle through to the next file in the sequence as listed in the Files.txt file. In DesignCAD Version 18.2 the Save Dialog box is displayed and I must manually confirm the SAVE option for every file.

What am I missing to have the macro do the conversion with minimal user interaction?

Any assistance in resolving this issue would be greatly appreciated.





' 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 -3
   C$ = LEFT$(B$, Bob)
'
' DesignCAD Version 18.1
' Exports the file to DWG
' File Type = 0 AutoCAD Version 12
' File Type = 1 AutoCAD Version 13
' File Type = 2 AutoCAD Version 14
' File Type = 3 AutoCAD Version 2000
' File Type = 4 AutoCAD Version 2004
' File Type = 5 AutoCAD Version 2007
' File Type = 6 AutoCAD Version 2004
' File Type = 7 AutoCAD Version 2004
'
   >DwgOut
    {
   <Filename [D$]
   <Type 2
   }
   
' Closes each file
   >Close
    {
   <SaveChanges 0
   <FileName [B$]
    }
   loop
' End of file
' End of macro
End