Tag Info

Hot answers tagged

2

as written, the function returns a string with 'Nearby:' removed only if the 'Nearby:' test is true (if 'nearby:' exists within the field string. If the test is false, the function is set to 'pass', which returns no value (deleting the original value in the process) to remedy, a value should be passed for both cases - true and false - something like def ...


1

I haven't tested this but I don't there would be any problem. I suggest to simply test the code with two MessageBox: public class Tool1 : ESRI.ArcGIS.Desktop.AddIns.Tool { public Tool1() { } protected override void OnUpdate() { Enabled = ArcMap.Application != null; } protected override void OnMouseDown(MouseEventArgs ...


1

There is a much simpler way using a Dictionary object. To be accessible/updateable for each iteration it must be outside the scope of the function (global) otherwise it's reset for each calculation. preDict = {} def CalcField3(Field1,Field2): global preDict # tell python this isn't a new variable but the other one if preDict.has_key(Field2): # if ...


1

Your code won't work. You loop the cursor until it finishes. At that point pFeature is Nothing. After that you try to access the OID value of pFeature, which is Nothing. If you only select a single building or only want the first building OID of any selection set don't loop the cursor, just get rid of the cursor loop. Then you should make sure you got ...


1

I think SDE_OBJECT_ID might be data type LONG. Have you tried pFeature.OID.ToString(), or whatever the conversion method in VBA is? Not sure if it might fix the issue. Just an idea.


1

If you are importing that as a picture, then Export in JPEG. ArcGIS wants to recognize the features its exporting to PDF and layer, whereas JPEG is just an image. I've had that happen a bunch of times. You can change what font/format you use in Excel, but I don't know what a better option is, and that may help. Then it's up to you how you want to convert ...


1

In your code you have not specified the pathname to your shapefile correctly. Instead of: sFile = "E:\boundary\sample.shp" try: sFile = r"E:\boundary\sample.shp" This should make the 000732 error disappear.


1

Directly export to Excel file using the Table To Excel (Conversion) tool. No field name truncation and no formatting issue with numbers: Table To Excel (Conversion) Then you can easily export to a correct csv(txt) file from excel


1

I think you're trying to create is working with Geocoding in ArcGIS. Here is a video tha you can follow the instructions to do the geocoding in ArcGIS. But before that you need to parse your XML data to get just the address. You can do it using a simple code using Python (it's installed by default when you install ArcGIS). Is that make sense for you?


1

What you are identifying in your image is a ToolPalette not a Button or Menu. So use the AddIn Wizard to create your Buttons that you want to see in the ToolPalette then create the ToolPalette and add the buttons by their ID. Below is some demonstration code to get you going. <ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" ...


1

8.9 is the 98th percentile which QGIS computes by default for the rendering. If you change to min/max and press Load, QGIS computes 21.9, just like Arc.


1

A UTM projection uses eastings and northings with units of metres, which look like the ones you have shown. To get Latitude and Longitude, you need to reproject it. In the ArcToolbox: Data Management Tools > Projections and Transformations > Feature > Project And for the Output Coordinate System, choose: Geographic Coordinate Systems > World > WGS ...


1

According to the Help file image is not an attribute of a menu element. In fact I cannot think of any menu on the ArcMap interface that behaves in this manner, i.e. has an image instead of a word, despite being able to change it to an image via the customize mode. So it's not a property you can define in the config file. Now I may be wrong, others can ...


1

Assuming "Nearby:" is at the beginning of the line (and never in the middle), you can simplify this logic with a one-liner, without the need of a codeblock: str(!Street1!).replace('Nearby:', '').lstrip()



Only top voted, non community-wiki answers of a minimum length are eligible