.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert .dwg to .bmp in AutoCAD 2013

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
chockalingam
2616 Views, 5 Replies

Convert .dwg to .bmp in AutoCAD 2013

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

5 REPLIES 5
Message 2 of 6

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 ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 6

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

Message 4 of 6

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 ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 6
ow
Contributor
in reply to: chockalingam

Or you can send the BMPOUT command to the commandline. 

 

 

Message 6 of 6
chockalingam
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...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost