Dwg to image without displaying
Moderators: SDS, support, admin
Dwg to image without displaying
Hi,
I am trying to batch convert .dwg CAD images to PNG images in a ASP.NET WebService without displaying the images at all.
Tried something like that:
1) This results in an error (only white background). Why, what's wrong here? How to achieve my requirement?
2) The example above uses a fixed sized Rectangle for testing purposes. How to determine the right width/height of the complete loaded CADImage without using any UI logic/controls?
Best Regards
Andreas
I am trying to batch convert .dwg CAD images to PNG images in a ASP.NET WebService without displaying the images at all.
Tried something like that:
Code: Select all
CADImage image = CADImage.CreateImageByExtension(inputFilePath);
MemoryStream ms = new MemoryStream();
image.SaveToStream(ms, ImageFormat.Png, new DRect(0.0, 0.0, 500.0, 200.0));
2) The example above uses a fixed sized Rectangle for testing purposes. How to determine the right width/height of the complete loaded CADImage without using any UI logic/controls?
Best Regards
Andreas
Re: Dwg to image without displaying
Hello Andreas.
The newly created image is empty. Use CADImage.LoadFromFile or CADImage.LoadFromStream to import existing drawing. CADImage.PureExtents contains coordinates of drawing's extents.
Alexander.
The newly created image is empty. Use CADImage.LoadFromFile or CADImage.LoadFromStream to import existing drawing. CADImage.PureExtents contains coordinates of drawing's extents.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support