开发者

View DWG files in a browser

I have an application developed with Asp.Net and C#. I have to display DWG - CAD files(stored in a server) in a client side browser. I cannot install Auto CAD or any other software or activeX control in my client side machines and it can be installed only on the server. Is there a way to achieve it?

I have tried the DWGViewX, but it was not a开发者_开发问答ble to display the image when accessed from a client. But when accessed from the server itself, am able to view the DWG file. I have just tried the trial version of DWGViewX. Is this issue because of the licensing issue?

ANy help in this regard will be greatly apprecited.

Regards

Vignesh


Have a look at CadLib. It has an ASP.NET example solution in the evaluation download. There's also a beta version for a Silverlight 4 edition (see the forum).


First, download the free DWG TrueView from Adobe and install it.
After that open Visual Studio (I use 2008) and open a new Windows Form Project.
Then switch to the form-designer.
There you open the toolbox and add a new tab "TrueView" or so.
After that rightclick and "Choose Items..."
--> wait a couple of seconds
--> then choose the tab "COM Components"
--> there you should find "Autodesk AcCtrl" mark it.

Now you have a component "Autodesk AcCtrl" in your "TrueView" Toolbox --> use it on the form.

and now, very simple, you need only one line of code in the Form1_Load function (generated through Visual Source) and put the following code in it:

axAcCtrl1.PutSourcePath(@"C:\WHERE\EVER\YOUR\DWG\FILE\IS\example.dwg");

Thats all!

Hope it helped!


If you want your end users, without having autocad or any compatable viewer for dwg files, then you need to convert dwg drawings to pdf or jpg. There are some libraries available in web to accomplish that. See the below url:

http://www.codeproject.com/Questions/103830/convert-from-dwg-to-pdf

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