TurboCAD Forums

SDK Corner => Sample SDK Projects => SDK General Discussion => Topic started by: torosan on June 25, 2009, 12:31:48 AM

Title: Specifing AutoCAD version programmatically
Post by: torosan on 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
Title: Re: Specifing AutoCAD version programmatically
Post by: kchapman on July 06, 2009, 10:55:46 AM
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.
Title: Re: Specifing AutoCAD version programmatically
Post by: torosan on July 08, 2009, 06:36:38 AM
Thank K.
I'll give it a try instantly!

Regards
Fabio
Title: Re: Specifing AutoCAD version programmatically
Post by: torosan on July 14, 2009, 01:28:46 AM
It works great!

Thank you