BUG on LoadMlineStyleFile ?

BUG on LoadMlineStyleFile ?

Anonymous
Not applicable
368 Views
0 Replies
Message 1 of 1

BUG on LoadMlineStyleFile ?

Anonymous
Not applicable

Hi,

I would like to load MLine style, so I use https://adndevblog.typepad.com/autocad/2012/07/loading-mline-style-from-a-mln-file.html in C#.

My code is :

string file = mlStyle.File.Substring(iLasIndex + 1);
                    AcadPreferences preferences = (AcadPreferences)Autodesk.AutoCAD.ApplicationServices.Application.Preferences;
                    string path = preferences.Files.SupportPath;
                    preferences.Files.SupportPath += preferences.Files.SupportPath + ";" + Tools.resourcePath();

                    file = Tools.resourcePath() + @"\" + file;
                    bool bExists = System.IO.File.Exists(file);
                    doc.Database.LoadMlineStyleFile(mlStyle.Style, file);
                    preferences.Files.SupportPath = path;

The path is correct, the file is correct, the style name is correct BUT I always have the exeption eFileAccessErr.

I can manually  load my mline style.

So what I've missed ?

 

0 Likes
369 Views
0 Replies
Replies (0)