Managed HLR API for AutoCAD

By Madhukar Moogala

We have recieved considerable amount of requests from developers to have a managed wrapper on classic HLR API, that comes with ObjectARX SDK of AutoCAD

This sample was originally written by Cyrille, recently I managed to fix few issues with progress callback and migrated to latest AutoCAD 2019.

I’m happily welcome any pull requests you have

Complete source of wrapper can found on Github HLRManaged NET Sample


Comments

3 responses to “Managed HLR API for AutoCAD”

  1. Hello,
    i’ve setted $(OARX2019) to my local path, as well as the AcDbMgd.dll using in StdAfx.h, and I’ve compiled the sample project.
    When I netload the HlrNetSample.dll and try the test command i get a FileNotFoundException, the same happens when I try to netload ASdkHlrApiMgd.dll. Stacktrace is the following:
    Cannot load assembly. Error details: System.IO.FileNotFoundException: Could not load file or assembly ‘AsdkHlrApiMgd.dll’ or one of its dependencies.
    File name: ‘AsdkHlrApiMgd.dll’
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
    at System.Reflection.Assembly.LoadFrom(String assemblyFile)
    at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
    at loadmgd()
    My experience with C++ is very limited, what I’m missing here?
    Thank you

  2. Hi,
    Thanks for stopping by.
    Can you please appload the “$(OARX2019)\Redistrib-x64\AsdkHlrApi23.dbx”, prior to loading your DLL

  3. Hello,
    apploading the DBX solved the issue, thank you.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading