Tag Info

New answers tagged

0

Per my comment. You are looping through and checking the layer.name property against the file paths declared in your #local variables section and added to your names list. The 2 options I can see to fix your code as-is are, Wrap RI_Schools & RI_Sewers in quotes, e.g. names = ["RI_Schools", "RI_Sewers"] or Use the layer.dataSource property (more info) ...


0

I don't program in C# so may be what I am going to suggest is actually valid syntax for c#? I think the problem is this line: if (mxdoc.SelectedLayer == layer) If VB .net one would not compare two layer objects this way. If this was me using VB I would have done it this way: if mxdoc.SelectLayer.Name = layer.Name then msgbox "same!" end if


0

On first glance I would recommend that after toggling the layer visibility to False and refreshing...that you the save the mxd before exporting. Either use the save() method or the saveACopy method on the MapDocument object. Consider also trying the RemoveLayer function as an alternative. You likely need to save after this operation as well before ...


1

I'll assume that you are trying to do this on two polygons in the same feature class of a geodatabase. I tested using a file geodatabase but other flavours should work fine too. Shapefiles will not have their areas updated automatically but geodatabase feature classes do. What you want to do is easy using Map Topology at any license level of ArcGIS ...


0

Orion, I just noticed you mentioned in your response to msi_g that even after installing 64-bit Background Geoprocessing that your tool is still running in the foreground. By default, all models and script tools run in the foreground, which means by default they all run in a 32-bit environment. Have you unchecked the "Always run in foreground" checkbox on ...


1

There should be essentially no difference. I don't know quite how to clearly explain this, but when re-projecting, you are in fact re-sampling at the same time, even if your cellsize were to remain the same. In order to project, the projection algorithm has to know where to 'place' the data, i.e., it has to have a location to project each cell value to, ...


0

Make sure you have the script tool set to run in-process. http://resources.arcgis.com/en/help/main/10.2/index.html#//00150000000r000000


1

If you want the symbols separately as a style reference then access the pc have intended symbols and go to "C:\Users\USER_NAME\AppData\Roaming\ESRI\Desktop10.1\ArcMap". There you will find two file USER_NAME.idb and USER_NAME.style. Copy these file and paste in the location "C:\Program Files (x86)\ArcGIS\Desktop10.1\Styles" of the new pc. N.B. In fact, if ...


1

In fact ArcGIS is geo(spatial) data processing software. By the way, overlaying one over another depends on the image dimension of the images(s) is being imported in arc map.If images with same dimensions are imported then these images overlay one over another.In this case arc map creates two files (.xml and .ovr)for each image. You need to just drag and ...


0

Just to add visuals for @ Brad Nesom -- start an edit session, make the layer the only selectable layer. select the 3 lines, go to edit toolbar dropdown. Merge. It is on the selected lines only. Also the arctool will work on the selected set. but works slightly different from the edit pulldown. - Brad Nesom


2

To be able to create Data Driven Pages you will need to have a Name Field chosen - in your graphic of the Data Driven Pages Setup there is not one. If you are not offered a choice for this field, then it will be because your Index Layer has no text field available to use for your page names, so add and populate one.


0

Looks like you have discovered a quirk of the Iterator. There is no indication in the help file that the iterator sorts the field. So the only way I can think of doing this is to add a field to your dataset and you number the rows in the order you wish to visit them. You then iterate over that field.


0

I may be able to weigh in here, as I did a similar cemetery project a few years back. It is not too difficult to use a python script to pass variables through to an SQL statement to select certain graves, but it can become very frustrating if you are unfamiliar with the syntax. It is a good idea to search this site for hints like How to include variable in ...


2

To expand on the other answers: If you will be defining other values from RASTERVALU, besides the 1201, to CN_LEVEL3 you can put a dictionary into the codeblock. Example (I made some random values): def calcVal(inVal): values = {1201: "Developed, Open Space", 1202: "Forest", 1203: "Water"} if inVal in values.keys(): ...


0

To avoid the need to use Python you can use Select By Attribute first. This is available as a tool, from the Selection pulldown or from Table Options. Then use Field Calculator or the Calculate Field tool to update just those features with the desired value.


1

In your field calculator, select Python as your parser. In your code block: def calcVal (inVal): if inVal == 1201: return "Developed, Open Space" Then in your field calculation box: calcVal(!RASTERVALU!) Tweak as needed. Look into if/elif/else statements for a bit more complex logics.


2

Instead of using an if/than you could just do a select by attribute RASTERVALU = '1201' than use the field calculator CN_LEVEL3 = "Developed, Open Space" it will only calculate the selected records all of which will have a RASTERVALU of 1201.


0

Okay so I finally figured this out. It was a stupid mistake on my part. The files I had in the specified folders were actually feature classes and not datasets. Anyway it is not possible to create a dataset inside a folder. It can only be done inside a geodatabase. So for someone who knows their way around with ArcGIS, they could have noticed that I had just ...


0

If you were able to import your ascii file as an image, you already have a raster file. You should then check if the spatial reference is OK by adding another layer (e.g. open street map). If it is not well georeference, please provide the first lines of your ascii file otherwise there are too many possibilities for automatic or semi-automated ...


2

Not sure I am understanding the workflow correctly but like Beck said I think this is does the trick. Foo is the original shapefile you are deleting all the features from, Bar is the layer you are copying features from. import arcpy # Data foo = r'C:\Path\to\layer\that\will\be\blank.shp' bar = r'C:\Path\to\layer\that\gets\copied.shp' # Delete Features ...


0

This step-by-step solution works (and it is not so complicated that it seems to be...): First, convert yor raster into polygons by ArcToolbox -> Conversion Tools -> From Raster -> Raster To Polygon. Once new polygons created, identify their coordinates of centroids by Add Geometry Attributes - it creates new culomns in your polygon attribute ...


1

Run the Raster to Polygon conversion tool, then run the Feature to Point tool on the result. This should give you centroid point features for the rasters.


0

I would first start by checking my environment settings to see what my raster cell based settings are currently Geoprocessing -> Environments -> Raster Analysis Maybe try setting this value to 'Minimum of inputs' If that doesn't work, see if the input data is projected into a coordinate system that uses meters. There might be an issues with the 0.038km ...


1

You need to set a default value for the Selecting Features Layer. Ideally this would be the layer file the user is going to be selecting the most. Once there's a valid value in the Selecting Features layer variable, that oval should turn a different color and the model should run. It's one of those annoying little idiosyncrasies of ModelBuilder that will ...


1

One approach: You can clip a raster with a tool from your toolboxes, Data Managament -> Raster -> Raster Processing. There are various routes with for getting volume, but if you have raster data you can use this tool. You should also understand the error associated with your lidar derived raster and the estimates of volume and how that impacts your results. ...


2

There is an option to exclude certain data in the layer itself. You could do this, and then it will graph everything else. Select layer-> Options->Symbology-> Charts-> Exclusion-> SQL query "Field" IS NULL This will make it so that all the null values do not appear in the bar graph. let me know if this solved it


0

I cannot answer fully because I don't know all the intricacies of the personal Access MDB behaviour in a server environment. Perhaps this will help; the Style file is an mdb MS Access database so all the rules of the MS Access mdb apply, this includes locks, etc. Access is not a multi-user MDBMS so there will likely be issues with multiple users attempting ...


1

The easiest way is to export your feature classes to feature classes. Esri HowTo: Remove Z- and/or M-values from a feature class 1.Browse to ArcToolbox > Conversion Tools > To Geodatabase. 2.Open the Feature Class to Geodatabase (multiple) tool. 3.Add all the feature classes into the Input Feature Class parameter. 4.Select an Output Geodatabase. ...


1

I guess you are talking about ESRI ArcGIS rasters? It seems your rasters don't have proper statistics. Just try to apply a classified renderer in the symbology properties, you will be asked to create the statistics.


0

I'm not familiar with this feature but there seems to be some .net methods and properties: IFrameElement.DraftMode Property AND IFrameDraw.DrawDraftMode Method


0

If it were possible to do this then there should be a property to do it in the DataFrame (arcpy.mapping) help. There is not, and to me that makes sense because draft mode seems to be a graphic effect of the ArcMap application. To do something which is effectively the same, I think you will need to write some ArcPy code to save your layers (perhaps as layer ...


0

I recently did this too. The directory where the xml log files are typically located for v10.2 are here: C:\Users\yourusername\AppData\Roaming\ESRI\Desktop10.2\ArcToolbox\History You should have write access here, so you may open up a windows explorer, select the xml, and delete. A simple python script could also be written to delete these files called ...


0

If you're familiar with Python, here's a script provided in an ESRI Technical Article that automates the process of deleting geoprocessing history. GIS administrators and managers sometimes need to delete geoprocessing history from a feature class' metadata. Instructions provided describe how to do this using a Python script. The following ...


0

Intersect 2 layers Add field [Times] and calculate it using 2ndNumeric*ShapeArea Summarise field [Times] and [ShapeArea] using first layer UniquPolygonId Divide [Sum_Times] by [Sum_Area], this will give you weighted second layer numeric Transfer result to 1st polygon table and check the correlation between 2 columns, i.e. 1st numeric and weighted one


1

To work with topology using a Basic (formerly called ArcView) level license you can use map topology on your file geodatabase: A map topology creates topological relationships between the parts of features that are coincident, which allows you to simultaneously edit features that share geometry. You can create a map topology for point, line, or ...


0

This is the code that works :) import arcpy mxd = arcpy.mapping.MapDocument(r"N:\\5-Processes\\Resources\\DynamicData\\SourceMXD\\Copies for GDTEST\\Test\\Data_CCTV.mxd") tables = arcpy.mapping.ListTableViews(mxd) for t in tables: t.replaceDataSource("C:\\Users\\ferencek\\AppData\\Roaming\\ESRI\\Desktop10.2\\ArcCatalog\\sde_appreader (SDE_LIVE) ...


1

I don't know of a way to enable Z values afterwards, but here's a workflow to create a new polyline with Z enabled and copy the existing fields and data over: 1) Create a new polyline feature class which stores Z values. 2) Import the existing fields from the old polyline feature class. 3) Right click the new polyline feature class in ArcCatalog and ...


0

Create a new feature class of type "Line", and check "Coordinates include Z values", continue through the options until you get to field names. Import your original lines which didn't have Z enabled. Then, right click your new feature class, and "Load Data" from your original polyline feature class.


0

ESRI has a VBA script that shows how to convert annotations to polygons. Works well and I made it into an add-in for my own use. Once you have the polygons, you can easily copy and paste to a line feature class then export to DXF, DWG, Shapefile, etc. This will give you the OUTLINE of the text which works fine in 3rd party applications. If what you have in ...


3

A couple things to note: Your code block is currently taking two arguments, but you really only need to take one. AKA_STREET_TEST1 is the result you want, not something that Calc() will consider when calculating. So your expression should be Calc(!STREET1!) -- because you want the function Calc to do something using the information from field STREET1, and ...


2

It sounds like you've got the right idea but you're testing if STREET1 is perfectly equal to "AVENUE". Because STREET1 has the road number in it though, it will never be equal. Therefore, you would need to see if it contains AVENUE, not just is equal to AVENUE. If you use the python find() function on a string and it doesn't contain the value you're ...


-2

def calc(a): if "AVENUE" in a: return "AVE" calc (!STREET1!)


2

you could use the find() function def Calc(street): if street.upper().find("AVENUE") >=0: return street.upper().replace("AVENUE","AVE") Calc(!street!) Note that Python is case sensitive, so I added upper() to take all cases into account


2

Try this if you are updating existing field and @radouxju method for populating new field: def Calc(STREET1): return STREET1.replace('AVENUE','AVE')


1

I believe you can set predetermined variables as values for the input parameters. If you right click on the Buffer tool in Model Builder, and go to Make Variable --> From Parameter --> And then select the parameters which you want the user to set a value for Then set the default values in the Buffer tool properties that should stay constant (Side Type, ...


2

In model builder, you can set variables from a tool's parameter. In model builder, right click the tool, go to 'Make Variable', and click 'From Parameter'. Then you can set that variable to be a 'Model Parameter', which means the user will specify that variable. The other things will stay as you set them for the tool in model builder.


1

Code works fine with single quote on my machine. I think it is something to do with gdb naming, (& character?). See if slightly modified code will help to track what's wrong # Import arcpy module import arcpy, traceback, os, sys try: def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) ## arcpy.env.workspace = ...


0

I don't think you can save a Rotation setting in a Style the same way you'd save a custom marker symbol. But I think you can still transfer the symbology's Rotation setting to another machine using a Layer (.LYR) file. Try this: On your home PC, open ArcMap, highlight the layer which has the rotation setting you want, then right-click it and click "Save As ...


2

You could save the layer out as a layer file (this doesn't store data): Saving a layer file And then import that layer file as symbology: Import symbology Or, if you want the data, and symbology included in one package, you could save the symbolized layer as a layer package. This would probably be the easiest and best solution. Saving a layer package ...


0

Take a look at The ESRI Resources for the Style Manager. You'll need to create your own, new style file, and copy your styles from the default into your new one. Then on the new machine, just import/add the style file with your styles. ArcMap 9.x Tools > Styles > Style Manager ArcMap 10.x Customise > Style Manager



Top 50 recent answers are included