I have code that works on some computers but not on others, all running AutoCAD Civil3D 2010. The line of code that fails is:
(set1 newldrstyle (vlax-invoke mldrdict 'addobject MLS_Name "AcDbMLeaderStyle"))
The error message is:
Error: AutoCAD.Application: AcRxClassName entry is not in the system registry
I am assuming that the class name it cannot find is AcDbMLeaderStyle. On my computer (which runs the code successfully) I do have an entry for AcDbMLeaderStyle in the registry. I'll be at the site where the computers that cannot run the code are located tomorrow to check if they are perhaps missing this registry entry.
They have already tried both a repair install and an uninstall/reinstall, didn't fix the problem
If it turns out that the AcDbMLeaderStyle entry is missing, is there a way to "re-register" the classes?
Thanks,
--Doug
Solved it!
It wasn't easy to find the offending line of code because we delivered a VLX to the client and we couldn't make it fail on any of our computers, and I didn't write the program. But when I ran the .LSP at the client site I found that the program was failing at a line that referenced AcDbMLeaderStyle. I quick search in the registry found no reference to this class. Exporting the reg entry for this class from a computer that the program worked on and then importing to the computer that it didn't work on solved the problem.
Odd to me that a repair install or an uninstall & reinstall hadn't solved the problem, but repair/reinstalls aren't perfect.
I have exactly the same problem on one computer. Could you please let me know exactly what registry entries you exported & imported to fix this?
I had this same issue a few weeks ago - I think it is an bug inherent in some versions of CAD.
It's a bug all right, it's just strange that it only affects the odd installation while many should-be-identical installations are OK, and that repair installs and reinstalls don't fix it. I managed to cobble together a few .reg files and applied them and eventually managed to get it sorted. This was the relevant bit from the last .reg file I applied (AutoCAD 2010):
[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\ObjectDBX\R18.0\ActiveXCLSID]
"AcDbMLeaderStyle"="{99211C95-3862-4E7C-8770-35C68CA1944B}"
Thanks for the information Steve, appreciated.