<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error loading a Multiline style in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678975#M81332</link>
    <description>&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; It is worked because I've tested it before posting.</description>
    <pubDate>Mon, 26 Jun 2006 19:54:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-06-26T19:54:34Z</dc:date>
    <item>
      <title>Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678971#M81328</link>
      <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
Has anybody ever used db.LoadMlineStyleFile() to load a MlineStyle into a &lt;BR /&gt;
drawing?&lt;BR /&gt;
&lt;BR /&gt;
I succeeded in loading all styles with a workaround: insert a drawing with &lt;BR /&gt;
all styles in it. But I think it's more elegant to use mentioned function, &lt;BR /&gt;
and load only the requested style (instead of all).&lt;BR /&gt;
&lt;BR /&gt;
db.LoadMlineStyleFile(sMlineStyle, sMlineFile) gives me the error: &lt;BR /&gt;
eFileAccessErr.&lt;BR /&gt;
&lt;BR /&gt;
But:&lt;BR /&gt;
- filename and path are correct (i tried with "\", "\\", "/" and the AutoCAD &lt;BR /&gt;
search path system)&lt;BR /&gt;
- the mln file can be found&lt;BR /&gt;
- the file is not protected or opened in another application&lt;BR /&gt;
- the filelocation is also not protected&lt;BR /&gt;
- no problems when manually loading a style from this file (with mlstyle &amp;gt; &lt;BR /&gt;
Load)&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have an idea what causes this error eFileAccessErr to appear?&lt;BR /&gt;
&lt;BR /&gt;
Tnx.&lt;BR /&gt;
Henk - CAD Accent</description>
      <pubDate>Sat, 17 Jun 2006 22:31:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678971#M81328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-17T22:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678972#M81329</link>
      <description>Thank you very much.&lt;BR /&gt;
&lt;BR /&gt;
Gr Henk</description>
      <pubDate>Sat, 24 Jun 2006 14:12:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678972#M81329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-24T14:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678973#M81330</link>
      <description>I do not know why that exception is generated (I has that error in AutoCAD 2006 and 2007), but this wrapper can help you:&lt;BR /&gt;
[code]&lt;BR /&gt;
class Test&lt;BR /&gt;
{&lt;BR /&gt;
  class Wrapper&lt;BR /&gt;
  {&lt;BR /&gt;
    static int AcadVersion = Autodesk.AutoCAD.ApplicationServices.Application.Version.Major;&lt;BR /&gt;
    // For AutoCAD 2006:&lt;BR /&gt;
    [System.Security.SuppressUnmanagedCodeSecurity]&lt;BR /&gt;
    [DllImport("acdb16.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi,&lt;BR /&gt;
      EntryPoint = "?acdbLoadMlineStyleFile@@YA?AW4ErrorStatus@Acad@@PBD0@Z")]&lt;BR /&gt;
    extern private static ErrorStatus acdbLoadMlineStyleFile16(string mStyle, string mPath);&lt;BR /&gt;
    // For AutoCAD 2007:&lt;BR /&gt;
    [System.Security.SuppressUnmanagedCodeSecurity]&lt;BR /&gt;
    [DllImport("acdb17.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode,&lt;BR /&gt;
      EntryPoint = "?acdbLoadMlineStyleFile@@YA?AW4ErrorStatus@Acad@@PB_W0@Z")]&lt;BR /&gt;
    extern private static ErrorStatus acdbLoadMlineStyleFile17(string mStyle, string mPath);&lt;BR /&gt;
    public static ErrorStatus acdbLoadMlineStyleFile(string mStyle, string mPath)&lt;BR /&gt;
    {&lt;BR /&gt;
      switch(AcadVersion)&lt;BR /&gt;
      {&lt;BR /&gt;
        case 16: return acdbLoadMlineStyleFile16(mStyle, mPath);&lt;BR /&gt;
        case 17: return acdbLoadMlineStyleFile17(mStyle, mPath);&lt;BR /&gt;
      }&lt;BR /&gt;
      return ErrorStatus.NotImplementedYet;&lt;BR /&gt;
    }&lt;BR /&gt;
  };&lt;BR /&gt;
&lt;BR /&gt;
  // &lt;BR /&gt;
  // For test only&lt;BR /&gt;
  //&lt;BR /&gt;
  [CommandMethod("T1")]&lt;BR /&gt;
  public static void T1()&lt;BR /&gt;
  {&lt;BR /&gt;
    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
    ErrorStatus es = Wrapper.acdbLoadMlineStyleFile("METAL", @"F:\Program Files\AutoCAD 2007\ran.mln");&lt;BR /&gt;
    if (es != ErrorStatus.OK)&lt;BR /&gt;
    {&lt;BR /&gt;
      ed.WriteMessage("\nError: {0}", es);&lt;BR /&gt;
    }&lt;BR /&gt;
  }&lt;BR /&gt;
}&lt;BR /&gt;
[/code]</description>
      <pubDate>Sat, 24 Jun 2006 20:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678973#M81330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-24T20:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678974#M81331</link>
      <description>Hi Alexander, many thanks for the reply.&lt;BR /&gt;
