TheSwamp

CAD Forums => CAD General => Topic started by: matt.hibb on April 12, 2018, 12:43:22 PM

Title: DwgVersion from preferences
Post by: matt.hibb on April 12, 2018, 12:43:22 PM
I have a .Net application and I am wanting to call Database.SaveAs(). Depending on the circumstance, I need to set bBakandRename true/false, which forces me to use a method that also has to take a DwgVersion.

I want the resulting DWG to be the same version as the user has specified via the 'Open and Save' preferences. Is there anyway to query those preferences to get the DwgVersion to pass to Database.SaveAs()?

I can see that via COM I can get the AcSaveAsType from the preferences, but this doesn't seem to easily translate to DwgVersin.

Can anyone offer any help?
Title: Re: DwgVersion from preferences
Post by: pendean on April 12, 2018, 12:49:46 PM
Consider posting ion the dedicated.NET board http://www.theswamp.org/index.php?board=27.0
Title: Re: DwgVersion from preferences
Post by: Crank on April 12, 2018, 01:55:59 PM
[...]
I can see that via COM I can get the AcSaveAsType from the preferences, but this doesn't seem to easily translate to DwgVersin.
[...]
I don't know other languages, but in lisp I use:
Code: [Select]
(setq OpenSave (vla-get-preferences (vlax-get-acad-object)))
(vla-put-saveastype (vla-get-opensave OpenSave) "64"); Save as 2018 (ac2000=12 / ac2004=24 / ac2007=36 / ac2010=48 / ac2013=60 / ac2018=64)