.NET

Reply
Active Contributor
s.hofer
Posts: 39
Registered: ‎06-30-2006
Message 1 of 8 (2,624 Views)
Accepted Solution

Load dll-files in Acad2013

2624 Views, 7 Replies
03-29-2012 12:42 AM

Someone already tried to load VB dll's in Acad2013? 

They dont work for me - no message and no error, nothing happens.

 

in 2012 they worked well.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 2 of 8 (2,622 Views)

Re: Load dll-files in Acad2013

03-29-2012 12:44 AM in reply to: s.hofer

Hi,

 

do you mean VB6 dll's oder VB.NET dll's

Have you set new references (according to AutoCAD 2013/19.0) before you compiled the DLL's?

 

A little bit little, your info :smileywink:

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
s.hofer
Posts: 39
Registered: ‎06-30-2006
Message 3 of 8 (2,614 Views)

Re: Load dll-files in Acad2013

03-29-2012 01:33 AM in reply to: Alfred.NESWADBA

ahhhh

you'r right i have to rebuild my scripts with the r19 references...

i hope this works - i get errors in my code with the new references.

 

thanks

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 4 of 8 (2,612 Views)

Re: Load dll-files in Acad2013

03-29-2012 01:37 AM in reply to: s.hofer

Hi,

 

>> i get errors in my code with the new references

Yes, there are some modifications necessary to your code as there are some moves of functions/properties to different DLLs/different namespaces. But as long as we don't see what error you have we can't do anything for you :smileywink:

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
s.hofer
Posts: 39
Registered: ‎06-30-2006
Message 5 of 8 (2,607 Views)

Re: Load dll-files in Acad2013

03-29-2012 02:34 AM in reply to: Alfred.NESWADBA

ok, one error left...

    Public ReadOnly Property ThisDrawing As AcadDocument
        Get
            Return   Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.AcadDocument
        End Get
    End Property

 msg:

AcadDocument is not a member of Autodesk.AutoCAD.ApplicationServices.Document

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 6 of 8 (2,568 Views)

Re: Load dll-files in Acad2013

03-29-2012 07:13 PM in reply to: s.hofer

Hi,

 

one global change you have to do is to add a new DLL to the references:

AcCoreMgd.dll

 

To your statement getting asscess to the COM-based AcadDocument you have to use this way:

 

Dim tAcadDoc as ApplicationServices.Document
Dim tAcadDocCOM as Interop.AcadDocument

tAcadDoc = ApplicationServices.Application.DocumentManager.MdiActiveDocument

tAcadDocCOM = CType(ApplicationServices.DocumentExtension.GetAcadDocument(tAcadDoc), Interop.AcadDocument)

 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
s.hofer
Posts: 39
Registered: ‎06-30-2006
Message 7 of 8 (2,563 Views)

Re: Load dll-files in Acad2013

03-29-2012 11:23 PM in reply to: Alfred.NESWADBA

Ty for your help, but i have a other problem now LOL :smileysad:

 

EDIT:

OK, i updated my project to NETframework 4.0... seems to work now. Thank you very much!

Active Contributor
s.hofer
Posts: 39
Registered: ‎06-30-2006
Message 8 of 8 (2,553 Views)

Re: Load dll-files in Acad2013

03-30-2012 12:04 AM in reply to: s.hofer

To get "ThisDrawing" i use

Return DocumentExtension.GetAcadDocument(Application.DocumentManager.MdiActiveDocument)

 now.

 

if someone have the same problem...

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.