ASP.NET Demo not rendering Sample.dwg

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
pateketu
Posts: 6
Joined: 05 May 2011, 13:53

ASP.NET Demo not rendering Sample.dwg

Post by pateketu » 05 May 2011, 14:00

Hello

I just downloaded the trial version of CADImport.NET and trying out the ASP.NET Demo, the demo runs but it only generates a blank image, see the Image file it generates, I have also tried using a different dwg file but the result is same

I have debugged through the code and no errors are generated

Any ideas?

Thanks
Ketul
Attachments
File generated by ASP.NET Demo
File generated by ASP.NET Demo
testasp3.png (12.27 KiB) Viewed 25798 times

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

Re: ASP.NET Demo not rendering Sample.dwg

Post by support » 05 May 2011, 17:04

Hello.
We have tested the described issue with the latest release version (7.2.7). The result looks correct. Have you tried import the file in any other form based demo application? You can send the file to support@cadsofttools.com for the testing.

Alexander.
Attachments
asp_net.png
asp_net.png (117.6 KiB) Viewed 25788 times
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

pateketu
Posts: 6
Joined: 05 May 2011, 13:53

Re: ASP.NET Demo not rendering Sample.dwg

Post by pateketu » 05 May 2011, 17:26

DWG file, I am using is the Sample.dwg file that was in your ASPNETDemo, The file works correctly on the Viewer demo, do you still need the dwg file?

pateketu
Posts: 6
Joined: 05 May 2011, 13:53

Re: ASP.NET Demo not rendering Sample.dwg

Post by pateketu » 05 May 2011, 19:25

never mind it needs the full path of the image file C:\......\sample.dwg and not just sample.dwg as defaulted in the textbox

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

Re: ASP.NET Demo not rendering Sample.dwg

Post by support » 06 May 2011, 12:23

Hello.
The ASP.NET demo project generates correct image if file name specified with the path like shown on screen shot. You can also add the following conditional code into Default.aspx.cs module to import files from "server":

Code: Select all

    public Errors OpenFile(string inFileName, string outFileName, double left, double top, double width, double height)
    {
        try
        {
            cadImage = CADImage.CreateImageByExtension(inFileName);
            if (cadImage == null)
                return Errors.UNIDENTIFIED_ERROR;

            // addition:
            if (Path.GetFileName(inFileName) == inFileName)
            {
                string realPath = this.MapPath("") + "\\";
                realPath += inFileName;
                inFileName = realPath;
            }
            // end of addition
            ...
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply