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.

DesignCAD V28 - AutoCAD Export - DwgOut

Started by Robert Willis, June 19, 2019, 08:28:07 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Robert Willis


I have been using the following to select the correct AutoCAD format in previous versions of DesignCAD and need to update the macro to work with the latest. I could not find a updated Basiccad manual. I think this is the correct syntax but am looking for confirmation.


' File Type = 0 AutoCAD Version 12
[/size]
' 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 2010
' File Type = 7 AutoCAD Version 2013
' File Type = 8 AutoCAD Version 2018
' File Type = 9 AutoCAD Version 2019
=====================================================
Existing Macro snippet





' Makes Output File Strings
Bob = LEN(B$)
Bob = Bob -3
C$ = LEFT$(B$, Bob)
D$ = C$ + "DWG"
'
' DesignCAD Version 19.0
' 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 2010
' File Type = 7 AutoCAD Version 2004
'
>DwgOut
  {
<Filename [D$]
<Type 7
}

' Closes each file
>Close
  {
<SaveChanges 0
<FileName [B$]
  }
loop
' End of file
' End of macro
End

DrollTroll

AutoCAD 2018 and 2019 use the same file format, so FileType=8 should work ok.
25 years with DesignCAD

Rob S

Did you mean that as written ???

Quote' File Type = 7 AutoCAD Version 2004
'
User since forever

DrollTroll

From the BasicCAD Updates document elsewhere on this board:
>DwgOut and >DxfOut Command Parameter Update
<Type
The supported values to specify the target AutoCAD version are [7=2013, 6=2010, 5=2007, 4 = 2004, 3 =
2000, 2 = R14, 1 = R13, 0=R12]
25 years with DesignCAD

DrollTroll

Hmmm. Actually, DesignCAD 28 seems to ignore the <Type parameter in >DWGOUT commands -- it seems to just use whatever format you manually chose most recently. Will dig further...
25 years with DesignCAD

DrollTroll

After further experimentation:
Seems to be working ok IF you specify BOTH filename and type -- if you omit the filename, it may not pick up the type parameter.
Attached macro correctly exports all versions.
DT
25 years with DesignCAD

Robert Willis