Author Topic: Save As - VB vs. VBA  (Read 3514 times)

0 Members and 1 Guest are viewing this topic.

quamper

  • Guest
Save As - VB vs. VBA
« on: February 07, 2007, 02:05:00 PM »
The Developer Documentation lists the information on how to call SaveAs as follows:

Code: [Select]
object.SaveAs FileName, FileType [, SecurityParams]
However when I look in object browser in Visual Studio it lists SaveAs under AxDbDocument as follows:

Code: [Select]
Public Overridable Sub SaveAs(ByVal FileName As String, Optional ByVal vSecurityParams As Object = Nothing)
     Member of: AXDBLib.AxDbDocument

So my question is how do you save to a previous version if you are working in VB vs VBA since I doesn't appear Filetype is an available parameter?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Save As - VB vs. VBA
« Reply #1 on: February 07, 2007, 03:14:20 PM »
If you are working with a AXDBLib document you don't have the option to change file types .. if you are opening the drawings though, you can save them as a different file type by specifying the filetype constant.

If you want to change the document without opening it, then you cannot change the filetype .. however, since the TrueConvert utility is now a free download, you may be able to utilize some of the items in that program to achieve the version changing you need without opening the drawings
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

quamper

  • Guest
Re: Save As - VB vs. VBA
« Reply #2 on: February 07, 2007, 03:24:59 PM »
Quote
If you are working with a AXDBLib document you don't have the option to change file types
I guess that answers my question!


Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Save As - VB vs. VBA
« Reply #3 on: February 07, 2007, 03:46:54 PM »
You can still simply edit it as an AcadDocument .. in VB grab a reference to AutoCAD and then the subsequent reference to the document

i.e.
Code: [Select]
Dim Doc as AcadDocument
Set Doc = AcadApplication.ActiveDocument
Doc.Saveas(Doc.Name, acR18_dwg)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

quamper

  • Guest
Re: Save As - VB vs. VBA
« Reply #4 on: February 08, 2007, 08:22:29 AM »
Quote
You can still simply edit it as an AcadDocument .. in VB grab a reference to AutoCAD and then the subsequent reference to the document

I don't think thats an option the way I am doing it.

I'm looping through the blocks in a drawing and creating 15-20 individual dwg's in a folder based on attributes of those blocks. In the interim I had been using
the TrueConvert program, so it's not too big of a deal to just continue to use that.


Dnereb

  • Guest
Re: Save As - VB vs. VBA
« Reply #5 on: February 11, 2007, 05:18:48 PM »
Strange that isn't mentioned but this code fragment:

Code: [Select]
Public Overridable Sub SaveAs(ByVal FileName As String, Optional ByVal vSecurityParams As Object = Nothing)
     Member of: AXDBLib.AxDbDocument
is VB.Net

that's  about two worlds apart from VBA