.NET

.NET

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

Database.LoadMlineStyleFile with eFileAccessErr (C#)

175 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: 693
Registered: ‎03-21-2011
Message 2 of 5 (133 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 (121 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: 693
Registered: ‎03-21-2011
Message 4 of 5 (111 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 (96 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!

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.