Author Topic: DesignCAD V28 - AutoCAD Export - DwgOut  (Read 141 times)

Robert Willis

  • Full Member
  • ***
  • Posts: 119
DesignCAD V28 - AutoCAD Export - DwgOut
« on: June 19, 2019, 08:28:07 PM »

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][/color]
' 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

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4268
Re: DesignCAD V28 - AutoCAD Export - DwgOut
« Reply #1 on: June 20, 2019, 05:52:46 AM »
AutoCAD 2018 and 2019 use the same file format, so FileType=8 should work ok.
25 years with DesignCAD

Rob S

  • Hero Member
  • *****
  • Posts: 4584
    • Construction Estimating Program for General Contractors
Re: DesignCAD V28 - AutoCAD Export - DwgOut
« Reply #2 on: June 30, 2019, 10:54:40 AM »
Did you mean that as written ???

Quote
' File Type = 7 AutoCAD Version 2004
'
User since Pro-design

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4268
Re: DesignCAD V28 - AutoCAD Export - DwgOut
« Reply #3 on: July 10, 2019, 12:36:29 PM »
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

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4268
Re: DesignCAD V28 - AutoCAD Export - DwgOut
« Reply #4 on: July 10, 2019, 12:56:32 PM »
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

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4268
Re: DesignCAD V28 - AutoCAD Export - DwgOut
« Reply #5 on: July 10, 2019, 01:11:31 PM »
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