.NET

Reply
Active Member
samirbittar
Posts: 6
Registered: ‎08-15-2013
Message 1 of 5 (191 Views)

Database.LoadMlineStyleFile with eFileAccessErr (C#)

191 Views, 4 Replies
09-20-2013 08:00 AM

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

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 2 of 5 (149 Views)

Re: Database.LoadMlineStyleFile with eFileAccessErr (C#)

09-25-2013 12:41 AM 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

Active Member
samirbittar
Posts: 6
Registered: ‎08-15-2013
Message 3 of 5 (137 Views)

Re: Database.LoadMlineStyleFile with eFileAccessErr (C#)

09-25-2013 12:15 PM 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.

ADN Support Specialist
Balaji_Ram
Posts: 737
Registered: ‎03-21-2011
Message 4 of 5 (127 Views)

Re: Database.LoadMlineStyleFile with eFileAccessErr (C#)

09-26-2013 12:22 AM 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

Active Member
samirbittar
Posts: 6
Registered: ‎08-15-2013
Message 5 of 5 (112 Views)

Re: Database.LoadMlineStyleFile with eFileAccessErr (C#)

09-27-2013 07:49 AM 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!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!