.NET

.NET

Reply
Active Member
6 Posts
0 Kudos
Registered: ‎08-15-2013
Post 1 of 5

Database.LoadMlineStyleFile with eFileAccessErr (C#)

202 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
762 Posts
100 Kudos
Registered: ‎03-21-2011
Post 2 of 5

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
6 Posts
0 Kudos
Registered: ‎08-15-2013
Post 3 of 5

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
762 Posts
100 Kudos
Registered: ‎03-21-2011
Post 4 of 5

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
6 Posts
0 Kudos
Registered: ‎08-15-2013
Post 5 of 5

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!