Hot answers tagged

4

You cannot save a table in a geodatabase with an extension like ".dbf". Remove the extension and the tool should run.


4

One option would be: Use Get Count tool on query result table and assign result of tool to a variable Then, use if-then-else Branching logic to check if variable is greater than 1 or not


3

The tool does not carry over source point layer field/attributes. You will have to apply other tools/methods (e.g. spatial join) to bring over those attributes.


3

The first column is an automatic ID field. If for some reason you need to preserve the specific ID value for each row, you need to create a new column and populate it with the ID values. Merging two layers will definitely change the automatic ID for all the features of one of them (usually, retains the add order in the merge tool box). As for your point ...


2

Add Join requires that the Target is a Layer or a Table View, not a Feature Class or Table. The difference is that Layers and Table Views exist only in ArcMap Desktop and support display and record selections while the other is what is stored on disk and shown in ArcCatalog that does not let you select records. Copy Rows only creates a Feature Class or ...


2

You don't necessarily have to define a function for this one. Try this: str(!PlaceName!).replace(' ', '') The "not defined" error is related to the lack of quotes around the NoSpace1. This could be from the % on either side of the Value. Your expression should be ReplaceName(!Placename!)


2

Not that I'm aware of in modelbuilder as a setting. The only way I can see calling that action would be calling a python script at the end of the model that makes the .net arcobject call to open said layer/table.


2

Assuming there is a common field between them all: Merge all the feature classes together into one feature class Dissolve the feature class based on the identifier field. This will result in a multi-point feature class with each entry comprised of multiple locations Run feature to point to collapse the multipoint to point


2

Another GIS Blog informs us that an ArcPy function: TestingSchemaLock tests if a feature class or table has a schema lock. That posting contains ArcPy code that you could use to develop a Python Script Tool that you could include in your model to check whether the data that your model uses has a schema lock, but not necessarily whether your model is ...


1

This is a slightly different way of doing this, but you can do this with the ArcGIS Maps for Office add-in. I downloaded some crime stats and made a map out of it very quickly:


1

Based on your description are you looking for Get Count? Returns the total number of rows for a table. If the input is a layer or table view containing a selected set of records, only the selected records will be counted.


1

Field in the Feature to Raster tool must be exposed as a model variable. Right click on the Feature to Raster tool >> Make Variable >> From Parameter >> Field Once you have done that you can then set Raster_%Field%


1

This is Linear Referencing task, however Python makes it much easier. Solution below assumes your points and line are in projected coordinate system. Add your line to mxd, call layer "line". Add numeric field to your points table, use advanced mode in field calculator, python and this expression to polulate it: def Chainage(shp): mxd = ...


1

Run the data through the SORT tool, sorting by your random number field, sorting in an ascending sequence, send the output into IN_MEMORY. For example input data is: The sort tool creates an FID field which is sequential, so all you need to so is select rows where FID <= 10 as shown below: If you need the lowest 20 then select FID <= 20. This ...


1

The problem was that outputs from iterator in subModel had always the same name ie: "Lines". My solution is to save every output of subModel in a new FC named with the group by value %Value% using inline variable substitution You can see the solution in the red square below:


1

If you're interested in the current date, then the Calculate Value tool could be of use, along with some python. Below is the code that would return the current date as a string. In the Expression box, put this: getdate() In the code block, put the following: def getdate(): import datetime now = datetime.datetime.now() current_date = ...


1

Consider testing against the workspace type property. In your calculate value tool (you only need one for this step), modify your code to look something like this: import os, arcpy def workspace_type(wkspace,fc_name): wt = arcpy.Describe(wkspace) if wt.workspaceType == "FileSystem": #folder return ...


1

You do not need the field calculator for replace at all. You can just use the Find & Replace tool which is accessed from the attribute-table which has the search/replace function the same way as in Excel, for example. It also works for all columns simultaneously or can be set to search for whole values etc.


1

You could try adding the Rename Tool to the right of your output raster(s). As your input to the Rename Tool, connect your output raster(s). For the output data parameter in the Rename Tool, you should input the file name you desire. In your case, something to the effect of "C:\temp\HogHab1_%Value%" or "C:\temp\ModRas1_%Value%" respectively. What the ...


1

Open Model Builder from ArcMap. Tool 1 in Model Builder: From the Toolbox, drag in "Select Layer by Attribute" tool. Its under "Data Management". Right click on the tool and hover over "Make Variable", then when more options pop out, select "From Parameter". When more options pop out select "Input Layer". When a new circle appears, right click on it ...


1

Rather than returning a boolean, how about you modify your code so that it converts your input raster to a .tif and returns that instead.. Something like this: def check_if_Tiff(DGM,folder): import arcpy import os desc = arcpy.Describe(DGM) type = desc.format if type == "TIFF": return DGM else: out_r = ...


1

If your input is shapefiles then your iterate Feature Classes won't work. Make sure you export your shapefiles into geodatabase feature classes first. Model builder does not like shapefiles! I would also create or use an existing geodatabase for the outputs in this model. Secondly, just delete the parts from the model that appear broken and add them ...



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