<?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 Access Violation when creating MOLE Symbology in ArcGlobe 10.1 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-violation-when-creating-mole-symbology-in/m-p/706846#M18907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Transitioning from 10.0 to 10.1 and creating MOLE symbology in ArcGlobe - the application crashes at the following line of code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
Globe.AddLayerType(graphicsLayer.GlobeGraphicsLayer as ILayer , esriGlobeLayerType.esriGlobeLayerTypeUnknown, false);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Leading up to this I do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a custom class called 3DDataLayer which has the following properties:&amp;nbsp; IForceElementLayer (named MoleLayer) , IGlobeGraphicsLayer (named GlobeGraphicsLayer) and other properties that aren't relevant.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first thing I do is create a workspace by doing the following&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
IFeatureWorkspace featureWorkspace;

myWorkspace = myWorkspaceFactory.CreateNewScratchWorkspace();
featureWorkspace = myWorkspace as IFeatureWorkspace;

myFields = new FieldsClass();
//... // Setting my field names and alianses and properties
featureWorkspace.CreateFeatureClass(inName, myFields,&amp;nbsp; null&amp;nbsp; , null , esriFeatureType.esriFTSimple , "Shape" , String.Empty);


//Create a mole layer

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I create the mole layer as follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
IFeatureClass featureClass = LoadFeatureClass(inName);

IGeofeatureLayer featureLayer = new FeatureLayer() as IGeofeatureLayer;
featureLayer.FeatureClass = featureClass;

ICachedGraphicFeatureLayer moleLayer = new ForceElementLayer() as ICachedGraphicFeatureLayer;
moleLayer.FeatureLayer = featureLayer;

//Set properties such as size / 3d settings / 

ILayer layer = moleLayer as ILayer;
layer.Name = inName;

Globe.AddLayerType(layer , esriGlobeLayerType.esriGlobeLayerTypeDraped, false);
myMoleFeatureClass = featureClass;

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this is blowing up?&amp;nbsp; I need this so I can turn on Military Symbology based upon certain trigger conditions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2012 19:44:18 GMT</pubDate>
    <dc:creator>BryanKardisco</dc:creator>
    <dc:date>2012-08-07T19:44:18Z</dc:date>
    <item>
      <title>Access Violation when creating MOLE Symbology in ArcGlobe 10.1</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-violation-when-creating-mole-symbology-in/m-p/706846#M18907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Transitioning from 10.0 to 10.1 and creating MOLE symbology in ArcGlobe - the application crashes at the following line of code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
Globe.AddLayerType(graphicsLayer.GlobeGraphicsLayer as ILayer , esriGlobeLayerType.esriGlobeLayerTypeUnknown, false);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Leading up to this I do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a custom class called 3DDataLayer which has the following properties:&amp;nbsp; IForceElementLayer (named MoleLayer) , IGlobeGraphicsLayer (named GlobeGraphicsLayer) and other properties that aren't relevant.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first thing I do is create a workspace by doing the following&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
IFeatureWorkspace featureWorkspace;

myWorkspace = myWorkspaceFactory.CreateNewScratchWorkspace();
featureWorkspace = myWorkspace as IFeatureWorkspace;

myFields = new FieldsClass();
//... // Setting my field names and alianses and properties
featureWorkspace.CreateFeatureClass(inName, myFields,&amp;nbsp; null&amp;nbsp; , null , esriFeatureType.esriFTSimple , "Shape" , String.Empty);


//Create a mole layer

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I create the mole layer as follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
IFeatureClass featureClass = LoadFeatureClass(inName);

IGeofeatureLayer featureLayer = new FeatureLayer() as IGeofeatureLayer;
featureLayer.FeatureClass = featureClass;

ICachedGraphicFeatureLayer moleLayer = new ForceElementLayer() as ICachedGraphicFeatureLayer;
moleLayer.FeatureLayer = featureLayer;

//Set properties such as size / 3d settings / 

ILayer layer = moleLayer as ILayer;
layer.Name = inName;

Globe.AddLayerType(layer , esriGlobeLayerType.esriGlobeLayerTypeDraped, false);
myMoleFeatureClass = featureClass;

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this is blowing up?&amp;nbsp; I need this so I can turn on Military Symbology based upon certain trigger conditions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 19:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-violation-when-creating-mole-symbology-in/m-p/706846#M18907</guid>
      <dc:creator>BryanKardisco</dc:creator>
      <dc:date>2012-08-07T19:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Access Violation when creating MOLE Symbology in ArcGlobe 10.1</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-violation-when-creating-mole-symbology-in/m-p/706847#M18908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After looking online a bit it looks like the issue is resolving from loading a Feature Class from an existing GeoDatabase (GDB).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this something others have seen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need this ability to create MOLE Symbology and be able to switch back between MOLE Symbology and generic graphics that I draw when not enabling said symbology.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 14:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-violation-when-creating-mole-symbology-in/m-p/706847#M18908</guid>
      <dc:creator>BryanKardisco</dc:creator>
      <dc:date>2012-08-08T14:09:09Z</dc:date>
    </item>
  </channel>
</rss>

