Welcome, Guest. Please login or register.
May 16, 2012, 03:59:34 pm
Home Help Search Login Register
News: All posts discussing pricing or where to buy TurboCAD will be deleted.

+  TurboCAD Forums
|-+  SDK Corner
| |-+  SDK General Discussion
| | |-+  Specifing AutoCAD version programmatically
« previous next »
Pages: [1] Go Down Print
Author Topic: Specifing AutoCAD version programmatically  (Read 1763 times)
torosan
Newbie
*
Posts: 5


« on: June 24, 2009, 11:31:48 pm »

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
kchapman
Administrator
Full Member
*****
Posts: 201


« Reply #1 on: July 06, 2009, 09: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.
Logged
torosan
Newbie
*
Posts: 5


« Reply #2 on: July 08, 2009, 05:36:38 am »

Thank K.
I'll give it a try instantly!

Regards
Fabio
Logged
torosan
Newbie
*
Posts: 5


« Reply #3 on: July 14, 2009, 12:28:46 am »

It works great!

Thank you
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.048 seconds with 17 queries.