|
POST
|
When you create a join in ArcMap, the join results in a table that is a combination of the two tables you've joined together. This table is used as the display source for the layer. If you want to add another join, then you need to join the table to the result of the first join. This will result in a table that is the combination of all 3 tables. You can do this by modifying your code to use the layer's display feature class instead of its feature class (IGeoFeatureLayer.DisplayFeatureClass). If a layer has joins, then the display feature class will be the result of those joins. Using it when joining a new table will keep all of the previous joins intact. Removing a join is much more complicated if the layer has multiple tables joined to it. You have to think of it as a chain of tables: layer feature class -> first joined table -> second joined table -> third joined table, etc. To remove a join you have to recreate all of the joins while leaving out the table you no longer want. You can do this by accessing the layer's RelQueryTable collection. This collection contains info about the tables that are joined to the layer. I don't have an example handy so you'll have to search for one. Basically, you would loop through the RelQueryTable collection and use each RelQueryTable to get the info you need to rejoin all of the tables. When you get to the table you want to remove, just skip it and go on to the next table in the collection.
... View more
10-12-2012
05:14 AM
|
0
|
0
|
1430
|
|
POST
|
All you need to do is overload the method to accept a default value that allows you to specify the value you want returned in cases where the database value is null. Public Shared Function DatabaseToDouble(ByVal value As Object, ByVal defaultValue As Double) As Double
If value Is DBNull.Value Then
Return defaultValue
Else
Return Convert.ToDouble(value)
End If
End Function
... View more
10-11-2012
06:02 AM
|
0
|
0
|
2364
|
|
POST
|
A simple solution to this problem is to create a class for reading and writing values to database fields. Put the class into a common code library that you can reference in all of your projects. This is how you might write a method on that class for reading doubles: Public Shared Function DatabaseToDouble(ByVal value As Object) As Double
If value Is DBNull.Value Then
Return 0
Else
Return Convert.ToDouble(value)
End If
End Function
Here's how you would call it: Dim d As Double = whateverYouNamedThatClass.DatabaseToDouble(feature.Value(fieldIndex)) You would add a method to the class for each data type you need (string, int, boolean, etc).
... View more
10-11-2012
05:24 AM
|
0
|
0
|
2364
|
|
POST
|
All you need to do is keep up with your own collection of maps. When a document is opened, load your collection from the document's maps collection. You "hide" a map by removing it from the document's maps collection. You "show" the map by adding the map from your collection back into the document's maps collection. When a document is closed, load all of the maps from your collection back into the document's collection so that the document remains unchanged.
... View more
10-11-2012
05:10 AM
|
0
|
0
|
1210
|
|
POST
|
What are your labels based on? For example, if you have labels turned on for a layer and your label field is set to "SomeField" then you will need to assign a value to "SomeField" when creating the feature. Otherwise, the field will be null and no label will be generated for that feature.
... View more
10-10-2012
05:49 AM
|
0
|
0
|
1641
|
|
POST
|
You can manage the maps that are in a document via IMxDocument.Maps.
... View more
10-10-2012
05:45 AM
|
0
|
0
|
1210
|
|
POST
|
If you want to replace the map on the second form with the map from the first form then you can use IObjectCopy to create a deep clone of the Map. If want to keep the map on the second form and simply add the elements from the other map to it, then you would need to loop through the elements in the first map and add them to the second map. You may need to use IObjectCopy to deep clone the elements and add the clones to the second map to avoid reference issues.
... View more
10-09-2012
09:16 AM
|
0
|
0
|
1198
|
|
POST
|
Call the FindField method on the feature class' Fields collection. If it returns -1 then the field doesn't exist.
... View more
10-04-2012
11:12 AM
|
0
|
0
|
1017
|
|
POST
|
That's pretty much what I said to do: Dim mapDocument As IMapDocument = New MapDocument
mapDocument.Open("C:\temp\myMap_v10.mxd")
DirectCast(mapDocument, IDocumentVersion).DocumentVersion = esriArcGISVersion.esriArcGISVersion93
mapDocument.SaveAs("C:\temp\myMap_v93.mxd")
mapDocument.Close()
... View more
10-03-2012
08:38 AM
|
0
|
0
|
934
|
|
POST
|
See the IConstructCircularArc interface for the built-in ArcObjects methods.
... View more
10-01-2012
01:18 PM
|
0
|
0
|
570
|
|
POST
|
Without knowing what your original coordinate system and coordinates are I can't tell you if those values are correct or not. The results you're getting will be in decimal degrees since you are projecting into a geographic coordinate system. Remember that when expressed as x, y coordinates of a point that x = longitude and y = latitude. Longitude values range from 0 to 180 with positive values being measured East and negative values being measured West. Latitude values range from 0 to 90 with positive values being measured North and negative values being measured South. The coordinates you posted are near Vancouver, Canada.
... View more
09-25-2012
11:20 AM
|
0
|
0
|
2223
|
|
POST
|
I would suggest using the debugger to see exactly what that code_block string looks like. "text = """ This is setting text to a single double quote - is that what you want? Also, the other text assignments should probably be enclosing the string values in double quotes. Since double quotes are special characters, you'll need to use escape characters in order to insert a literal double quote into the string.
... View more
09-25-2012
06:26 AM
|
0
|
0
|
1058
|
|
POST
|
You can get the extent of the feature class from IGeoDataset.Extent. See the developer help for more info on what the envelope it returns actually is.
... View more
09-25-2012
06:22 AM
|
0
|
0
|
692
|
|
POST
|
You need to project the data to that coordinate system. The map x, y passed into the event are in whatever coordinate system the map is in, so just create a new point object, give it the same spatial reference as the map and set the x, y properties. Then call Project and pass in the spatial reference you want to project it to. You can get this spatial reference object from ISpatialReferenceFactory.CreateGeographicCoordinateSystem. After calling Project, the x, y properties will have the updated coordinates.
... View more
09-25-2012
05:46 AM
|
0
|
0
|
2223
|
| 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
|