title: How to access the values of a dictionary property in a grid using Ocean for Petrel？
body: <p>I'm tring to access the values of a dictionary property in a grid,such as Fluvial facies or lithologies etc.I have read the coursebook and help docs, but didn't find anything relevant.The coursebook only has examples of creating properties, but not accessing properties.Below is the code I tried:</p>
  <pre><code>Grid grid = arguments.Input_Grid;
  if (grid == null)
  {
      PetrelLogger.ErrorStatus(&quot;HelloGrid: Arguments cannot be empty.&quot;);
      return;
  }
  Index3 currentCell = new Index3();
  int maxI = grid.NumCellsIJK.I;
  int maxJ = grid.NumCellsIJK.J;
  int maxK = grid.NumCellsIJK.K;
  for (int i = 0; i &lt; maxI; i++)
  {
      for (int j = 0; j &lt; maxJ; j++)
      {
          for (int k = 0; k &lt; maxK; k++)
          {                            
               currentCell.I = i; currentCell.J = j; currentCell.K = k;                 
               if (grid.IsCellDefined(currentCell) &amp;&amp; grid.HasCellVolume(currentCell))
               {                         
                   //DictionaryProperty p =  ???
                   //int val = p[currentCell] ???
               }
           }
       }
   }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/JTc6g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JTc6g.png" alt="enter image description here" /></a></p>