.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding acctrl control kills Visual Studio 2010

7 REPLIES 7
Reply
Message 1 of 8
wlasek
2436 Views, 7 Replies

Adding acctrl control kills Visual Studio 2010

I am using Visual Studio 2010 and DWG TrueView 2013 (windows 7 32-bit).

I am trying to make an example through-the-interface.typepad.com/through_the_interface/2008/03/embedding-autoc.html but i have problem.

When I try drag AcCtrl into WinForm, Visual Studio show message:

"Microsoft Visual Studio has encountered a problem and need to close" and VS closes.

 

How solve this problem ??

7 REPLIES 7
Message 2 of 8
bherber
in reply to: wlasek

I have the exact same issue. Through the years I have tried using the TrueView Api within VS2005,VS2008 & VS2010 and all I have ever gotten was the same thing you were getting.  They used to have a good\fast API product called Voloview but Autodesk discontinued that product and create Trueview.  I have been forced to use Solidworks edrawings, it is lightweight and stable. Just add the COM component <Edrawings 2013 Control> and add a line of code to an event :

String FilePath = @”c:\drawing.dwg”;

axEModelViewControl1.OpenDoc(FilePath, false, false, true, "");

 

Download location: http://www.edrawingsviewer.com/ed/download.htm

 

Hopefully the ADN guys will read this and have a solution for Trueview.

Tags (1)
Message 3 of 8
Balaji_Ram
in reply to: bherber

Sorry, I am not an expert in TrueView API. I may not be able to help with that.

 

But the acctrl can be used with Visual Studio 2010.

I have attached a sample project to demonstrate this.

 

As Visual Studio is a 32 bit application even on 64 bit systems, as with any other ActiveX controls, the acctrl can also cause problem when used with the form designer.

 

But its a problem only with form designer and the code will still work ok when launched.

 

I have attached a screenshot of the sample app.

 

Hope this helps.

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 4 of 8
TJK77
in reply to: Balaji_Ram

Hi Balaji,

 

Could you give a little bit more detail how you accomplished this. I am getting errors for the property Src and also PostCommand that says they are not a member of AxACCTRLLib.AxAcCtrl.

 

Thank you,

 

-Ted

 

 

 

 

Message 5 of 8
fenton.webb
in reply to: TJK77

FYI - It's really hard to build a project that uses the AcCtrl on a system that has 64bit AutoCAD installed. The reason is that Visual Studio is 32bit, so trying to add the AcCtrl (which is 64bit) will crash Visual Studio.

 

Build your code on a 32bit system or a system with 32bit AutoCAD installed.




Fenton Webb
AutoCAD Engineering
Autodesk

Message 6 of 8
Balaji_Ram
in reply to: TJK77

Hi Ted,

 

As my colleague mentioned, it is surely easier to work in a 32 bit system when using activeX controls and WinForms. If you are doing that, you can also refer to this blog post :

http://through-the-interface.typepad.com/through_the_interface/2008/03/embedding-autoc.html

 

The sample project that I attached earlier was built in my Windows 7, 64 bit system using these steps. 

 

To generate the assemblies, run the following commands in the Visual Studio command prompt :

 

aximp "C:\Program Files\Common Files\Autodesk Shared\AcCtrl.dll"
copy "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ACCTRLLib.dll" "C:\ObjectARX 2012\inc-x64\ACCTRLLib.dll"
copy "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\AxACCTRLLib.dll" "C:\ObjectARX 2012\inc-x64\AxACCTRLLib.dll"

 

This generates ACCTRLLib.dll and AxACCTRLLib.dll
which can be referenced in a .Net plugin

 

Now reference those dll in the project from "C:\ObjectARX 2012\inc-x64" folder

 

Can you please try building the sample project that was attached in my previous reply using these steps ? 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 7 of 8
TJK77
in reply to: Balaji_Ram

Hi Balaji,

 

Thank you for the explanation. That got me referencing the correct dlls, when I try to use the controls though it is telling me class not registered. I have tried using regsvr32 command but with no success. I get an error saying entry-point DllRegisterServer was not found.

 

Any ideas?

 

Thanks,

 

-Ted

Message 8 of 8
Balaji_Ram
in reply to: TJK77

Hi Ted,

 

Sorry, I do not know what else could be causing this problem in your system.

The sample project worked ok for me.

 

Do you have AutoCAD or TrueView installed in the system ? The acctrl is automatically installed with the product and there isnt any additional step to use it. 

 

Can you please try on any other system to see if it is system specific ?



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost