Your variant is initialized from a string.
acR15_dwg is not a string.
This is from acad15.h:
enum AcSaveAsType
{
acUnknown = -1,
acR12_dxf = 1,
acR13_dwg = 4,
acR13_dxf = 5,
acR14_dwg = 8,
acR14_dxf = 9,
acR15_dwg = 12,
acR15_dxf = 13,
acR15_Template = 14,
acNative = acR15_dwg
} AcSaveAsType;
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
AcadX for AutoCAD 2004 Beta 1
http://mysite.verizon.net/~vze2vjds/acadx/AcadX16.zip
"bluewood"
wrote in message news:40502edb_1@newsprd01...
> i just can work in vb .
>
> but cant do well in vc.
>
> in vb i use it as
> ////////////////////////////////////////////////////////////////////////////
> ////////
> Dim objAcadFile As AutoCAD.AcadDocument
> ...
> objAcadFile.SaveAs objAcadFile.FullName,acR15_dwg
>
> ////////////////////////////////////////////////////////////////////////////
> /////////
> it can work well
>
> but in c++
> ////////////////////////////////////////////////////////
> IAcadDocument doc(IApp.GetActiveDocument());
> _variant_t vt("acR15_dwg");
> doc.SaveAs("C:\\abc.dwg",vt);
> ////////////////////////////////////////////////////////
> it can't work .
>
> thanks for all
>
>
>
> "pfluegge" ??????:404ddf0f_2@newsprd01...
> >
> > Hi,
> > just take a look in the AutoCAD developer help / ActiveX and VBA
> > Reference you can find in AutoCAD directly ( Menu item "?" ).
> > Regards, Petra
> >
> > bluewood wrote:
> > > How can i use the method which name is "saveas"of the interface
> > > "IAcadDocument".
> > >
> > >
> > > which define as the follow:
> > > ////////////////////////////////////////
> > > void IAcadDocument::SaveAs(LPCTSTR FullFileName, const VARIANT&
> SaveAsType)
> > > ////////////////////////////////////////
> > >
> > > what should i do when i want save a dwg as
> > > R15 type .
> > >
> > >
> > > thanks for all
> > > --
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>