No matter how hard I try, I cannot get the Database.LoadMlineStyleFile method to correctly load a .mln file. I know this is a valid file because I can successfully load it manually inside AutoCAD.
I know I'm providing the right name for my Mline style, and the file path is correct as well.
I searched the forum and found a thread stating that the issue lies when the Mline style name is different from the file name, as well as when the file contains more than one mline style.
I tried renaming my file to the same name as the mline style, as well as making sure that only one style is contained inside the file, but I'm still getting the "eFileAccessErr" error.
I also made sure to add the file's path to AutoCAD's Support Path options, as stated in this blog entry:
I'm using the .NET API for AutoCAD 2013 64-bit
Sorry, this is a known behavior while loading custom mln files.
Please try copying the mln file to the AutoCAD install folder and it should load ok.
I tried copying the file to AutoCAD's install folder (which in my case would be C:\Program Files\Autodesk\AutoCAD 2013), but I am still getting the eFileAccessErr.
Should this be working? If so, how can I programatically get Autocad's install directory? Why hasn't it worked for me? I'm positive I am providing the correct multiline style name.
Can you please check if the MLine style name same as the mln file name ?
If the mln file is named that way, I could also get it to load from any of the AutoCAD support path.
After moving the file to AutoCAD's root directory and renaming it to the name of the style to be loaded (but including the usual file extension .mln), it worked!
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.