I'm pretty new to programming in .net so I really need your help with this problem:
I'm trying to load a MLine Style from a local .mln file
The Code is quiet simple, so maybe I'm forgetting something, but I have no idea what it is.
When I run this code I get an "eFileAccessErr" error?!?
Public Sub MLineStyleCreate(ByVal strName As String)
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.D
Dim dwg As Database = doc.Database
Dim MLineStyleFile = "C:\Program Files\Autodesk\MarelAcadTools 2012\MarelMultiLines\beam.mln"
Can somebody please help me with this?
Your help will be very appreciated!
Thanks for your help. I have added the wrapper to my code and updated it for AutoCAD 2012. The error message is now gone, BUT the MLINESTYLE still isn't loaded from the .mln file... AARGH, this really gives me a headache.
I was mistaken. The error still isn't gone. I just missed it, but it now appears on the autocad command line...
So I still have a FileAccessErr Error. I have even moved the .mln file to "my documents" but still the same error appears.
What am I doing wrong here???
Maybe this can give you hint
"Returns Acad::eFileAccessErr if the path or file name specified could not be opened for write"
Do you have persmission to write to file? I know that you are only loading file, maybe autocad needs to write something in it
Yes, I have full permission to the file. I can read and write it. If I use the command MLSTYLE in autocad i can load multilinestyles from that file, so to me it doesn't seem like autocad has a problem with the file...
I ran into the same error message and ADN support found the cause. It seems that filename and stylename needs to be the same. Basically one style per mln file. I just checked the AC docs and it seems you can have more than one style in a mln file. But loading a style from a file containing multiple styles didn't work for me (AC map 2013 sp1). Maybe this information helps someone else as well,
Access a broad range of knowledge to help get the most out of your products and services.