POST
|
Hi Mark, In the code you posted, the text you are changing is the IFormattedTextSymbol.Text property. This isn't the string being used by the snapping feedback. As far as I know, this property is just used internally by the ISymbol to apply formatting. In fact, there's no straightforward way to replace the tip with a custom text. The only way I know is writing an interface which inherits ISnappingFeedback and dealing manually with the Update and Refresh to draw your custom text. By the way, the string used in the feedback is the one at ISnappingResult.Description. Good luck on your customization.
... View more
07-27-2015
03:47 AM
|
0
|
0
|
360
|
POST
|
Hi again Akshay, When you call FillCache method in ISpatialCacheManager, you must specify the extent of the cache as a parameter. You can pass any extent you want. It could be the visible extent, which can be obtained via IActiveView.Extent at ArcObjects Help for .NET developers. Or could be the map's area of interest (IMap.AreaOfInterest at ArcObjects Help for .NET developers) Or whichever IEnvelope you create. Hope this will be of help. Good luck.
... View more
05-27-2015
12:34 AM
|
0
|
0
|
3411
|
POST
|
You could try using a spatial cache. This should take the data from the geodatabase and put it in memory, thus having a faster access since the queries won't be doing roundtrips to the file system. Take a look at: ISpatialCacheManager at ArcObjects Help for .NET developers
... View more
05-13-2015
12:32 AM
|
1
|
2
|
2841
|
POST
|
If you are using the SpatialFilter object via the ISpatialFilter interface, you will need to define your own SpatialRelDescription, since the SpatialRel enumeration doesn't have the relationship you need. You can query the features that doesn't intersect the query geometry setting the SpatialRel property to esriSpatialRelRelation and SpatialRelDescription property to "FF*FF****" More information at: SpatialRelDescription on ArcObjects 10 .NET SDK Help
... View more
05-08-2015
04:00 AM
|
1
|
5
|
2841
|
POST
|
Uh... that's a better and more elegant solution indeed, Ken.
... View more
04-14-2015
06:04 AM
|
0
|
0
|
2095
|
POST
|
Try following these steps: - Obtain the IFeatureClass corresponding to the feature class you are working with, and get the access to its SHAPE attribute Dim featureClass as IFeatureClass = (whatever) Dim shapeIndex as Integer = featureClass.FindField(featureClass.ShapeFieldName) DIm shapeField as IField = featureClass.Fields.Field(shapeIndex) - Get the spatial reference from the field's Geometry Definition Dim spatialRef as ISpatialReference = shapeField.GeometryDef.SpatialReference ... and that's it. Don't know if there's another way to deal with this, but at least this method works
... View more
04-14-2015
05:18 AM
|
1
|
0
|
2095
|
POST
|
I can give you only one advice then: Just make sure that there are no shared ArcObjects objects across the threads. Ideally you should pass a string with the path of the workspace and create all the necessary objects inside the thread. For further info, when I've dealt with threading and ArcObjects, i've used System.Threading.Thread in STA apartment state. Good luck!
... View more
11-10-2014
02:49 AM
|
0
|
0
|
1170
|
POST
|
Did you already take a look at this article?: ArcObjects 10 .NET SDK Help
... View more
11-10-2014
01:04 AM
|
1
|
0
|
1170
|
POST
|
Ok, i'll just modify your code replacing IGroupLayer for ICompositeLayer. Not my type of solution but I guess it'll do the job... IMap myMap = ArcMap.Document.ActivatedView.FocusMap; for (int i = 0; i < myMap.LayerCount; i++) { if (myMap.Layer is ICompositeLayer) { ICompositeLayer igroup = myMap.Layer as ICompositeLayer; for (int j = 0; j < igroup.Count; j++) { IFeatureLayer ilayer = igroup.Layer(j) as IFeatureLayer; // Do whatever you need. } } } Does it works for you now?
... View more
07-16-2014
05:59 AM
|
0
|
1
|
1335
|
POST
|
Two methods are available (as far as I know) to get a particular layer from the ToC. 1.- Traversing the Layer collection obtained from a Map instance 2.- Iterating the enumerator Layers obtained from a Map instance The first, the one that you are showing on your code, forces you to deal with group layers. This is usually solved by using a recursive function. If you are only interested on Feature layers, I would advise to face the problem busing the second option. I'll give you a sample code in vb.net (which you should be able to translate to C# in a breeze)
Dim enumLayer As IEnumLayer
Dim uidGeo As UID = New UIDClass()
// GUID for IGeoFeatureLayer
uidGeo.Value = "{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}"
// Request IGeoFeatureLayers recursing into group layers
enumLayer = FocusMap.Layers(uidGeo, True)
enumLayer.Reset()
// You will need a cast into IFeatureLayer here, since the enumLayer.Next returns a ILayer interface
Dim featureLayer as IFeatureLayer = enumLayer.Next
While featureLayer IsNot Nothing
// Do whatever you need...
// Next feature layer...
featureLayer = enumLayer.Next()
End While
Hope this works for you. PS: Group layers are better dealt with by using the ICompositeLayer interface, which will provide you with access to its contained layers. So instead of using the IGroupLayer, you should use the ICompositeLayer... in case you didn't like the solution I provided
... View more
07-16-2014
05:31 AM
|
0
|
3
|
1335
|
POST
|
In order to support the tools I would say you only need the 10.0 .NET libraries in order to compile them. Try following these steps: Copy the "ArcGIS\DeveloperKit10.0\DotNet" folder to your development machine. On the projects that you would like to be 10.0 compatible, remove all existing ESRI references and then replace them with the 10.0 ones via "Add reference" and selecting the equivalent libraries from 10.0 folder using the "Examine" tab. Compile and you should be done. Your tools are now 10.0 compatible, unless you are using any 10.1 new interfaces. Hope this solution works for you. Regards, Javi
... View more
09-30-2012
11:45 PM
|
0
|
0
|
273
|
Title | Kudos | Posted |
---|---|---|
1 | 04-14-2015 05:18 AM | |
1 | 11-10-2014 01:04 AM | |
1 | 05-13-2015 12:32 AM | |
1 | 05-08-2015 04:00 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|