.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Database.LoadMlineStyleFile with eFileAccessErr (C#)

4 REPLIES 4
Reply
Message 1 of 5
samirbittar
528 Views, 4 Replies

Database.LoadMlineStyleFile with eFileAccessErr (C#)

Hello,

 

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:

http://adndevblog.typepad.com/autocad/2012/07/loading-mline-style-from-a-mln-file.html

 

I'm using the .NET API for AutoCAD 2013 64-bit

 

Thank you

4 REPLIES 4
Message 2 of 5
Balaji_Ram
in reply to: samirbittar

Hi,

 

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.



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
samirbittar
in reply to: Balaji_Ram

Hi,

 

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.

Message 4 of 5
Balaji_Ram
in reply to: samirbittar

Hi,

 

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.



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
samirbittar
in reply to: Balaji_Ram

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!

 

Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost