Convert .dwg to .bmp in AutoCAD 2013

Convert .dwg to .bmp in AutoCAD 2013

chockalingam
Advocate Advocate
3,525 Views
5 Replies
Message 1 of 6

Convert .dwg to .bmp in AutoCAD 2013

chockalingam
Advocate
Advocate

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);

0 Likes
Accepted solutions (1)
3,526 Views
5 Replies
Replies (5)
Message 2 of 6

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

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

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 6

chockalingam
Advocate
Advocate

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

0 Likes
Message 4 of 6

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 6

ow
Enthusiast
Enthusiast

Or you can send the BMPOUT command to the commandline. 

 

 

Message 6 of 6

chockalingam
Advocate
Advocate
Accepted solution

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...

0 Likes