Search found 5 matches
- 01 Mar 2018, 16:24
- Forum: CAD .NET
- Topic: Can't export DWG to big enough image
- Replies: 9
- Views: 39748
Re: Can't export DWG to big enough image
Hello!
Unfortunately, your suggestion didn't work for me. The same exception was thrown when i ran unit tests with or without administrative permissions.
Unfortunately, your suggestion didn't work for me. The same exception was thrown when i ran unit tests with or without administrative permissions.
- 09 Feb 2018, 14:45
- Forum: CAD .NET
- Topic: Can't export DWG to big enough image
- Replies: 9
- Views: 39748
Re: Can't export DWG to big enough image
Hello Mikhail, thank you for your answers!
As it turns out, the exception was thrown only when the code was executed from the unit test. When I run the same code from compiled executable, there is no problems what so ever. I also tested this code on different mashines and again without crashes.
As it turns out, the exception was thrown only when the code was executed from the unit test. When I run the same code from compiled executable, there is no problems what so ever. I also tested this code on different mashines and again without crashes.
- 31 Jan 2018, 12:13
- Forum: CAD .NET
- Topic: Can't export DWG to big enough image
- Replies: 9
- Views: 39748
Re: Can't export DWG to big enough image
Mikhail, I rewrote the code, using your example. public static void SaveImage(string sourceFile, string filename) { var cadImage = CADImage.CreateImageByExtension(sourceFile); cadImage.IsWithoutMargins = true; cadImage.LoadFromFile(sourceFile); int maxSideSizeInPixels = 9000; CADConst.MaxRasterImage...
- 30 Jan 2018, 11:00
- Forum: CAD .NET
- Topic: Can't export DWG to big enough image
- Replies: 9
- Views: 39748
Re: Can't export DWG to big enough image
Thank you for answer, Mikhail!
But as I wrote before, the SaveToFile method throws exception even when there are less then 400 000 000 pixels. What could be the cause of that? Is it possible to save image as big as the limit you are mentioned, around - 530 000 000 pixels?
But as I wrote before, the SaveToFile method throws exception even when there are less then 400 000 000 pixels. What could be the cause of that? Is it possible to save image as big as the limit you are mentioned, around - 530 000 000 pixels?
- 26 Jan 2018, 15:34
- Forum: CAD .NET
- Topic: Can't export DWG to big enough image
- Replies: 9
- Views: 39748
Can't export DWG to big enough image
Hi! I'm trying to export dwg to tiff file. The drawing is on A0 format sheet, so to see clear text I need the dpi be quite high (more then 300). I use this method: CADImport.CADImage.SaveToFile(string FileName, ImageFormat ImgFormat, DRect curRect, PixelFormat pixelFormat) public void SaveImage(stri...