|
POST
|
Don't create a new configuration profile. Instead, update the existing Debug and Release profiles to x86.
... View more
12-09-2010
04:11 AM
|
0
|
0
|
940
|
|
POST
|
The ArcGIS Desktop applications are built using ArcObjects. The Add Data command uses workspace factories, workspaces, feature classes, etc. when adding data to the map. Not having the data already in the map will affect performance because more time is needed to make the data connections. Other than that, it should work pretty much the same.
... View more
11-19-2010
06:55 AM
|
0
|
0
|
653
|
|
POST
|
Yes, use IWorkspaceFactory to open a workspace (IFeatureWorkspace). Use IFeatureWorkspace.OpenFeatureClass to open the datasource.
... View more
11-19-2010
04:40 AM
|
0
|
0
|
653
|
|
POST
|
There isn't any way to cancel the opening of the document. You could probably run code in the OpenDocument event to challenge with a login and if it fails load a blank document. Any solution you implement through code would need to have the code saved in the document and executed when that document is opened. Code written in C# or VB.NET would have to be installed, so any user who didn't have your extension installed would completely bypass the login. A better approach would probably be to use file permissions set through the OS. Just create a group that has permissions you want and add qualified users to that group. Then set the permissions on the document so that only that group (and maybe admins) can do anything with it.
... View more
11-17-2010
05:21 AM
|
0
|
0
|
239
|
|
POST
|
You need to set the document save flag by calling IDocumentDirty2.SetDirty.
... View more
11-17-2010
05:11 AM
|
0
|
0
|
319
|
|
POST
|
You've opened the table and created a new standalone table so all that's left is to add it to the map. To do that, get a reference to the map (IMap) and QI over to IStandaloneTableCollection. Call AddStandAloneTable and pass in your standalone table. Also, having the table in the map's table collection isn't necessary in order to perform a table join so if that's the only reason you're adding it then you may want to skip it altogether.
... View more
11-16-2010
09:30 AM
|
0
|
0
|
428
|
|
POST
|
IRasterSurface pRasterSurface = null; pRasterSurface.RasterBand = rasterBand; ISurface pSurface = pRasterSurface as ISurface; You're trying to assign a value (rasterBand) to a property on an object (pRasterSurface) that hasn't been instantiated. It's value is null so that's why you're getting that error. Also, where is rasterBand declared and where is it being set? What you should be doing is assigning the value returned by GetSurfaceFromLayer to pSurface: //IRasterSurface pRasterSurface = null; delete this //pRasterSurface.RasterBand = rasterBand; delete this ISurface pSurface = GetSurfaceFromLayer(rAlamoSurface); Get rid of pRasterSurface altogether. You'll also need to translate the GetSurfaceFromLayer method into C# and include it in your code project.
... View more
11-05-2010
01:56 PM
|
0
|
0
|
1108
|
|
POST
|
GetSurfaceFromLayer is not a method on ISurface; it is a function provided in the example that will return an ISurface reference given a layer name. Here is the same function translated to VB.NET. Pass in a reference to the raster layer and it will return the surface. ''' <summary>
''' Returns the surface from the layer with the specified name.
''' </summary>
''' <param name="layer">The layer whose surface will be returned</param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GetSurfaceFromLayer(ByVal layer As ILayer) As ISurface
' Get the actual surface from the layer.
If TypeOf layer Is ITinLayer Then
' QI
Dim tinLayer As ITinLayer = CType(layer, ITinLayer)
' Return surface from TIN layer.
Return CType(tinLayer.Dataset, ISurface)
ElseIf TypeOf layer Is IRasterLayer Then
' QI
Dim rasterLayer As IRasterLayer = CType(layer, IRasterLayer)
' Get surface from 3d extension on layer.
Dim layerExtensions As ILayerExtensions = CType(rasterLayer, ILayerExtensions)
For i As Integer = 0 To layerExtensions.ExtensionCount - 1
Dim dddProperties As I3DProperties = CType(layerExtensions.Extension(i), I3DProperties)
If Not dddProperties Is Nothing Then
If dddProperties.BaseOption = esriBaseOption.esriBaseSurface Then
If Not dddProperties.BaseSurface Is Nothing Then
Return CType(dddProperties.BaseSurface, ISurface)
End If
End If
Exit For
End If
Next i
' Get surface from raster band collection.
Dim rasterBandCollection As IRasterBandCollection = CType(rasterLayer.Raster, IRasterBandCollection)
Dim rasterBand As IRasterBand = rasterBandCollection.Item(0)
Dim rasterSurface As IRasterSurface = New RasterSurface
rasterSurface.RasterBand = rasterBand
Return CType(rasterSurface, ISurface)
Else
Return Nothing
End If
End Function
... View more
11-05-2010
12:35 PM
|
0
|
0
|
1236
|
|
POST
|
You don't need to use IRasterSurface at all. All you need is an ISurface reference so that you can call ISurface.GetElevation(). The example in the link above shows how to get the ISurface reference from the IRasterLayer reference.
... View more
11-05-2010
11:02 AM
|
0
|
0
|
1236
|
|
POST
|
The example link is at the bottom of the page: http://resources.esri.com/help/9.3/arcgisserver/apis/arcobjects/esrigeodatabase/ISurface_GetElevation.htm
... View more
11-05-2010
05:17 AM
|
0
|
0
|
1236
|
|
POST
|
I ran into the same thing. I can't imagine why ESRI did this. The good news is that creating your own custom filters is very simple. You just implement the IGxObjectFilter interface. Here's a class for a personal GDB filter: Imports ESRI.ArcGIS.Catalog
<ComClass(GxFilterPersonalGDB.ClassId, GxFilterPersonalGDB.InterfaceId, GxFilterPersonalGDB.EventsId)> _
Public Class GxFilterPersonalGDB
Implements IGxObjectFilter
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "cd8263cc-235c-435c-b1c2-030907db0349"
Public Const InterfaceId As String = "0029f6f3-0676-477d-8961-c514e2b59006"
Public Const EventsId As String = "d69cfde3-abaf-4b98-b8e3-c7c48dae7912"
#End Region
' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.
Public Sub New()
MyBase.New()
End Sub
Public Function CanChooseObject(ByVal [object] As ESRI.ArcGIS.Catalog.IGxObject, ByRef result As ESRI.ArcGIS.Catalog.esriDoubleClickResult) As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectFilter.CanChooseObject
If Not TypeOf [object] Is IGxDatabase2 Then Return False
Dim gxDatabase As IGxDatabase2 = DirectCast([object], IGxDatabase2)
Return gxDatabase.Workspace.PathName.EndsWith(".mdb", StringComparison.CurrentCultureIgnoreCase)
End Function
Public Function CanDisplayObject(ByVal [object] As ESRI.ArcGIS.Catalog.IGxObject) As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectFilter.CanDisplayObject
If TypeOf [object] Is IGxFolder Then Return True
If Not TypeOf [object] Is IGxDatabase2 Then Return False
Dim gxDatabase As IGxDatabase2 = DirectCast([object], IGxDatabase2)
Return gxDatabase.Workspace.PathName.EndsWith(".mdb", StringComparison.CurrentCultureIgnoreCase)
End Function
Public Function CanSaveObject(ByVal Location As ESRI.ArcGIS.Catalog.IGxObject, ByVal newObjectName As String, ByRef objectAlreadyExists As Boolean) As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectFilter.CanSaveObject
If Not TypeOf Location Is IGxDatabase2 Then Return False
Dim gxDatabase As IGxDatabase2 = DirectCast(Location, IGxDatabase2)
Return gxDatabase.Workspace.PathName.EndsWith(".mdb", StringComparison.CurrentCultureIgnoreCase)
End Function
Public ReadOnly Property Description() As String Implements ESRI.ArcGIS.Catalog.IGxObjectFilter.Description
Get
Return "Personal Geodatabases"
End Get
End Property
Public ReadOnly Property Name() As String Implements ESRI.ArcGIS.Catalog.IGxObjectFilter.Name
Get
Return "Personal Geodatabases"
End Get
End Property
End Class
... View more
11-04-2010
05:15 AM
|
0
|
0
|
1005
|
|
POST
|
Join the two tables together and run a query to select the records where the field in the old table does not equal the field in the new table. You should be able to do this in ArcMap without writing any code but you can do it through code if you want.
... View more
10-29-2010
11:42 AM
|
0
|
0
|
979
|
|
POST
|
Neil, Thanks for the reply. The processes the program does is merge several layers into one, create a new layer that buffers all the polygons in the merged layer and then does a spatial query between an area of concern layer with the merged layer as well as the buffered layer. Lastly, it gets lot information from Oracle tables, puts everything into an Access database and makes automatic exhibits for each polygon falling in an area of concern. I probably don't need ArcMap for some of the steps, but I'm pretty sure I need it for the spatial queries and exhibits. Carlos I'm not sure what you mean by exhibit but it's highly unlikely you need ArcMap. The IMapDocument interface allows you to open a document and access the map, the layout, the map layers, etc. You can make changes and save those changes.
... View more
10-28-2010
10:09 AM
|
0
|
0
|
1480
|
|
POST
|
If all you're doing is processing data then you don't need ArcMap at all. Just write a standalone program that accesses the data directly and does what it needs to do. If you need information from the map document, use IMapDocument to open it.
... View more
10-28-2010
09:09 AM
|
0
|
0
|
1480
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|