Tag Info

New answers tagged

1

A couple of things to test. You say it has Z values. A feature class can be Z aware but have no Z values. So first thing to test is does your point dataset actually have a number for its Z value? You mention that it is a multipoint dataset. May be its a bug in the tool (I've personally never used it), may be it only accepts single part datasets? Try ...


1

I would add a precondition going From: The "Value" coming out of the iterator To: "Make Table" (the 1st tool you run on "Final1(2)") This will make sure the value changes each time


1

There is no guarantee that a model exported to Python will run without debugging and, depending on your model's complexity, that debugging effort could be considerable. I would wrap your model into a very short Python script that consists of little more than arcpy.ImportToolbox(). For example, if you have a TestModel (without an alias) in ...


2

It looks like you need to set a temporary alias on your toolbox (or a permanent one via its Properties) as described in the Help for ImportToolbox (arcpy): If the toolbox does not have an alias, the module_name is required. When a tool is accessed through the ArcPy site package, the toolbox alias where the tool is contained is a required suffix ...


0

It appears as though I had to use the Iterate Tables rather than Iterate Files, and then it worked just fine.


1

You may need to include a Collect Values tool between the Iterate output and the next processing step (CreateFeaturesFromText). Example from ArcMap's Help Page (in a different model, so just illustrating the principle)


2

!shape.length3D! does work. I had to make sure that I selected the PYTHON_9.3 Expression type in the Calculate field Options dialog. (I'm running 10.2.)


0

ModelBuilder only allows one iterator per model. I would integrate a model within a model in order to iterate over multiple tables.


0

If I understand correctly, each of the input shapefiles consists of only one land use type. If that's the case, here's what I would suggest: Use the Merge tool three times to merge all of the A, B and C input shapefiles into three new shapefiles, each containing all polygons of a single land use type. On each of the merged shapefiles, run the Dissolve tool ...


0

You can use CreateMapSDDraft (arcpy.mapping) or Upload Service Definition (Server) http://resources.arcgis.com/en/help/main/10.1/index.html#//00540000001p000000


3

I'd try nesting the iterate part in a sub-model - as suggested in this earlier question: How to prevent running part of a model when iterator is used?


1

Found what was causing the model to use my default gdb. Just needed to check the paths of the intermediate data within the model. Some of the intermediate data had leftover paths to the default gdb. I just repathed those to the Scratch gdb that I specified in the Environment Settings and everything runs now on other's computers.


0

This can be achieved with a relatively simple model, no programming required! The model is below: I use the summary statistics tool to sum your first field and place this value in an in_memory table. Then use the get Field value tool (a model only tool) to get that value. Then a simple calculate field tool on your second field using in-line substitution (in ...


1

You can use a precondition to control if the model executes. The following model assumes your raster is an integer grid so the SOY class is an integer value. This means you can use the raster in the select by attribute tool. So get count should return 1 if SOY exists in the raster and as it is a precondition to the raster to polygon tool that part of the ...


0

I have resolved the issue so I thoughht i'd close this by sharing the answer. 1) the "null" values on all rows but the first one Thanks to Richard Fairhurst in the commenting section on the Patch tip. The patch fixed it. 2) returning the count value of points per line segment in my model, I had to: use the 'Repeat Victimsation (Geographical) tool from ...


0

From the perspective of someone using what you've created: there is no difference. Its a tool. Technically speaking a python toolbox (.pyt) is a python script but structured in a way that ArcGIS understands its a toolbox + tool. The model and script tool are something that live inside a toolbox (.tbx). The script tool references an independent python file ...


2

There is not an Iterate Fields tool in ModelBuilder. I can think of two possible workarounds: Modify the model to run as a Python script. Define a list of the fields you want to use, and define a loop to go through each one and execute the IDW/export functions. I would go with this one personally, but it would be (much) easier with some Python knowledge. ...


0

It sounds like you want to do a couple of nested loops, one for the feature classes in a workspace, and one for the features in each feature class. This is painful (but possible) to do with ModelBuilder. If you want to get your hands dirty with Python (which I definitely recommend for stuff like this), here is an example to get you started: import arcpy, ...


1

Here is the model, it uses inline substitution a described by Aaron. Note the output of the Polygon to raster tool is ..\fGBD_Scratch.gdb\ras_%Value%. Value is coming from the iterator which in this case was set to FID to hand out unique rows. So the first raster dataset would be ras_1, then ras_2, etc.


4

There are several ways to deal with naming in model builder. ArcGIS has a help section on this: A quick tour of using inline variable substitution. One slick way to quickly create unique names from an iterator is by calling the %i% or %n% system variables, which output files in the following form: file1, file2, file3, file4... The %i% system variable ...


0

I would use the Select tool and then write this expression: "Modified_date" >= CURRENT_DATE -1 It should return all your records greather than equal today minus 1 day (i.e. 24 hous), therefore yesterday at 6am. It definitely works with the Definition Query SQL as we use it in our organisation to only view our "incidents" in the last fortnight: ...


1

I'm not sure this is the answer that I was looking for (especially since the original model worked for another user), but I ended up getting it to run successfully with a bit of a work-around. I put everything after Add Join into a submodel and it worked perfectly.


1

I don't have an answer to avoid this issue but my typical solution is to backup the model occasionally. The "failed to save" error just happened to me. It is frustrating to say the least. If you don't have a backup, you lose everything. When you open the model later it is completely empty. I brought this problem up at the UC a couple years ago to one ...


2

Using QGIS 2.2 you can use the v.select function from GRASS to select features from one layer and how you want to select those features (if they overlap, touch, intersect etc) from another layer:


0

I wanted to provide another alternative to my previous answer I am more of a fan of using the python interactive window and an UpdateCursor for most of my attribute table changes. When I wrote my above answer, I wrote it in the interactive window and translated it to the field calculator. My interactive code was: replaceList = ["DRG", "2014"] ...


1

I am assuming you mean field value that needs changed and not your layer name since you mentioned Field Calculator Same logic could be applied in a script for actual layer names too though Ok.. I understand you and have it down. (1) Make sure your parser is marked for python. (2) In the Pre-Logic Script Code: def customReplace(fieldValue): repList = ...


2

I am not completely sure to understand the aim of your script, but here are some comments def customReplace(fieldV): # you must indent after your def repList = ['-', ' ', '.'] #remove the ; rep = '_' b=fieldV for old in repList: #I guess you want to replace the values in replist b = b.replace(old, rep) #here you need return, not ...


0

I'm not sure what you're trying to do exactly. Is Layer supposed to be a feature class or shapefile, or a field? One, all the lines in the function should be indented. Two, you can't have a semicolon end a line. Three, Layer is probably a reserved word, don't use it. Four, repList isn't in Layer; that loop will either error out or give you unexpected ...


0

Maybe try to iterate through all the fields using the "Iterate Field" tool in Model Builder. It will do all the fields in a feature clase.


0

You could explore using the batch processing function on the model. Right click (see image below) the model in your toolbox and select 'Batch'. From there you can add multiple instances and each will run through the model. Unfortunately, I am not aware of any way to easily enter the content into 'Add Row'. Thus, you would be required to enter the hundreds of ...


0

I was able to find a solution to this... Quite simple actually.... It involved rearranging my mess of preconditions as seen in the picture. I think the model was trying to run the create folder section prior to the actual iteration.



Top 50 recent answers are included