I was wondering if anyone could explain to me how to fix this problem. I have one user on a Win 7 64-bit machine running 64-bit Autocad / ACA. I have written a routine that references the ACSMCOMPONENT library and I get an error that says the system can't find that library file. I have attached a screen shot for review.
All of my other machine are Windows XP and the .DLL that I wrote is located locally withe the ACSMCOMPONENT.dll in the same directory.
I have done some research and have concluded that I need a 64-bit version of the ACSMCOMPONENT.dll and I don't know where to get it or how to create it if possible.
Any help of direction would be greatly appreciated.
Solved! Go to Solution.
Yes - you need the 64-bit version of the type library for your 64-bit application version. the 32-bit and 64-bit versions of acsmcomponents18.tlb are included with the ObjectARX SDK downloadable from www.objectarx.com. You should have downloaded this SDK anyway if you'rte developing .NET plug-ins, becasue if includes documentation, samples, and the 'liposuctioned' acnmg and acdbmgd assemblies).
Autodesk Develoiper Network
Thank you for the quick response. I am using the appropriate SDK files as suggested. Everytime I try to added the ACSMCOMPONENTS18.TLB to the references it says the the file cannot be found. I have included a screen shot for reference. Also, I am using Visual Basic Express 2010.
You need to look closely at what you have done with your references.
It appears you have linked in the 32bit version of the Interop libraries, and additionally from the wrong location for starters.
For the AutoCAD base, I believe you would be better off using these references in these folders to start out with:
C:\Program Files\Autodesk\AutoCAD 2012 - English\acdbmgd.dll
C:\Program Files\Autodesk\AutoCAD 2012 - English\acmgd.dll
C:\Program Files\Common Files\Autodesk Shared\AcSmComponents18.tlb
C:\Program Files\Common Files\Autodesk Shared\acax18enu.tlb
I'm having a similar issue, only in my case I'm unable to load the acsmcomponents18.tlb file at all. I even started a new, blank project and attempted to load the reference from the C:\ObjectARX 2012\inc-x64\acsmcomponents18.tlb just to see if there was something wrong in my system. I've set the advanced compile options to .NET Framework 3.5 and any CPU. I'm running Visual Studio 2010 Professional (not Express) on Windows 7 x64. I have a program that works wonderfully in an XP 32bit environment but I can't seem to get it running in Win 7 x64 and this is a part of the issue. Thanks for your assistance!
I recently tried to use the appropriate type libraries on a Win & 64-Bit machine and received the same error as above. Can we please get some direction and guidance from the folks at autodesk on how to fix this situation. Even if you just post the comiled 64-bit version of the type library, that would be helpful.
I have 2 Win 7 x64 boxes that have AutoCAD2012 installed (64-bit Acad, of course).
In both boxes, there is no issue for me to start a VS2008/2010 project (DLL) and add reference to acSmComponemts18lib.tlb in the "COM" tab, not by browsing the TLB file.
If the AutoCAD installed correctly, you do not need to browse to the folder where "acsmcomponents18.tlb" is, simply select "COM" tab in "Add Reference" dialog box and find "AcSmComponens10 1.0 Type Library". That is because AutoCAD installation has correctly installed this COM component and registered in in Windows registry.
COM components/library must be registered, and it is vulnrable to "DLL hell" by other installation that may register the same component with different version (that is, different version of the same component cannot live side-by-side line .NET DLL in GAC).
So, I am against to use acsmcomponents18.tlb from ObjectARX SDK in this. That is, it is COM component and it is installed by AutoCAD, so, ALWAYS use the reference listed in "COM" tab of the "Add Reference" dialog box. The registry for this component could be messed up, say, in AutoCAD VBA's "References" dialog box, if fromo there you add reference to it by browse the TLB file, because VBA will register the browsed TLB file in registry, which may mess up the registry done by AutoCAD installation.
I just recently spent sometime over the weekend to try and figure out what the problem was and finally fix it. This of course was prompted by the fact thay my office continues to move toward 64-bit machines, thus the need to get the problem fixed.
So to just give a short description of how I fixed the problem, here it is.
I figured out conclusively that the .dll file that was originally created from the .tlb file was indeed 32-bit. This lead me to try to figure out how to create a 64-bit version of this manually and then confirm that it was compiled that way before even testing it in the Autocad environment.
I did this by manually using the tlbimp.exe with the appropriate settings to get a 64-bit compiled .dll. I then verified that it did compile correctly with ildasm.exe. After that I tested it in the 64-bit Autocad environment.
Below is the command line version that I used to make my .dll
tlbimp acsmcomponents18.tlb /namespace:acsmcomponents18Lib /reference:Autodesk.AutoCAD.Interop.dll /out:Interop.ACSMCOMPONENTS18Lib.dll
I hope this might help someone else out there.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.