|
POST
|
This is how it works for me [ATTACH=CONFIG]18659[/ATTACH]
... View more
10-23-2012
10:05 AM
|
0
|
0
|
4049
|
|
POST
|
You code was missing a parenthesis. This code works with a numeric field with decimals
Function FindLabel ( [LOCID] , [Silica] )
if ( [Silica] > 0) then
FindLabel =[Silica]
end if
End Function
... View more
10-23-2012
09:41 AM
|
0
|
0
|
4049
|
|
POST
|
He just needed to project the point into Web Mercator, as asked in another thread.
... View more
10-22-2012
11:15 AM
|
0
|
0
|
2277
|
|
POST
|
What projection is your application? If it's in Web Mercator, you'll have to project that point to that projection, like in the following: private function onMapClick(event:MapMouseEvent):void{ var coordstring:String = "38.0594, 81.1121"; var coords:Array = coordstring.split(","); var mappoint1:MapPoint = new MapPoint(coords[0],coords[1],wgs); var mappoint2:Geometry = WebMercatorUtil.geographicToWebMercator(mappoint1); var g:Graphic = new Graphic(); g.geometry = mappoint2; grLayer.add(g); }
... View more
10-22-2012
07:47 AM
|
0
|
0
|
917
|
|
POST
|
To set the IMapFrame::Border, you have to provide an IBorder. You can set the properties of the IBorder using the ISymbolBorder. Take a look at some examples of how to do that.
... View more
10-10-2012
05:39 AM
|
0
|
0
|
899
|
|
POST
|
Are you projecting the area of the returned polygon into something other than Web Mercator? If not, be aware that the measuring distances and areas in Web Mercator will likely give you incorrect results. Please see this blog posting on the subject.
... View more
10-05-2012
05:46 AM
|
0
|
0
|
847
|
|
POST
|
You should mark your own post as the answer. It makes it easier for someone looking for the correct answer to find your post. When doing a search, you're returned a list of threads, with the answered ones marked by a green "A". Wouldn't you look at those threads first?
... View more
10-04-2012
11:20 AM
|
0
|
0
|
1101
|
|
POST
|
Use IFeatureClass::FindField to check if a field exists. If it returns -1, the field isn't in the feature class.
if (f.findfield(name) == -1)
return;
... View more
10-04-2012
11:11 AM
|
0
|
0
|
952
|
|
POST
|
What are some of the extras that you'd like to include in your extension?
... View more
10-04-2012
07:54 AM
|
0
|
0
|
1797
|
|
POST
|
If this has answered your question, please click the check to mark the thread as answered. You have asked many questions on the forums, but have failed to mark any of them as answered. If you have questions about how to do this, please see these instructions.
... View more
10-03-2012
05:01 AM
|
0
|
0
|
1142
|
|
POST
|
Are you trying to add this as a reference to your project? If so, you can't add the Geoprocessing references by using "Add ArcGIS Reference". Instead, use "Add Reference" and select the .NET tab. You should find the ConversionTool reference in there.
... View more
10-02-2012
06:37 AM
|
0
|
0
|
1142
|
|
POST
|
I ran this code and got a message box with the coordinates 15, 6.66666666666667
Private Sub GeometryTest()
Dim pGeometry As ESRI.ArcGIS.Geometry.IGeometry5
Dim pPointColl As ESRI.ArcGIS.Geometry.IPointCollection
Dim pt As ESRI.ArcGIS.Geometry.IPoint
Dim pTopo As ESRI.ArcGIS.Geometry.ITopologicalOperator
Try
pPointColl = New ESRI.ArcGIS.Geometry.Polyline
pt = New ESRI.ArcGIS.Geometry.Point
pt.PutCoords(10, 0)
pt.Z = 1
pt.ID = 1
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(10, 10)
pt.Z = 0
pt.ID = 2
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(20, 10)
pt.Z = 0
pt.ID = 3
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(20, 0)
pt.Z = 0
pt.ID = 4
pPointColl.AddPoint(pt)
TryCast(pPointColl, ESRI.ArcGIS.Geometry.IPolyline).SpatialReference = DefineWGS84GeoCoordsys()
TryCast(pPointColl, ESRI.ArcGIS.Geometry.IZAware).ZAware = True
pTopo = DirectCast(pPointColl, ESRI.ArcGIS.Geometry.ITopologicalOperator)
pTopo.Simplify()
pGeometry = DirectCast(pPointColl, ESRI.ArcGIS.Geometry.IGeometry5)
Dim centroid As ESRI.ArcGIS.Geometry.IPoint
centroid = pGeometry.CentroidEx
MsgBox(centroid.X & ", " & centroid.Y)
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString)
End Try
End Sub
Public Function DefineWGS84GeoCoordsys() As ESRI.ArcGIS.Geometry.IGeographicCoordinateSystem2
Dim spatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory2 = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment
' Create WGS84 Geographic Coordinate System - esriSRGeoCS_WGS1984 - 'GCS_WGS_1984'.
Dim pGeoCoordSys As ESRI.ArcGIS.Geometry.IGeographicCoordinateSystem2 = DirectCast(spatRefFact.CreateGeographicCoordinateSystem(CInt(ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_WGS1984)), ESRI.ArcGIS.Geometry.IGeographicCoordinateSystem2)
' Set the domain extents for the new dataset
' You can use either the Domain or the FalseOriginAndUnits methods
' (note that the xy domain must be square).
pGeoCoordSys.SetFalseOriginAndUnits(-180, -90, 1000000)
pGeoCoordSys.SetMFalseOriginAndUnits(1, 1)
pGeoCoordSys.SetZFalseOriginAndUnits(1, 1)
Return pGeoCoordSys
End Function
... View more
09-28-2012
05:55 AM
|
0
|
0
|
2426
|
|
POST
|
I ran this version of the code in both 10.0 and 10.1 and it works properly. [ATTACH=CONFIG]18058[/ATTACH]
Private Sub GeometryTest()
Dim pGeometry As ESRI.ArcGIS.Geometry.IGeometry5
Dim pPointColl As ESRI.ArcGIS.Geometry.IPointCollection
Dim pt As ESRI.ArcGIS.Geometry.IPoint
Dim pTopo As ESRI.ArcGIS.Geometry.ITopologicalOperator
Try
pPointColl = New ESRI.ArcGIS.Geometry.Polyline
pt = New ESRI.ArcGIS.Geometry.Point
pt.PutCoords(10, 0)
pt.Z = 1
pt.ID = 1
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(10, 10)
pt.Z = 0
pt.ID = 2
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(20, 10)
pt.Z = 0
pt.ID = 3
pPointColl.AddPoint(pt)
pt = New ESRI.ArcGIS.Geometry.Point()
pt.PutCoords(20, 0)
pt.Z = 0
pt.ID = 4
pPointColl.AddPoint(pt)
'TryCast(pPointColl, ESRI.ArcGIS.Geometry.IPolyline).SpatialReference = MyCodeLib.DefaultSpatialReference()
'TryCast(pPointColl, IZAware).ZAware = True
pTopo = DirectCast(pPointColl, ESRI.ArcGIS.Geometry.ITopologicalOperator)
pTopo.Simplify()
pGeometry = DirectCast(pPointColl, ESRI.ArcGIS.Geometry.IGeometry5)
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString)
End Try
End Sub
... View more
09-27-2012
01:55 PM
|
0
|
0
|
2426
|
|
POST
|
When you click on New Item, make sure you select the Add-in Command Container instead of Add-in Component. [ATTACH=CONFIG]18003[/ATTACH]
... View more
09-26-2012
07:57 AM
|
0
|
0
|
3190
|
|
POST
|
Glad to help. Please click the check mark to show the question was answered.
... View more
09-20-2012
05:52 AM
|
0
|
0
|
755
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|