CADImageDLL in a Web application using c#

Discuss and ask questions about CAD DLL (CAD Image DLL, CAD Importer DLL).

Moderators: support, SDS, admin

Post Reply
gezjames
Posts: 1
Joined: 28 Jul 2008, 23:57

CADImageDLL in a Web application using c#

Post by gezjames » 29 Jul 2008, 00:09

I am very new to CADImageDLL and have yet to successfully use the library. I am trying to create a CAD file and then get the extents after uploading the file through a web form. The code I am using is as follows:

if (!DLLWin32Import.CADFile.Equals(IntPtr.Zero))
{
DLLWin32Import.CloseCAD(DLLWin32Import.CADFile);
DLLWin32Import.CADFile = IntPtr.Zero;
}
DLLWin32Import.CADFile = DLLWin32Import.CreateCAD(IntPtr.Zero, @tabFle);
if (DLLWin32Import.CADFile.Equals(IntPtr.Zero))
{
MessageBox.Show("Error open file:" + @tabFle);
}
FRect fr = new FRect();
DLLWin32Import.GetExtentsCAD(DLLWin32Import.CADFile, fr);
MessageBox.Show(fr.Left.ToString());
double x1 = fr.Left;
double y1 = fr.Bottom;
double x2 = fr.Right;
double y2 = fr.Top;

Are there any ideas why this not working. I don't even get a useful error it just doesn't make it passed the call to DLLWin32Import.CreateCAD.

Thanks in advance
Gerry

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

Re: CADImageDLL in a Web application using c#

Post by support » 30 Jul 2008, 10:29

Hello Gerry,
  1. CADImage.DLL can't read files from the Web. It can read only from the hard disk. Also it can read files from the memory. So if you can read file in the memory then CADImage.DLL must read it form the memory.
  2. What is your parameter "tabFle"?
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply