.NET

Reply
Active Contributor
absStructural
Posts: 36
Registered: ‎07-15-2010
Message 1 of 13 (1,032 Views)

TrueView 2014 AcCtrl Control

1032 Views, 12 Replies
02-06-2014 05:20 AM

Has anyone successfully embedded the TrueView 2014 control in a Windows form?  It seems like it shouldn't be all that difficult, but I'm not having much luck.

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 2 of 13 (972 Views)

Re: TrueView 2014 AcCtrl Control

02-13-2014 12:43 AM in reply to: absStructural

Hi Michael,

 

I have attached a sample project that embeds the DWG TrueView ActiveX control and the screenshots to show the steps to use the ActiveX in a .Net project. I have tested this in my Windows 7, 64 bit system that has DWG TrueView 2014 installed.

 

To try this :

 

1) Open Visual Studio 2010 64 bit command prompt

 

2) regsvr32 "C:\Program Files\Autodesk\DWG TrueView 2014\AcCtrl.dll"

 

3) aximp "C:\Program Files\Autodesk\DWG TrueView 2014\AcCtrl.dll"

 

4) copy "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ACCTRLLib.dll" "C:\Program Files\Autodesk\DWG TrueView 2014\ACCTRLLib.dll"

 

5) copy "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\AxACCTRLLib.dll" "C:\Program Files\Autodesk\DWG TrueView 2014\AxACCTRLLib.dll"

 

6) Add reference to the assemblies in your .Net project from "C:\Program Files\Autodesk\DWG TrueView 2014\ACCTRLLib.dll" and "C:\Program Files\Autodesk\DWG TrueView 2014\AxACCTRLLib.dll"

 

7) Set the "Embed Interop types" for the assemblies to False as shown in the attached screenshot

 

8) Build and run the sample. Select a drawing using the Browse button and click on Load button

 

Regards,

Balaji

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 3 of 13 (969 Views)

Re: TrueView 2014 AcCtrl Control

02-13-2014 12:46 AM in reply to: absStructural

 

Sorry, wanted to attach one more file, but the system would not let me add more than 3 files in a reply.

 

So, here is the screenshot of the Form with TrueView embedded.

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Distinguished Contributor
alex_b
Posts: 405
Registered: ‎08-15-2003
Message 4 of 13 (651 Views)

Re: TrueView 2014 AcCtrl Control

06-07-2014 01:08 AM in reply to: Balaji_Ram

Hi Balaji,

 

I'm trying to do the above (for Acad & TrueView 2012 and a bit more elaborate though).

I followed your instructions for registering the TrueView assemblies.

I get this error when calling AxACCTRLLib.AxAcCtrl.PutSourcePath(path);

"Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"

 

Any idea what causes this? 

 

Thanks,

 

alex

Active Contributor
absStructural
Posts: 36
Registered: ‎07-15-2010
Message 5 of 13 (640 Views)

Re: TrueView 2014 AcCtrl Control

06-07-2014 08:15 AM in reply to: alex_b

In my experience, that error is caused because TrueView was not the last Autodesk product installed.  AutoCAD, for instance, registers a different DLL with the same name.

 

Try running the TrueView installer again, and see if you have the same problem.

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 6 of 13 (634 Views)

Re: TrueView 2014 AcCtrl Control

06-07-2014 09:18 AM in reply to: absStructural

Yes, you are right. 

TrueView 2014 has to be installed as the last product.

 

But this has been fixed in TrueView 2015. The ActiveX control is now renamed as "dwgviewrAcCtrl.dll" and can be found in "C:\Program Files\Common Files\Autodesk Shared" 

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Active Contributor
absStructural
Posts: 36
Registered: ‎07-15-2010
Message 7 of 13 (630 Views)

Re: TrueView 2014 AcCtrl Control

06-07-2014 09:24 AM in reply to: Balaji_Ram

That's really good to hear.  From an IT and Development perspective - that requirement was kind of a pain.

Distinguished Mentor
gasty1001
Posts: 581
Registered: ‎04-11-2010
Message 8 of 13 (607 Views)

Re: TrueView 2014 AcCtrl Control

06-08-2014 03:02 PM in reply to: Balaji_Ram

Hi Balaji,

 

What about True View 2015?, as I can't find AcCtrl.dll in its installation directory.

 

Gaston Nunez

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 9 of 13 (594 Views)

Re: TrueView 2014 AcCtrl Control

06-08-2014 10:27 PM in reply to: gasty1001

Hi Gaston,

 

You will find it as "dwgviewrAcCtrl.dll" under "C:\Program Files\Common Files\Autodesk Shared" to avoid naming conflict with AutoCAD's AcCtrl.dll

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Active Contributor
absStructural
Posts: 36
Registered: ‎07-15-2010
Message 10 of 13 (562 Views)

Re: TrueView 2014 AcCtrl Control

06-09-2014 02:37 PM in reply to: Balaji_Ram

Balaji, please take a look at this when yiou get some time: http://forums.autodesk.com/t5/NET/TrueView-2015-ActiveX-Control/td-p/5083988

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!