.NET

Reply
Valued Contributor
chockalingam
Posts: 84
Registered: ‎03-06-2012
Message 1 of 6 (1,245 Views)
Accepted Solution

Convert .dwg to .bmp in AutoCAD 2013

1245 Views, 5 Replies
11-20-2012 03:12 AM

Hi,

  I want to convert the .dwg file to .bmp in AutoCAD 2013 using interop services in API

 

I have a code to perform this in AutoCAD 2012 but that is not working fine in AutoCAD 2013. Can anyone help me in this regarding.

 

 

This is what i tried

 

AcadSelectionSet oSS = null;
short[] ftype = new short[1];
ftype[0] = 410;
object[] fdata = new object[1];
fdata[0] = "Model";
acadapp.ZoomExtents();
oSS = _acadapp.ActiveDocument.SelectionSets.Add("MySet");
oSS.Select(AcSelect.acSelectionSetAll, null, null, ftype, fdata);

acadapp.ActiveDocument.Export(OutputFileName, "BMP", oSS);

Hi all,

Finally Found Solution, the code i used is follows

 

AcadSelectionSet oSS = null;
short[] ftype = new short[1];
ftype[0] = 410;
object[] fdata = new object[1];
fdata[0] = "Model";
_acadapp.ZoomExtents();
oSS = _acadapp.ActiveDocument.SelectionSets.Add("MySet");

_acadapp.ActiveDocument.Export(OutputFileName, "BMP", oSS);

KillAcadDocuments(_acadapp);

 

 

just send the selection set as null, this is Exporting the BMP.

 

Thanks all for helping me...

*Expert Elite*
Alfred.NESWADBA
Posts: 9,388
Registered: ‎06-29-2007
Message 2 of 6 (1,211 Views)

Re: Convert .dwg to .bmp in AutoCAD 2013

11-20-2012 04:21 AM in reply to: chockalingam

Hi,

 

use the plot-functionality, that gives you more options (espcially the resolution) for the output.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Contributor
chockalingam
Posts: 84
Registered: ‎03-06-2012
Message 3 of 6 (1,207 Views)

Re: Convert .dwg to .bmp in AutoCAD 2013

11-20-2012 04:26 AM in reply to: Alfred.NESWADBA

Can you guide me how to do that.... Since i am not much familiar with that

*Expert Elite*
Alfred.NESWADBA
Posts: 9,388
Registered: ‎06-29-2007
Message 4 of 6 (1,196 Views)

Re: Convert .dwg to .bmp in AutoCAD 2013

11-20-2012 04:45 AM in reply to: chockalingam

Hi,

 

create a new plotter (with the new plotter-wzard) that creates raster-files (>>>details<<<)

Then search for source-code controlling plotting, e.g. >>>click<<<.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor ow
Contributor
ow
Posts: 18
Registered: ‎01-17-2009
Message 5 of 6 (1,192 Views)

Re: Convert .dwg to .bmp in AutoCAD 2013

11-20-2012 04:59 AM in reply to: chockalingam

Or you can send the BMPOUT command to the commandline. 

 

 

Valued Contributor
chockalingam
Posts: 84
Registered: ‎03-06-2012
Message 6 of 6 (1,186 Views)

Re: Convert .dwg to .bmp in AutoCAD 2013

11-20-2012 05:29 AM in reply to: chockalingam

Hi all,

Finally Found Solution, the code i used is follows

 

AcadSelectionSet oSS = null;
short[] ftype = new short[1];
ftype[0] = 410;
object[] fdata = new object[1];
fdata[0] = "Model";
_acadapp.ZoomExtents();
oSS = _acadapp.ActiveDocument.SelectionSets.Add("MySet");

_acadapp.ActiveDocument.Export(OutputFileName, "BMP", oSS);

KillAcadDocuments(_acadapp);

 

 

just send the selection set as null, this is Exporting the BMP.

 

Thanks all for helping me...

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!