Hello all
I need to create some Autocad plugin and I started c# project for that purpose but then I remembered I have ClarionNet_EE version 2.0.215.9353
Does somebody know - is it possible to use Clarion code inside Clarion c# and to produce some “Class Library” dll file?
Hi @Daniel1,
I wanted to share some thoughts on your idea of using Clarion for .NET.
Why Clarion for .NET May Not Be the Best Choice
-
Clarion for .NET Was Never Officially Released:
The version you have (v2.0.215.9353) was part of a product that, unfortunately, never reached a full production release. While there was enthusiasm for its potential, it was discontinued before being fully realized. As a result, it remains a beta-level product that is no longer actively supported. -
Outdated and Limited Runtime:
Since the product has been inactive for many years, its runtime compatibility is locked to an older .NET Framework version. This makes it unsuitable for modern development needs, especially for a project like building an AutoCAD plugin, which relies on up-to-date technology. -
Practical Considerations:
Developing an AutoCAD plugin requires robust and well-supported tools. Using a discontinued and outdated environment adds unnecessary risk and complexity to your project.
A Better Path Forward
I’d recommend continuing with C#. It’s a widely used and well-supported language for plugin development. From what I understand, Autodesk provides tools like an SDK and a strong community for C# developers, which should help you move forward smoothly.
A Brief Note on Clarion for .NET’s Legacy
Many developers in the Clarion community had high hopes for Clarion for .NET, and it’s understandable that its discontinuation was frustrating for those who invested time and money into it. While it’s always disappointing when a product doesn’t meet expectations, focusing on modern tools—like C#—can help achieve your goals more efficiently.
Best of luck with your project!
Mark
I agree 100% and I already started to work on this (with big help of Copilot).
Thanks anyway.
Hi @Daniel1,
If you’re looking to integrate Clarion with C#, there are ways to achieve this by creating Clarion DLLs that can be called from C# and vice versa. Here are a couple of approaches you might find helpful:
1. Creating Clarion DLLs for C# to Call
You can create native DLLs in Clarion that expose functions callable from C#. By using EXPORT
in Clarion, you can define specific functions to be accessed by external applications, including C#. Careful handling of data types and calling conventions is required, but this approach works effectively.
2. Ahead-of-Time (AOT) Compilation for Modern .NET
If you’re working with newer .NET versions, Native AOT compilation allows you to compile .NET code into native binaries. While this approach is primarily for C# development, it can complement Clarion DLLs in a mixed-language project where C# manages higher-level logic.
For older versions of .NET (pre-.NET 8.0), you may need to use Unmanaged Exports to call C# code from Clarion.
Additional Resources
These methods enable you to leverage the strengths of both Clarion and C#, allowing you to reuse existing code while taking advantage of modern frameworks. For more detailed discussions, check out related topics on ClarionHub and refer to the Clarion Help documentation on AttachThreadToClarion()
for guidance on threading considerations.
Best regards,
Mark