Author Topic: DwgVersion from preferences  (Read 2381 times)

0 Members and 1 Guest are viewing this topic.

matt.hibb

  • Mosquito
  • Posts: 1
DwgVersion from preferences
« 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?

pendean

  • Mosquito
  • Posts: 20
  • "I am not a number, I am a free man"
Re: DwgVersion from preferences
« Reply #1 on: April 12, 2018, 12:49:46 PM »
Consider posting ion the dedicated.NET board http://www.theswamp.org/index.php?board=27.0

Crank

  • Water Moccasin
  • Posts: 1503
Re: DwgVersion from preferences
« Reply #2 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)
Vault Professional 2023     +     AEC Collection