<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to export a single DB Object to a JPEG or BITMAP image in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463309#M11501</link>
    <description>&lt;P&gt;Is there specific reason that you need to the image of an entity or a few entities from a drawing file by opening it as side database?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the drawing opened in editor, you can simply use the COM API's Export() method. That is, zoom to an entity (you may want to also turn off layers to hide other overlapped entities, select it and then call Export() with proper file format input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it is doable with side database. I just wrote some quick code to prove it works. I'll post the whole source code as a complete project in my blog ASAP. Stay tuned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 12:46:51 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2022-10-05T12:46:51Z</dc:date>
    <item>
      <title>How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11460179#M11500</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm developing a DLL using .NET I want to know if there is a way to export a single DB object, Polyline, BlockReference, MText etc. in a JPEG or BITMAP image?&lt;/P&gt;&lt;P&gt;I want to read object directly from DB, without open the design:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;using (Database masterDb = new Database(false, true))
{
	masterDb.ReadDwgFile("C:\MyDesign.dwg", FileOpenMode.OpenForReadAndAllShare, false, null);
	using (Transaction masterTr = masterDb.TransactionManager.StartTransaction())
	{
		BlockTable masterBt = masterTr.GetObject(masterDb.BlockTableId, OpenMode.ForRead) as BlockTable;
		BlockTableRecord masterBtr = (BlockTableRecord)masterTr.GetObject(masterBt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);

		foreach (ObjectId objId in masterBtr)
		{
			Entity ent = (Entity)masterTr.GetObject(objId, OpenMode.ForRead);
			
			// HOW TO EXPORT THE SINGLE ENTITY IN A JPEG/BMP IMAGE ?????????
			..................
			..................
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 08:55:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11460179#M11500</guid>
      <dc:creator>scavallariTRKRY</dc:creator>
      <dc:date>2022-10-04T08:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463309#M11501</link>
      <description>&lt;P&gt;Is there specific reason that you need to the image of an entity or a few entities from a drawing file by opening it as side database?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the drawing opened in editor, you can simply use the COM API's Export() method. That is, zoom to an entity (you may want to also turn off layers to hide other overlapped entities, select it and then call Export() with proper file format input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it is doable with side database. I just wrote some quick code to prove it works. I'll post the whole source code as a complete project in my blog ASAP. Stay tuned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 12:46:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463309#M11501</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-10-05T12:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463562#M11502</link>
      <description>&lt;P&gt;OK, since I found a bit of time, I have the code published here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2022/10/extract-entity-image-from-side-loaded.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2022/10/extract-entity-image-from-side-loaded.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:17:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463562#M11502</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-10-05T14:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463602#M11503</link>
      <description>&lt;P&gt;I can surely open the document as active, but I need to save the bitmap/jpeg of entities that respect some characteristics, so I thought to use side database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:33:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463602#M11503</guid>
      <dc:creator>scavallariTRKRY</dc:creator>
      <dc:date>2022-10-05T14:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463619#M11504</link>
      <description>&lt;P&gt;I'm not sure if your requirement is to have a coded solution as part of a larger project. If not, you can do what you want with Raster Design. First, create a REM region using the IREGFROMVEC command. Then use the ICONVTOIMG command to push the REM to a new raster image.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:41:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463619#M11504</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2022-10-05T14:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a single DB Object to a JPEG or BITMAP image</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463632#M11505</link>
      <description>Man it works!!!!!&lt;BR /&gt;&lt;BR /&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:52:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-export-a-single-db-object-to-a-jpeg-or-bitmap-image/m-p/11463632#M11505</guid>
      <dc:creator>scavallariTRKRY</dc:creator>
      <dc:date>2022-10-05T14:52:46Z</dc:date>
    </item>
  </channel>
</rss>

