POST
|
Hi, You need to enable FME for Arc in order to dothis. I'm assuming you have an FME licence. Go to Start> All Programs> FME Desktop > Utilities > FME Integration console. In here you need to enable FME for Arc. Now within Arc, in catalog, when you right click on a toolbox, you will see an option to create an FME tool. Create one of these, right click on it to Edit it and FME will launch. You can then just import your FME tool into this and then add it to your modelbuilder model like you would embed any other model. I hope this helps! Thanks Dan
... View more
08-05-2013
03:39 AM
|
0
|
1
|
652
|
POST
|
Hi, are your polylines closed? It sounds like you might have gaps in them and therefore Arc doesn't know how to close them in order to create a polygon. Thanks Dan
... View more
08-05-2013
01:16 AM
|
0
|
0
|
167
|
POST
|
Hi, it looks like you have a single feature class for all your points. Use the Iterate Field values tool and connect the output to the Copy features tool. Then connect the output from this to your watershed tool. That should do it 🙂 Thanks Dan
... View more
08-05-2013
12:31 AM
|
0
|
0
|
231
|
POST
|
Hi Dan, I have. The Save as option doesn't have an option for versions, and the export option will only let you export to graphic or python script. As I'm using iterators I can't export to python script (but all the tools I am using are available in Arc 10.0) Thanks Dan
... View more
08-02-2013
06:42 AM
|
0
|
1
|
1035
|
POST
|
Hi all, I'm assuming the answer here is no, but just in case.... Are models built in Arc 10.1 compatible with Arc 10.0? Similarly, will models built in Arc 10.2 be compatible with Arc 10.1 or 10.0? Thanks Dan
... View more
08-02-2013
06:16 AM
|
1
|
9
|
5209
|
POST
|
Hi Ryan, try adding this to your script
# Get the value from the field called tilename, e.g. ab1234. (This should be a string field)
name = row.getValue("TILE_NAME")
# Set Output location
outputlocation = arcpy.GetParameterAsText(0)
# Concatenate into whole path name
outputName = outputlocation + "\\" + name + "_ArcMap" + ".tif" I've just extracted this from a longer bit of code I posted here http://forums.arcgis.com/threads/89608-python-script-zoom-to-each-county-in-a-state-shp-and-export-a-pdf-map Thanks Dan
... View more
08-02-2013
01:17 AM
|
0
|
0
|
239
|
POST
|
Hi, assuming I've understood you correctly, you have a geodatabase with a number of point feature classes, and you want to pass each feature class once through your model. If this is the case, you should use the iterate feature classes tool. If all your points are in the same feature class, you should use the Iterate Field Value tool instead. With this tool, you can group by a certain field, (if you have multiple points that need to go through together) or just group by ObjectID (or another unique identifier field) if you want each point to go through on its own. I hope this helps! Thanks Dan
... View more
08-02-2013
01:06 AM
|
0
|
0
|
231
|
POST
|
Hi Bailey, I'm glad this helped, and thanks for sharing the code fix, hopefully it will also help others. Thanks Dan
... View more
08-01-2013
12:22 AM
|
0
|
0
|
353
|
POST
|
Hi Bailey, Have you tried using Data Driven pages to do this? You need to set up an mxd with the data driven pages settings defined, but you can then use python to run the process. I've attached some code. This does most of what you need. You just need to change the output filetype to pdf (I'm using tiff here) and delete any of the user-defined parameters I have added. I hope this helps. Thanks Dan import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum # Get the row from the attribute table of the index layer row = mxd.dataDrivenPages.pageRow # Get the value from the field called tilename, e.g. ab1234. (This should be a string field) name = row.getValue("TILE_NAME") # Set Output location outputlocation = arcpy.GetParameterAsText(0) # Concatenate into whole path name outputName = outputlocation + "\\" + name + "_ArcMap" + ".tif" #Set the data frame so the output can be cropped to the data frame extent df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #Set the resolution dpi= arcpy.GetParameterAsText(1) #Specify the compression type Compression = arcpy.GetParameterAsText(2) # Export to tiff arcpy.mapping.ExportToTIFF(mxd, outputName, df, df_export_width=5153, df_export_height=5107, tiff_compression=Compression, color_mode="24-BIT_TRUE_COLOR", resolution=dpi) # Clean up del mxd
... View more
07-31-2013
07:57 AM
|
0
|
0
|
353
|
POST
|
Hi Toni, is there a chance you could send me some of the data? I don't actually have any sensible raster data I could use to trial this. Just 2 files of each would do. Thanks
... View more
07-30-2013
03:17 AM
|
0
|
0
|
964
|
POST
|
Hi Toni, it should work through your rasters sequentially, so as long as they are in the same order in your workspace it should be fine. One way to test this, would be to make the Name variable within your salinity model a parameter (rename it to something else as you're already using Name as a temperature output variable), and then add it to your final file name. i.e. so your final output is "MOC_%TName%_%SName%_mol where %TName% is the Name variable from the temperature output, and %SName% is the Name variable from the salinity output. If this doesn't work, try putting your temperature and salinity input rasters into 2 different workspaces (it looks like you currently have them all in the same workspace). Thanks Dan
... View more
07-30-2013
02:12 AM
|
0
|
0
|
964
|
POST
|
Hi Toni, attached are 2 screenshots which should be enough to guide you to your solution. I have fewer inputs into my field calculator, but the principle is the same. I hope this helps! Dan
... View more
07-29-2013
08:22 AM
|
0
|
0
|
964
|
POST
|
Hi, you will only get one output in this model as there is no iterator in the main model. So your O2a and O2b models will run (with their iterators), however you will only get a single output from each (I'm guessing the last temperature and the last salinity) If you could attach an image of the 2 submodels, I may be able to help you re-design these. Thanks Dan
... View more
07-29-2013
07:12 AM
|
0
|
0
|
964
|
POST
|
Hi everyone, I've searched the forums and the internet for an answer to this, but unfortunately I've had no luck. I'm running Arc 10.1 sp1 Regardless of whether I use Idle, pythonwin, pyscripter or the built in python editor window in Arc, I get the following error when I try to import arcpy >>> import arcpy Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module> from arcpy.toolbox import * File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in <module> from management import Graph, GraphTemplate File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in <module> import _management File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in <module> import _graph File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in <module> import numpy File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\__init__.py", line 137, in <module> import add_newdocs File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\__init__.py", line 4, in <module> from type_check import * File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\__init__.py", line 8, in <module> import numerictypes as nt File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\numerictypes.py", line 92, in <module> from numpy.core.multiarray import typeinfo, ndarray, array, \ ImportError: cannot import name datetime_data The python installation is not a standalone one, it is the one installed when installing Arc, so in the python27 folder within the C drive, there is only 1 folder, this is ArcGIS10.1. Therefore I am unable to carry out the fix provided by Kimo in post #2 here http://forums.arcgis.com/threads/2158-Importing-arcpy-error?p=10859&viewfull=1#post10859 I've also looked at the contents of the Desktop10.1.pth file and the file paths seem correct ( as specified in the Tip at the bottom of this page http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000008000000 ) I have 3 lines in this file, as below: C:\Program Files (x86)\ArcGIS\Desktop10.1\bin C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts Any ideas what I can do next to try and get arcpy to be recognised? Many thanks Dan
... View more
07-29-2013
05:08 AM
|
0
|
1
|
1618
|
Title | Kudos | Posted |
---|---|---|
1 | 08-14-2013 01:49 AM | |
1 | 08-02-2013 06:16 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|