<?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: Create image from Geometry in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11120466#M13144</link>
    <description>&lt;P&gt;Did you happen to read Kean's updated post regarding the original link that you posted about generating an image from blocks?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://through-the-interface.typepad.com/through_the_interface/2013/11/generating-larger-preview-images-for-all-blocks-in-an-autocad-drawing-using-net.html" target="_blank"&gt;https://through-the-interface.typepad.com/through_the_interface/2013/11/generating-larger-preview-images-for-all-blocks-in-an-autocad-drawing-using-net.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2022 19:56:37 GMT</pubDate>
    <dc:creator>hippe013</dc:creator>
    <dc:date>2022-04-21T19:56:37Z</dc:date>
    <item>
      <title>Create image from Geometry</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113552#M13141</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an image of of a polyline to be used in an image, however, I have not been able to find anything that would help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried &lt;A href="https://www.keanw.com/2011/11/generating-preview-images-for-all-blocks-in-an-autocad-drawing-using-net.html" target="_blank" rel="noopener"&gt;creating a block&lt;/A&gt;&amp;nbsp;but this hasn't been as successful as I'd hoped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it were just straight line segments, I could probably conjure something up with points and draw an image, but as there may be curves in the polyline, I am not sure how I would tackle that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have googled&lt;/P&gt;&lt;P&gt;Image from Entity&lt;/P&gt;&lt;P&gt;Copy Entity to Clipboard (thinking I could use the image)&lt;/P&gt;&lt;P&gt;Generate Bitmap from Entity&lt;/P&gt;&lt;P&gt;and other variations of the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any tips or references for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 08:48:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113552#M13141</guid>
      <dc:creator>BrentBurgess1980</dc:creator>
      <dc:date>2022-04-19T08:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create image from Geometry</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113664#M13142</link>
      <description>&lt;P&gt;And the problem is?&lt;/P&gt;&lt;P&gt;Have a look at &lt;STRONG&gt;CapturePreviewImage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;...
//Turn layers on/off and or set LineWeight
db.UpdateExt(true);
dynamic acadApp = AcadApp.AcadApplication;
acadApp.ZoomExtents();
ed.ZoomScale(1.03);
...
var size = doc.Window.DeviceIndependentSize;
using (var bmp = doc.CapturePreviewImage(Convert.ToUInt32(size.Width), Convert.ToUInt32(size.Height)))
{
//TopLeft Pixel must be backgroud to make it transparent, use ZoomScale(1.03)
var firstPxl = bmp.GetPixel(0, 0);  //255,0,0  white or Black
bmp.MakeTransparent(firstPxl);
if (File.Exists(IconPathname))
File.Delete(IconPathname);
bmp.Save(IconPathname, System.Drawing.Imaging.ImageFormat.Png);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:20:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113664#M13142</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2022-04-19T10:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create image from Geometry</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113811#M13143</link>
      <description>&lt;P&gt;Instead of using the PreviewImage of a drawing you can also make a plot to a file.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://www.theswamp.org/index.php?topic=35096.0" target="_blank" rel="noopener"&gt;this&lt;/A&gt; example for plotting to a PDF file. If you change the plotconfiguration file to the 'PublishToWeb PNG.pc3', it is possible to plot to a .png file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:37:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11113811#M13143</guid>
      <dc:creator>R.Gerritsen4967</dc:creator>
      <dc:date>2022-04-19T11:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create image from Geometry</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11120466#M13144</link>
      <description>&lt;P&gt;Did you happen to read Kean's updated post regarding the original link that you posted about generating an image from blocks?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://through-the-interface.typepad.com/through_the_interface/2013/11/generating-larger-preview-images-for-all-blocks-in-an-autocad-drawing-using-net.html" target="_blank"&gt;https://through-the-interface.typepad.com/through_the_interface/2013/11/generating-larger-preview-images-for-all-blocks-in-an-autocad-drawing-using-net.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 19:56:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11120466#M13144</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-04-21T19:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create image from Geometry</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11121954#M13145</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/846050"&gt;@SENL1362&lt;/a&gt;&amp;nbsp;wrote:&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;...
//TopLeft Pixel must be backgroud to make it transparent, use ZoomScale(1.03)
var firstPxl = bmp.GetPixel(0, 0);  //255,0,0  white or Black
bmp.MakeTransparent(firstPxl);
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Love that lil' trick:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.augi.com/showthread.php?172533-PNGOUT-with-transparent-background-option&amp;amp;p=1338401&amp;amp;viewfull=1#post1338401" target="_blank" rel="noopener"&gt;https://forums.augi.com/showthread.php?172533-PNGOUT-with-transparent-background-option&amp;amp;p=1338401&amp;amp;viewfull=1#post1338401&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 11:01:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-image-from-geometry/m-p/11121954#M13145</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2022-04-22T11:01:22Z</dc:date>
    </item>
  </channel>
</rss>

