<?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: Exception when loading a style file on the Symbology control in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627884#M16922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I've identified the problem. This seems to only happen when I run my app, and leave the designer open for the form where the symbology control is placed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2012 14:31:11 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2012-08-01T14:31:11Z</dc:date>
    <item>
      <title>Exception when loading a style file on the Symbology control</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627883#M16921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm getting a non-documented exception when calling ISymbologyControl.LoadStyleFile... Here's the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; layerSymbol.BeginInit();&amp;nbsp; layerSymbol.LoadStyleFile(System.IO.Path.Combine(styleInstallPath, "Styles\\ESRI.ServerStyle"));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where layerSymbol is of type ESRI.ArcGIS.Controls.AxSymbologyControl and the value of styleInstallPath comes from ESRI.ArcGIS.RuntimeManager.ActiveRuntime.Path and is "C:\\Program Files\\ArcGIS\\Engine10.1\\". I have confirmed that the file exists. Also, this error does not always happen, sometimes it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The exception is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) &amp;nbsp;&amp;nbsp; at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData) &amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Controls.ISymbologyControlDefault.LoadStyleFile(String fileName) &amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Controls.AxSymbologyControl.LoadStyleFile(String fileName)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any idea why this is happening?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;George Faraj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 14:02:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627883#M16921</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-08-01T14:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Exception when loading a style file on the Symbology control</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627884#M16922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I've identified the problem. This seems to only happen when I run my app, and leave the designer open for the form where the symbology control is placed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 14:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627884#M16922</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-08-01T14:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exception when loading a style file on the Symbology control</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627885#M16923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You might try making the style file R/O.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've had similar problems in ArcGIS Server with server style files.&amp;nbsp; Making the files R/O worked for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 22:02:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/exception-when-loading-a-style-file-on-the/m-p/627885#M16923</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2012-08-01T22:02:17Z</dc:date>
    </item>
  </channel>
</rss>

