.NET

Reply
Valued Contributor
andred
Posts: 86
Registered: ‎10-17-2003
Message 1 of 6 (460 Views)
Accepted Solution

VB .net DWF Viewing

460 Views, 5 Replies
02-18-2014 11:34 AM

HI,

 

I'm looking to find a way to display DWF file on a VB .Net form with zooming capability. The Design Review control is not working with Visual Studio 2010. I download DWF toolkit but there is no sample to display a file.

 

Is anybody have an idea how to do that?

 

Regards,

 

André

ADN Support Specialist
philippe.leefsma
Posts: 616
Registered: ‎06-02-2009
Message 2 of 6 (418 Views)

Re: VB .net DWF Viewing

02-20-2014 01:25 AM in reply to: andred

The DWF Toolkit has no viewing capability, so good luck with that to find a sample that lets you display a file ...

 

The only component that can handle the display is the Design Review control. I was writting an article to workaround the crash in VS2010:

 

Issue

While inserting the Design Review control inside a Form, Visual Studio 2010 is crashing. Is there a workaround for that?


Solution

Unfortunately this is a know issue, but it is on VS2010 side rather than ADR.

You can refer to this web page for more information:

https://connect.microsoft.com/VisualStudio/feedback/details/568769/aximp-error-with-vb6-activex-cont...

 

It is mentioned that a fix might be available, but it is not publicly exposed, so you would need to approach Microsoft support team directly.

One workaround, without the use of Microsoft fix, would be to insert the viewer inside a user control and dynamically insert the control inside the form at runtime, so you could at least use the designer to create other elements inside your form.

 

Here is the workflow:

 

 - Create a new C# / VB.Net project

 - Create a new UserControl in the solution

 - Turn OFF the solution explorer and property display

 - Insert the DWF viewer in the new UserControl: this doesn't crash…

 - Add the new UserControl at runtime inside your form

 

Attached is a small VB.Net sample that illustrates the idea.

 

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Valued Contributor
andred
Posts: 86
Registered: ‎10-17-2003
Message 3 of 6 (399 Views)

Re: VB .net DWF Viewing

02-21-2014 04:52 AM in reply to: andred

Thank vou very much Philippe,

 

It works very well. I have a couple of questions:

  1. Can I only distribute the reference DLL with my application or I have to install Design Review?
  2. If I have to install Design Review, can I distribute it freely with my application?
  3. Is it the same problem with VS2012/2013?

Best regards,

 

André

ADN Support Specialist
philippe.leefsma
Posts: 616
Registered: ‎06-02-2009
Message 4 of 6 (381 Views)

Re: VB .net DWF Viewing

02-21-2014 01:10 PM in reply to: andred

Hi André,

 

Unfortunately you can't distribute the dependencies with your app as the license doesn't allow it.

Also I don't think it allows you to distribute ADR installer with your app, the user will have to install it seperately.

 

The crash is also happening in 2012 if I recall correctly. I didn't test it under 2013 though.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Valued Contributor
andred
Posts: 86
Registered: ‎10-17-2003
Message 5 of 6 (378 Views)

Re: VB .net DWF Viewing

02-21-2014 01:13 PM in reply to: philippe.leefsma
Thank you!!

Regards,

André
Valued Contributor
andred
Posts: 86
Registered: ‎10-17-2003
Message 6 of 6 (375 Views)

Re: VB .net DWF Viewing

02-21-2014 01:21 PM in reply to: philippe.leefsma

Hello Philippe,

 

I read the license agreement and I think I can distribute the installer as is, not altered, with original license agreement as part of my installation setup. Usually, I include this kind of software in my setup. It launch the original installer automaticaly as prerequisites.

 

Regards,

 

André

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.