TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software’s can be used with TurboCAD.


Specifing AutoCAD version programmatically
Read 4081 times
* June 25, 2009, 12:31:48 AM
Hi
I use TC SDK since version 10 and I upgraded up to version 15 with VC++, different versions. I found most of the method I need to complete my task with TC, but I ever succeeded in specifying an AutoCAD Version wihle saving a file.

I use the methos SaveAs of the Drawing object, and set the property AUTOCADVERSION before saving, with value 1015 for ACAD2000, but the file is saved in the default ACAD version for the used turbocad (TC 14 has a version, TC15 has a different version and so on).
Is there a way to specify that from SDK, as in the saveas dialog of turbocad?
It's a very important point, I think, in order to keep compatibility with different customers

Kind regards
Fabio

Logged


* July 06, 2009, 10:55:46 AM
#1
My apologies for the slow reply, Fabio.

To preset the desired DXF (or DWG) version to AutoCAD 2000, you must do the following (VBScript syntax here) before saving the file:

TCApp.PutProfileString "DXF_Export", "IsAcad14", "0"
TCApp.PutProfileString "DXF_Export", "IsAcad2000", "1"
TCApp.PutProfileString "DXF_Export", "IsAcad2004", "0"
TCApp.PutProfileString "DXF_Export", "IsAcad2007", "0"

To change it to AutoCAD 14, set IsAcad14 to 1 and the others to 0.

Logged


* July 08, 2009, 06:36:38 AM
#2
Thank K.
I'll give it a try instantly!

Regards
Fabio

Logged


* July 14, 2009, 01:28:46 AM
#3
It works great!

Thank you

Logged