POST
|
I want to list Tables (Itables) in a form with ArcObjects, but I can't it. I'm using this code. Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Dim pTableCollection As ITableCollection Dim pMap As IMap Set pMap = pMxDoc.FocusMap Set pTableCollection = pMap Dim tabla As ITable Dim ptabla As IFeatureLayer Dim ntabla As String For i = 0 To pTableCollection.TableCount - 1 Set tabla = pTableCollection.Table(i) 'Dim pName As IName ntabla = tabla. '********* I can't get name of table lista.AddItem (ntabla) Next
... View more
06-14-2011
03:01 PM
|
0
|
1
|
2575
|
POST
|
How can I save table? I'm using this code Dim pMxDocument As IMxDocument Dim pMap As IMap Dim pZoneRL As IRasterLayer Dim pZoneRaster As IRaster Dim pValueRL As IRasterLayer Dim pValueRaster As IRaster Set pMxDocument = Application.Document Set pMap = pMxDocument.FocusMap Set pValueRL = pMap.Layer(0) Set pValueRaster = pValueRL.Raster Set pZoneRL = pMap.Layer(1) Set pZoneRaster = pZoneRL.Raster Dim pOutputTable As ITable Set pOutputTable = pZonalOp.ZonalStatisticsAsTable(pZoneRaster, pValueRaster, True) Dim pTableCollection As ITableCollection Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Set pTableCollection = pMap Dim pFWS As IFeatureWorkspace Dim pWorkspaceFactory As IWorkspaceFactory Set pWorkspaceFactory = New ShapefileWorkspaceFactory Set pFWS = pWorkspaceFactory.OpenFromFile("C:\TEMP\ZONAL", 0) Name="salida" Dim tablasal As ITable Set tablasal = pFWS.CreateTable(Name, pOutputTable.Fields, Nothing, Nothing, 0) I need to save pOutputTable or copy rows from pOutputTable to tablasal.
... View more
06-12-2011
06:06 PM
|
0
|
0
|
257
|
POST
|
How can I save table? I'm using this code Dim pMxDocument As IMxDocument Dim pMap As IMap Dim pZoneRL As IRasterLayer Dim pZoneRaster As IRaster Dim pValueRL As IRasterLayer Dim pValueRaster As IRaster Set pMxDocument = Application.Document Set pMap = pMxDocument.FocusMap Set pValueRL = pMap.Layer(0) Set pValueRaster = pValueRL.Raster Set pZoneRL = pMap.Layer(1) Set pZoneRaster = pZoneRL.Raster Dim pOutputTable As ITable Set pOutputTable = pZonalOp.ZonalStatisticsAsTable(pZoneRaster, pValueRaster, True) Dim pTableCollection As ITableCollection Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Set pTableCollection = pMap Dim pFWS As IFeatureWorkspace Dim pWorkspaceFactory As IWorkspaceFactory Set pWorkspaceFactory = New ShapefileWorkspaceFactory Set pFWS = pWorkspaceFactory.OpenFromFile("C:\TEMP\ZONAL", 0) Name="salida" Dim tablasal As ITable Set tablasal = pFWS.CreateTable(Name, pOutputTable.Fields, Nothing, Nothing, 0) I need to save pOutputTable or copy rows from pOutputTable to tablasal.
... View more
06-12-2011
04:07 PM
|
0
|
0
|
691
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|