Message 1 sur 1
BUG on LoadMlineStyleFile ?

Non applicable
04-06-2020
07:29 AM
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Lien permanent
- Imprimer
- Signaler
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 ?