• ArcGIS Engine中如何设置内存缓存的大小


    ArcGIS 10中的三维效率不错,运行很快是需要做优化的,其中非常重要的一点就是内存缓存的设置。在ArcGLobe中通过GlobeOption我就可以弹出选项卡,通过页面来设置各个需要内存的分配比例。那么ArcGIS Engine自己写的程序又是如何进行内存分配呢?下面分享ArcGIS Engine设置Memory Cache的方法。

    Sub MemoryLimits()
      Dim pDoc As IGMxDocument: Set pDoc = ThisDocument
      Dim pScene As IScene: Set pScene = pDoc.Scene
      Dim pGlobe As IGlobe: Set pGlobe = pScene
      Dim pGP As IGlobeDisplay: Set pGP = pGlobe.GlobeDisplay
     
      Dim pOptions2 As IGlobeAdvancedOptions2: Set pOptions2 = pGP.AdvancedOptions
      Debug.Print "esriGlobeTileMemory:"
      Dim iLimit As Long, sglCurrent As Single
      Dim i As Integer, iTotal As Integer
      For i = 0 To 6
        pOptions2.GetTileMemory i, iLimit, sglCurrent
        Debug.Print ConvertI(i), iLimit, sglCurrent
    '    pOptions2.SetTileMemory i, iLimit + 10
    '    Debug.Print i, iLimit, sglCurrent
        iTotal = iTotal + iLimit
      Next i
      Debug.Print "Total Size of Memory Cache: ", iTotal
    End Sub

     

    Function ConvertI(i As Integer) As String
     
      Select Case i
        Case 0
          ConvertI = "Image"
        Case 1
          ConvertI = "Elevation"
        Case 2
          ConvertI = "Point"
        Case 3
          ConvertI = "Line"
        Case 4
          ConvertI = "3DGeom"
        Case 5
          ConvertI = "3DTexture"
        Case 6
          ConvertI = "Text"
      End Select

     

    End Function

     


    http://www.gisall.com/html/07/5607-3958.html
  • 相关阅读:
    测试随笔
    代码规范与计划
    WeChair项目Alpha冲刺(8/10)
    WeChair项目Alpha冲刺(7/10)
    WeChair项目Alpha冲刺(6/10)
    WeChair项目Alpha冲刺(5/10)
    WeChair项目Alpha冲刺(4/10)
    WeChair项目Alpha冲刺(3/10)
    WeChair项目Alpha冲刺(2/10)
    代码规范
  • 原文地址:https://www.cnblogs.com/gisoracle/p/2208004.html
Copyright © 2020-2023  润新知