I will test this wrapper and will here let you know if it worked.&lt;BR /&gt;
&lt;BR /&gt;
Gr Henk&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;ALEXANDER rivilis=""&gt; schreef in bericht &lt;BR /&gt;
news:5217888@discussion.autodesk.com...&lt;BR /&gt;
I do not know why that exception is generated (I has that error in AutoCAD &lt;BR /&gt;
2006 and 2007), but this wrapper can help you:&lt;BR /&gt;
[code]&lt;BR /&gt;
class Test&lt;BR /&gt;
{&lt;BR /&gt;
  class Wrapper&lt;BR /&gt;
  {&lt;BR /&gt;
    static int AcadVersion = &lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.Application.Version.Major;&lt;BR /&gt;
    // For AutoCAD 2006:&lt;BR /&gt;
    [System.Security.SuppressUnmanagedCodeSecurity]&lt;BR /&gt;
    [DllImport("acdb16.dll", CallingConvention = CallingConvention.Cdecl, &lt;BR /&gt;
CharSet = CharSet.Ansi,&lt;BR /&gt;
      EntryPoint = &lt;BR /&gt;
"?acdbLoadMlineStyleFile@@YA?AW4ErrorStatus@Acad@@PBD0@Z")]&lt;BR /&gt;
    extern private static ErrorStatus acdbLoadMlineStyleFile16(string &lt;BR /&gt;
mStyle, string mPath);&lt;BR /&gt;
    // For AutoCAD 2007:&lt;BR /&gt;
    [System.Security.SuppressUnmanagedCodeSecurity]&lt;BR /&gt;
    [DllImport("acdb17.dll", CallingConvention = CallingConvention.Cdecl, &lt;BR /&gt;
CharSet = CharSet.Unicode,&lt;BR /&gt;
      EntryPoint = &lt;BR /&gt;
"?acdbLoadMlineStyleFile@@YA?AW4ErrorStatus@Acad@@PB_W0@Z")]&lt;BR /&gt;
    extern private static ErrorStatus acdbLoadMlineStyleFile17(string &lt;BR /&gt;
mStyle, string mPath);&lt;BR /&gt;
    public static ErrorStatus acdbLoadMlineStyleFile(string mStyle, string &lt;BR /&gt;
mPath)&lt;BR /&gt;
    {&lt;BR /&gt;
      switch(AcadVersion)&lt;BR /&gt;
      {&lt;BR /&gt;
        case 16: return acdbLoadMlineStyleFile16(mStyle, mPath);&lt;BR /&gt;
        case 17: return acdbLoadMlineStyleFile17(mStyle, mPath);&lt;BR /&gt;
      }&lt;BR /&gt;
      return ErrorStatus.NotImplementedYet;&lt;BR /&gt;
    }&lt;BR /&gt;
  };&lt;BR /&gt;
&lt;BR /&gt;
  //&lt;BR /&gt;
  // For test only&lt;BR /&gt;
  //&lt;BR /&gt;
  [CommandMethod("T1")]&lt;BR /&gt;
  public static void T1()&lt;BR /&gt;
  {&lt;BR /&gt;
    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
    ErrorStatus es = Wrapper.acdbLoadMlineStyleFile("METAL", @"F:\Program &lt;BR /&gt;
Files\AutoCAD 2007\ran.mln");&lt;BR /&gt;
    if (es != ErrorStatus.OK)&lt;BR /&gt;
    {&lt;BR /&gt;
      ed.WriteMessage("\nError: {0}", es);&lt;BR /&gt;
    }&lt;BR /&gt;
  }&lt;BR /&gt;
}&lt;BR /&gt;
[/code]&lt;/ALEXANDER&gt;</description>
      <pubDate>Mon, 26 Jun 2006 19:18:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678974#M81331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-26T19:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678975#M81332</link>
      <description>&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; It is worked because I've tested it before posting.</description>
      <pubDate>Mon, 26 Jun 2006 19:54:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678975#M81332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-26T19:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading a Multiline style</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678976#M81333</link>
      <description>Hi Alexander,&lt;BR /&gt;
&lt;BR /&gt;
Sorry, for reasons I did'nt have time to implement this in my projects.&lt;BR /&gt;
But now I did, and you're right, it works very well. Thanks a lot! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Henk&lt;BR /&gt;
&lt;BR /&gt;
&lt;ALEXANDER rivilis=""&gt; schreef in bericht &lt;BR /&gt;
news:5219049@discussion.autodesk.com...&lt;BR /&gt;
:) It is worked because I've tested it before posting.&lt;/ALEXANDER&gt;</description>
      <pubDate>Wed, 17 Jan 2007 22:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-loading-a-multiline-style/m-p/1678976#M81333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-17T22:48:50Z</dc:date>
    </item>
  </channel>
</rss>

