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
CADImageDLL in a Web application using c#
Moderators: SDS, support, admin
Re: CADImageDLL in a Web application using c#
Hello Gerry,
- 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.
- What is your parameter "tabFle"?
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support