Viewing .dfx files in .aspx page

Discuss and ask questions about CADViewX (Lite and Pro versions).

Moderators: admin, support, SDS

Post Reply
Venkat
Posts: 7
Joined: 01 Apr 2012, 12:01

Viewing .dfx files in .aspx page

Post by Venkat » 03 Apr 2012, 10:50

Hi All,
I am trying to convert cad file to jpeg. For that I am using bool ConvertCADToJPEG(string ASrc,string ADest,int AMaxDimensions). Here what is "AMaxDimensions" parametr? Can you explain about it? Which value I have to give? Can any one give sample example code ?
I am trying to bind that converted jpeg image to my image control in .aspx page. How this "AMaxDimensions" parameter will effect on my image ?

Thanks in advance

Venkat
Posts: 7
Joined: 01 Apr 2012, 12:01

Re: Viewing .dfx files in .aspx page

Post by Venkat » 03 Apr 2012, 12:42

Hi All,
I am trying to convert cad file to jpeg. For that I am using bool ConvertCADToJPEG(string ASrc,string ADest,int AMaxDimensions) method. But I am getting following exception. So please can any one suggest how to overcome this issue. I am using CADViewX Pro 8 Demo version. Thanks in Advance.

System.Runtime.InteropServices.COMException was unhandled by user code
Message=Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Source=EDrawing_Conversion_Viewer
ErrorCode=-2147418113
StackTrace:
at CADViewLib.ICADViewX.ConvertCADToJPEG(String ASrc, String ADest, Int32 AMaxDimensions)
at EDrawing_Conversion_Viewer.Viewer1.btnView_Click(Object sender, EventArgs e) in C:\Users\Administrator\Desktop\EDRM Source\Viewer Samples\EDrawing_Conversion_Viewer\EDrawing_Conversion_Viewer\Viewer.aspx.cs:line 32
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:

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

Re: Viewing .dfx files in .aspx page

Post by support » 03 Apr 2012, 16:50

Hello.
CADViewX converts a drawing to raster keeping proportions. AMaxDimensions parameter in ConvertCADToJPEG defines maximal size in pixels of output raster image.
Implementing CADViewX full functionality requires hosting the ActiveX. Or you can handle it as COM dll that requires creating a wrapper.

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

Post Reply