Displaying DWG in ASP.NET page

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
GazzaJ
Posts: 5
Joined: 07 Mar 2010, 17:28

Displaying DWG in ASP.NET page

Post by GazzaJ » 07 Mar 2010, 17:34

I have successfully used the CADImport.Net components in a Windows Forms application - especially the Editor and Viewer controls.

Can I use these components on a web page? In my Windows Forms application I display a SWG file and capture when a user selects a particular entity and then carry out some processing - I wish to replicate this in my web application.

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

Re: Displaying DWG in ASP.NET page

Post by support » 09 Mar 2010, 16:09

Hello.
CAD Import .NET components can be used with a web application. Please take a look at AspNet demo from the package.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

GazzaJ
Posts: 5
Joined: 07 Mar 2010, 17:28

Re: Displaying DWG in ASP.NET page

Post by GazzaJ » 25 Mar 2010, 19:40

This works fine and creates a jpg image from the instantiated CADImage.

I can capture the position that the user clicks on the image - are there any methods available which will allow me to determine which entity has been clicked on.

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

Re: Displaying DWG in ASP.NET page

Post by support » 29 Mar 2010, 14:30

Hello.
The CADImage.SelectEx method will return the entity that is located at clicked point. You must set CADImage.SelectionMode to SelectionEntityMode.Enabled value to use SelectEx or other selection method.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

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

Re: Displaying DWG in ASP.NET page

Post by pateketu » 09 May 2011, 20:36

I am trying SelectEx method in ASP.NET but keep getting NullReference Exception, I am using javascript to figure out the mouse poistion on the image, not sure if that is the correct way to do it though?

Any one implemented SelectEx method on DWGImage with ASP.NET?

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

Re: Displaying DWG in ASP.NET page

Post by support » 11 May 2011, 16:27

Hello.
The cause of exception is CADImport.dll assembly using CADImportFace.EntityPropertyGrid object if selection take place. You can create and refer an instance of PropertyGrid class to avoid the exception.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply