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

Calling/Connecting .NET functions from a COM executable using the new 8.0 .NET in Acad 2025

2 REPLIES 2
Reply
Message 1 of 3
cadtown
201 Views, 2 Replies

Calling/Connecting .NET functions from a COM executable using the new 8.0 .NET in Acad 2025

 Up until Autocad 2024 versions, we used to be able to create TLB & DLL to connect/call net dll functions from COM executable using old 4.8 Framework by checking "Register for COM Interop" checkbox under the Compile section    in Visual Studio.  

 

But it looks like that option is no longer available after migrating from .NET 4.8 to 8.0 .NET.

Is there another way to call/connect a NET dll from a COM exe application with something like "acadApp.GetInterfaceObject("getNetFunctions.ComClass1")" ?..

 

Thanks in advance for your reply.

2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: cadtown

With .NET Core (.NET8 for Acad2025), exposing .NET component to COM became a bit more difficult than with .NET Framework. You may want to read this:

 

https://learn.microsoft.com/en-us/dotnet/core/native-interop/expose-components-to-com 

 

BTW, I'd think it is not worth the trouble doing it in most, if not all, cases.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
cadtown
in reply to: cadtown

Thanks for the information.

As you said it may not be worth for the trouble, and I wish Autodesk (or someone else) will come up with a tool/utility to generate the target TLB file by combining all the steps from the provided link.  Thanks anyway.

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

Post to forums  

Forma Design Contest


AutoCAD Beta