|
POST
|
I created a ModelBuilder. In the last step, a feature class is generated. I applied the Apply Symbology from Layer tool to this layer by importing a symbology layer file. In manually setting up the layer's symbology, there are 2 steps: 1) Import the lyr file, and 2) Set the Value field. However, when I used the Apply Symbology from Layer tool, there is NO 2nd step for setting the Value field. As the result, the feature layer's sybmolgy still picks up teh default, rather than the lyr file defined. Is it possible to add a parameter/variable to solve this problem? If yes, could you help me How-To-Do? Thanks.
... View more
10-28-2014
12:25 PM
|
0
|
1
|
3926
|
|
POST
|
by adding the following, the problem was gone. Thanks. Set pCurve = pFeature.Shape Dim mAware As IMAware Set mAware = pCurve mAware.mAware = True ... Dim seg As IMSegmentation3
... View more
10-27-2014
11:05 AM
|
0
|
0
|
1120
|
|
POST
|
I revised the code like that below, but got error at the highlighted line: The geometry is not M-aware. Appreciate if you can help this issue - How to make the IMSegmentatione object as M-awared. Sub CheckSegments() Dim pDoc As IMxDocument Set pDoc = ThisDocument Dim pMaps As IMaps Set pMaps = pDoc.Maps Dim pMap As IMap Set pMap = pMaps.Item(0) Dim pLayer As ILayer Dim pFLayer As IFeatureLayer Dim sFCName As String sFCName = "GIS_RAIL_TRK_SEG_LIN" Dim i As Integer For i = 0 To pMap.LayerCount - 1 If pMap.Layer(i).Name = sFCName Then Set pLayer = pMap.Layer(i) If TypeOf pLayer Is IFeatureLayer Then Set pFLayer = pLayer Exit For End If End If Next i Dim pFClass As IFeatureClass Set pFClass = pFLayer.FeatureClass Dim pQFilter As IQueryFilter Set pQFilter = New QueryFilter pQFilter.WhereClause = "[TRACK_TYPE] LIKE 'MAIN TRACK'" Dim pFCursor As IFeatureCursor Set pFCursor = pFClass.Search(pQFilter, False) Dim pCurve As ICurve, pFeature As IFeature Set pFeature = pFCursor.NextFeature Do Until pFeature Is Nothing If pFLayer.FeatureClass.ShapeType = esriGeometryPolyline Then ' esriGeometryPolyline-3 esriGeometryLine-13 Set pCurve = pFeature.Shape Set pFeature.Shape = pCurve Dim seg As IMSegmentation3 Set seg = pFeature.Shape 'pCurve If seg.MMonotonic <> esriMMonotonicEnum.esriMNotMonotonic Then Debug.Print End If End If Set pFeature = pFCursor.NextFeature Loop End Sub
... View more
10-27-2014
10:47 AM
|
0
|
1
|
1120
|
|
POST
|
Referring to the code at ' http://stackoverflow.com/questions/9212398/how-to-determine-whether-a-geometry-is-multi-part static bool IsMultiPart(this IGeometry geometry) { var geometryCollection = geometry as IGeometryCollection; return geometryCollection != null && geometryCollection.GeometryCount > 1; } I wrote a piece of VBA as below, but got a compiling error (Sub or Function not defined) at the line as highlighted below. What's wrong in this piece of code? Appreciate if you can point out. Function IsMultiPart(geo As IGeometry) Dim b As Boolean Dim geometryCollection As IGeometryCollection Set geometryCollection = CType(geo, IGeometryCollection) If geometryCollection <> Null And geometryCollection.GeometryCount > 1 Then b = True Else b = False End If IsMultiPart = b End Function
... View more
10-27-2014
08:07 AM
|
0
|
2
|
3737
|
|
POST
|
I created a new .mxd and then loaded FC. Then I can do the Geometry Calculation as normal. Unknown why got problem this morning. Thanks for your reviewing.
... View more
10-02-2014
08:54 AM
|
0
|
1
|
1206
|
|
POST
|
I used to do geometry calculations using the Calculate Geometry Tool. But, it losses the function suddenly today. The popup image is below. I re-started my CPU but the problem still exists. What's the possible solution for it? Thanks.
... View more
10-02-2014
07:28 AM
|
0
|
5
|
4899
|
|
POST
|
Thanks. Will follow the new format style. I debugged and also monitored the results using Fiddle2. The results are ALL in '200', which mean no HTTP error. Even though, the map zooms corrected into the area at the desired extend, however, the symbol is still not displayed.
... View more
07-28-2014
08:44 AM
|
0
|
0
|
840
|
|
POST
|
I have a couple of JS applications that used to work very well. After several months, I re-run them again and got problems in adding symbols on the map. The related code is below: function drawResponseGeometries2(response) { map.graphics.clear(); // clear graphicsLayer if exists var pointJson = response.Geometry[0]; var point = new esri.geometry.Point(pointJson); var symbol = new esri.symbol.SimpleMarkerSymbol({ "color": [255, 0, 0, 128], "size": 10, "angle": -30, "xoffset": 0, "yoffset": 0, "type": "esriSMS", "style": "esriSLSSolid", "outline": { "color": [0, 0, 0, 255], "width": 1, "type": "esriSLS", "style": "esriSLSSolid" } }); var g = new esri.Graphic(point, symbol); map.setExtent(initialExtent.expand(0.125)); map.graphics.add(g); map.centerAt(point); } When I run debugger, I could not detect anything wrong. How can this program be debugged? Appreciate if you can share your experience. Remark: The new format of this forum looks to be not good at all.
... View more
07-28-2014
06:31 AM
|
0
|
3
|
1268
|
|
POST
|
Using the procedure posted, I eventually got 100% match (including only a few tied) for the source data with near 3000 record. The error does show any more.
... View more
06-25-2014
06:54 AM
|
0
|
0
|
817
|
|
POST
|
I got the same message. The error is really hard to detect. I used the procedure below to go through my geocoding process: 1) Break the table in several parts (by definition-query). 2) Geocode against the table. 3) If find unmatched, check both the source table and the data table, and make sure the data in the data table match the key field values. 4) After geocoding all of the data, merge the geocoding results as one file.
... View more
06-24-2014
10:49 AM
|
0
|
0
|
1540
|
|
POST
|
Robby: Very Helpful!!! I will borrow the idea you provided. Thanks a lot!!
... View more
06-23-2014
09:53 AM
|
0
|
0
|
626
|
|
POST
|
In a SOE application, I have retrieve all of points broken from a polyline M if it is a single part segment. If a segment contains multiple parts, how to retrieve the parts as well as the points using ArcObjects? Thanks if you can share your experience.
... View more
06-23-2014
08:41 AM
|
0
|
2
|
811
|
|
POST
|
An error in my posted thread: 0: After entering a valid place name, a point, rather than a polyline, flashes on the map.
... View more
06-23-2014
06:58 AM
|
0
|
0
|
817
|
|
POST
|
A couple of errors in my posted threads: 0 and 1: 1) After entering a valid place name, a point, rather than a polyline, flashes on the map. 2) The Geocode Address tool works and a result table can be generated. For each valid place name, its center point's X and Y values are populated in the result table and also displays on the map. 3) The Display Route Event tool functions differently from Geocode Address tool.
... View more
06-23-2014
06:02 AM
|
0
|
0
|
817
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-18-2023 10:02 AM | |
| 3 | 07-14-2023 12:29 PM | |
| 1 | 04-02-2021 12:16 PM | |
| 1 | 07-24-2017 11:31 AM | |
| 1 | 04-04-2016 03:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-01-2025
11:58 AM
|