CADImageDLL in a Web application using c#
Posted: 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
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