IAcadDocument

IAcadDocument

Anonymous
Not applicable
1,297 Views
4 Replies
Message 1 of 5

IAcadDocument

Anonymous
Not applicable
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 --
0 Likes
1,298 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
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
> --
> 
> 
> 
> 
> 
> 
0 Likes
Message 3 of 5

Anonymous
Not applicable
Is this the ClassView generated wrapper? I presume so since the first parameter to SaveAs is a BSTR in the raw interface. The second parameter is the AcSaveAsType enum in the type library. -- 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:404d7892_2@newsprd01... > 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 > -- > > > > > >
0 Likes
Message 4 of 5

Anonymous
Not applicable
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
> > --
> >
> >
> >
> >
> >
> >
> 
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
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
> > > --
> > >
> > >
> > >
> > >
> > >
> > >
> > 
> > > >
0 Likes