Very Nasty Exception!

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
thomascheah
Posts: 26
Joined: 17 Oct 2007, 06:46
Location: Malaysia
Contact:

Very Nasty Exception!

Post by thomascheah » 13 Nov 2007, 08:48

Hi,

Has anybody encounter this exception before?

Code: Select all

Unhandled Exception: System.Runtime.InteropServices.ExternalException: A generic
 error occurred in GDI+.
   at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc,
Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, String descripti
on)
   at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
   at CADImport.CADImage.ўХЎй#9830;#8252;ЎЧ#9786;ЎЧЎй(Stream , DRect )
   at CADImport.CADImage.ўѕ#9668;ўТ#9830;ЎЧЎй#9787;#9668;()
   at CADImport.CADImage.Draw(Graphics e, RectangleF Rect, Region visibleRegion)
   at CADImport.CADImage.Draw(Graphics e, RectangleF Rect)
   ... (removed irrelevant stacktrace) ...
   ... (removed irrelevant stacktrace) ...
I can't really pinpoint the path to reproduce it, but I know

<ul>
<li>I turn off the visibility of certain layers in my CAD file via CADImage.SetLayerVisible,</li>
<li>Call CADImage.RotToView to rotate to certain view</li>
<li>Recalculate all the width and height via CADImage.GetExtents(); </li>
</ul>

Any ideas and solutions on this? Thanks!

Thomas

<b>Objective World Pvt. Ltd.</b>
"<i>Turning Knowledge Into Wisdom.</i>"
http://www.objectiveworld.com

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 13 Nov 2007, 11:53

Hello Thomas,

Would you please give us a code which performs three steps described in you post. Also, would you please send us your file to supprt@cadsofttools.com, if AV arises just with it?

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply