|
POST
|
You can put in some if-then-else logic in your model using either the Calculate Value tool or a script tool. Check this series of blogs: If you are stuck at "if" �?? Part 1 If you are stuck at "if" �?? Part 2 �?? Example of using Script tool to create branches using if-else logic If you are stuck at "if" �?? Part 3 �?? Does Extension Exists model example If you are stuck at "if" �?? Part 4 �?? Does Selection Exists model example Create a dummy feature class in the place where your feature class could exists or not (location) such the your feature class exists. Run the model once based on this blog If you are stuck at "if" �?? Part 1. This blog has an example for your case. Once your model validates and runs for your dummy feature class. You can save the model and run it from its tool dialog. You will have to experiment a little with your model as I do not really know besides the delete what are the other tools in your model.
... View more
04-20-2012
08:35 AM
|
0
|
0
|
1976
|
|
POST
|
Hi Anand, Check the attachment. You don't need to convert the raster to Poly and do all that stuff. Try something like what is shown in the attached image: here is the code Expression: (here your Input is the Input Raster variable name - The variable name can be x/y/anything while its value is the path to your raster - read Calculate Value help) fn(r"%Input%") Code Block def fn(input): import arcpy myRaster = arcpy.Raster(input) ext = myRaster.extent midx = (ext.XMax - ext.XMin) / 2 midy = (ext.YMax - ext.YMin) / 2 return "{0} {1}".format(midx,midy)
... View more
04-18-2012
02:59 PM
|
0
|
0
|
3578
|
|
POST
|
Ok. I see the you are iterating over tif. Try this: Create a precondition from output of the Parse Path tool to the "Slice to Equal Area 8 classes" tool. such that Parse path tool run before the Slice tool.
... View more
04-17-2012
08:22 AM
|
0
|
0
|
4065
|
|
POST
|
You do not need to use the Parse Path tool. The cyan color output oval from the iterator called Name is the name of the input raster. Just use %Name% in your downstream tool output.
... View more
04-16-2012
02:38 PM
|
0
|
0
|
4065
|
|
POST
|
Dear wjtrask, Couple of things to check and try: Share your model or a snap shot of your model. How are you running the model? By editing a model and running from within ModelBuilder? From its tool dialog? If you are running from tool dialog - Make sure that your outputs are not intermediate (especially the one on which your inline variable substitution depends) Right click your green ovals and uncheck the intermediate such that they are not deleted after the model runs. Experiment with this. You can always check it intermediate if you do not need them after you run the model and also after you make sure that downstream tools are not dependent on any of the outputs marked as intermediate Try these at 10.0: Do not use a list variable INSTEAD Put all your shapefiles in one place and use the Iterate Feature Class Iterator. This iterator has two outputs 1) the feature class path which you can connect to the Clip tool downstream, 2) Name- which is the name of the feature class. Use this variable name in your output as %Name%. or If you are using Multivalue Iterator use the Parse Path tool and set the second parameter of that tool to Name. Use the output of Parse path as inline in your downstream tools. Set precondition from Parse path to the next tool Clip.
... View more
04-16-2012
02:27 PM
|
0
|
0
|
4064
|
|
POST
|
Hi Taniapf, I am sorry you are facing this problem with a model diagram not drawing properly. To troubleshoot I need some information from you: What is the os of the original machine? What is the os of the machines that do not work? What does the model look like on the original machine? What is the version of ArcGIS on the original machine? What is the version of ArcGIS on the machines that have the problem? Was there any problem with ArcGIS install on the machine showing the problem? Can you share the model?
... View more
04-13-2012
10:20 AM
|
0
|
0
|
1994
|
|
POST
|
Hi, We are sorry you are facing this problem. Unfortunately, this is an issue and has been logged into our system as a bug. For now you will have to modify your script to check for the existence of the feature class with same name and if it does then may be give it a unique name. You can try arcpy.CreateUniqueName if using Python or its equivalent for your addin.
... View more
03-13-2012
02:34 PM
|
0
|
0
|
1673
|
|
POST
|
What version of ArcGIS are you working on? Try validating a model before running the model, does that work?
... View more
02-28-2012
08:12 AM
|
0
|
0
|
1673
|
|
POST
|
I am sorry you are getting this error. To understand this problem please can you please share your model and/or a screenshot of the tool dialogs used in the model. Thanks!
... View more
01-23-2012
10:36 AM
|
0
|
0
|
1318
|
|
POST
|
In ModelBuilder try Iterate Feature Selection or Iterate Row Selection iterators.
... View more
11-04-2011
01:13 PM
|
0
|
0
|
1891
|
|
POST
|
Put all you csv files in a folder Use Iterate Table iterator. Set the folder with the csv files as input workspace Don't select anything for table type optional parameter. Connect the output of the iterator to either the Copy Rows tool or the Table to Table tool. Use inline variable substitution for the name of the output table (%Name%/Out_%Name%/or something like this) Run the model till this point once. After running you can validate and connect the output of the Copy Rows/Table to Table tool to the XY Event Layer tool. Save the output of the XY Layer by Copy Rows again. Use inline variable substitution %Name % again for the output name if you want.
... View more
11-04-2011
01:10 PM
|
1
|
0
|
3506
|
|
POST
|
check image forum1.png for the extents same as input raster + using an iterator check image forum2.png for extents defines by you +using a list
... View more
11-04-2011
10:15 AM
|
0
|
0
|
4101
|
|
POST
|
To use the workspace iterator you must put all your gdb under the same root folder. Set the input workspace to be that root folder and workspace type = FILEGDB, also check the recursive option. If you don't set the workspace type to any thing (leave it blank) and just check the recursive option it will run through each folder and each gdb. You will then have to add a logic which checks if it is a folder or a gdb and then branch your model based on it. It would be a round about way. It would be easier to put all gdb under one root folder and iterate.
... View more
10-28-2011
08:53 AM
|
0
|
0
|
1197
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-02-2026 11:53 PM | |
| 3 | 12-03-2025 10:47 AM | |
| 4 | 11-13-2024 11:37 AM | |
| 1 | 08-28-2023 05:43 PM | |
| 1 | 08-31-2023 02:03 PM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|