.NET

Reply
Member
wlasek
Posts: 3
Registered: ‎04-23-2012
Message 1 of 8 (702 Views)

Adding acctrl control kills Visual Studio 2010

702 Views, 7 Replies
05-14-2012 01:21 PM

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 ??

Active Member
bherber
Posts: 6
Registered: ‎01-29-2008
Message 2 of 8 (571 Views)

Re: Adding acctrl control kills Visual Studio 2010

05-30-2013 12:52 PM 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.

ADN Support Specialist
Balaji_Ram
Posts: 660
Registered: ‎03-21-2011
Message 3 of 8 (551 Views)

Re: Adding acctrl control kills Visual Studio 2010

06-06-2013 11:33 AM 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

Contributor
TJK77
Posts: 14
Registered: ‎03-22-2012
Message 4 of 8 (471 Views)

Re: Adding acctrl control kills Visual Studio 2010

07-23-2013 03:31 PM 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

 

 

 

 

ADN Support Specialist
fenton.webb
Posts: 352
Registered: ‎07-24-2007
Message 5 of 8 (464 Views)

Re: Adding acctrl control kills Visual Studio 2010

07-23-2013 09:28 PM 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

Developer Technical Services

Autodesk Developer Network


ADN Support Specialist
Balaji_Ram
Posts: 660
Registered: ‎03-21-2011
Message 6 of 8 (450 Views)

Re: Adding acctrl control kills Visual Studio 2010

07-25-2013 04:48 AM 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

Contributor
TJK77
Posts: 14
Registered: ‎03-22-2012
Message 7 of 8 (443 Views)

Re: Adding acctrl control kills Visual Studio 2010

07-25-2013 06:38 AM 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

ADN Support Specialist
Balaji_Ram
Posts: 660
Registered: ‎03-21-2011
Message 8 of 8 (413 Views)

Re: Adding acctrl control kills Visual Studio 2010

07-30-2013 12:33 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community