Page 1 of 1

Viewing .dfx files in .aspx page

Posted: 03 Apr 2012, 10:50
by Venkat
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

Re: Viewing .dfx files in .aspx page

Posted: 03 Apr 2012, 12:42
by Venkat
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:

Re: Viewing .dfx files in .aspx page

Posted: 03 Apr 2012, 16:50
by support
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.