I am using Visual Studio 2010 and DWG TrueView 2013 (windows 7 32-bit).
When I try drag AcCtrl into WinForm, Visual Studio show message:
"Microsoft Visual Studio has encountered a problem and need to close".
How solve this problem ??
the problem is the compatibility between the control and visual studio 2010. VS use to have some problems with controls like that or database management. That happened to me too, the control works fine on visual studio 2008.
Since few days ago I'm looking for detailed information about the properties of this control to use it however I want, if someone can help me with that I would thank it very much.
Diego
Hi, I am facing the same problem & need to add TrueView control to VS 2010 application, were you able to reach a solution to this problem? Is it solved in any VS service pack or even trueView SP?
Please advise.
Thanks, Mona
This problem is because of a bug introduced in AxImp the activeX importer when .NET 4.0 came out. The workaround that I used was to retarget the winforms app to .NET 3.5 framework, drop the control on the form and then retarget again to .NET 4.0
More detailed and less simple workarounds can be found here:
Another solution for the VS 2010 crash at least under my install:
I found that I have 2 different versions of this ActiveX control installed. I think once you run DWG TrueView it copies the control to Autodesk Shared. So make sure you select the COM component for your toolbox from the Shared folder not the DWG TrueView folder.
The one that crashes has identity: {950FE960-6EDD-407A-8A18-74D3EAD58376}\1.0\0\aximp
The one that works for me is: {EB54BB24-1CF3-44C9-8978-D1E8E5641775}\1.0\0\aximp
Hi,
Thanks for suggestions, but unfortunately none worked for me.
When trying to add the control from "C:\Program Files\Common Files\Autodesk Shared\AcCtrl.dll", I get the following error: Self-registration for C:\Program Files\Common Files\Autodesk Shared\AcCtrl.dll failed.
I tried to registed the DLL manually but it did not work.
Please advise.. Thanks
what is your .NET version your project is targeting when you drop the control on the form?
Also, can you run DWG TrueView standalone?!
Hi,
I tried to change my target .Net to 3.5, add the control, then target 4.0 but it did not work. I will need to target .Net 4.0 in my project. As for true view (2013), yes it runs perfectly standalone.
Thanks,
Is there any news, how to use DWG TrueView 2013 ActiveX (AcCtrl.dll) control with Visual Studio 2010?
After I drop the control from the toolbox to Form Visual Studio is collapsed. When I changed the target Framework (2.0, 3.0, 3.5, 3.5 Client, 4.0, 4.0 Client) the result was the same.
On ADN a saw: I have to use this ActiveX to display DWG images.
Here is the answer for myself:
You have to create and assign ActiveX control runtime.
1. Use Aximp.exe (Windows Forms ActiveX Control Importer) to convert type definitions in a COM type library for an ActiveX control into a Windows Forms control.
"aximp.exe C:\Program Files\Autodesk\DWG TrueView 2013\AcCtrl.dll"
The result: ACCTRLLib.dll and AxACCTRLLib.dll
2. Copy these files to your folder
3. Add reference from Solution Explorer to AxACCTRLLib.dll
4. Instantiate the control:
AxACCTRLLib.AxAcCtrl ac = new AxACCTRLLib.AxAcCtrl();
this.Controls.Add(ac);
ac.Dock = DockStyle.Fill;
5. Load your DWG file:
ac.PutSourcePath(@"d:\test.dwg");
The AcCtrl control is not compatible with VS 2010.