|
POST
|
Sean, Why don't you use the summary statistics table but the output goes to an In_Memory table. You collate your information from the table display as you wish and then delete the In_Memory workspace and if you set the environment of the geoprocessor to not add to display they should never see it. Duncan
... View more
01-24-2011
02:18 AM
|
0
|
0
|
609
|
|
POST
|
Mono, You do not say which version of ArcGIS you are using. You need to tell us this so we can help you. If you are using ArcGIS 10 then there is the new and very useful Feature Selection iterator, this will help with you model logic. Information about this can be found here. Duncan
... View more
01-24-2011
12:46 AM
|
0
|
0
|
3342
|
|
POST
|
Steve, What you are asking is not possible. The iterators work with FeatureClasses in their workspace. But to visualise a selection you are working with a FeatureLayer. If you look at the input requires of the SelectByAttribute tool that takes a FeatureLayer and not a FeatureClass. A tool to iterate over FeatureLayers does not exist. Duncan
... View more
01-20-2011
02:53 AM
|
0
|
0
|
2019
|
|
POST
|
Kevin, Search help for the Interface IMask there is example code that shows you how to set the Halo. Duncan
... View more
01-20-2011
02:37 AM
|
0
|
0
|
562
|
|
POST
|
James, I'm not so hot with Python but do you need to reset your position in your text file, some sort of reset pointer to beginning of text file? Duncan
... View more
01-19-2011
05:43 AM
|
0
|
0
|
1192
|
|
POST
|
Ruth, Here is a 9.3 model that does what you want. You may want to tweak it for your needs and to document it better. Duncan
... View more
01-19-2011
03:12 AM
|
0
|
0
|
983
|
|
POST
|
Will, I think you are heading off in the wrong direction... 😉 Below is some sample code that you would put in the on click event of a UIControl in an MXD. The code grabs the first layer in ArcMap, fires up ArcScene and then adds the layer. At this point you have a handle on the root object ISxDocument from which you can do all your stuff. Make sure you are referencing the esriArcScene library and have the 3D Analyst extension turned on. Duncan Public Sub test()
' Grab first layer in ArcMap
Dim pMXDocument As IMxDocument
Set pMXDocument = ThisDocument
Dim pMap As IMap
Set pMap = pMXDocument.FocusMap
Dim pLayer As ILayer
Set pLayer = pMap.Layer(0)
' Create an instance of ArcScene
Dim pDocument As IDocument
Set pDocument = New esriArcScene.SxDocument
Dim pApplication As IApplication
Set pApplication = pDocument.Parent
pApplication.Visible = True
' Add a layer to ArcScene
Dim pSXDocument As ISxDocument
Set pSXDocument = pDocument
pSXDocument.AddLayer pLayer
End Sub
... View more
01-18-2011
06:15 AM
|
0
|
0
|
1380
|
|
POST
|
Gregory, Is the string ModelName being set to the name of your model? The Name of your model is not the same as the display label which you see in your Toolbox. In ArcToolbox right click on your model and select properties. Then under the general tab check that you are passing the Name and not Label. Also don't start your model name with a number. Duncan
... View more
01-18-2011
05:34 AM
|
0
|
0
|
706
|
|
POST
|
Ruth, You don't say which version of ArcGIS you are using, you need to tell us so that people can help you. Tools and models are implemented very differently in the different versions. Assuming ArcGIS 10 then you could do a summary statistic on your shapefile to get the column sum and do that into an In_Memory table. I think there is a tool called collect value so you can get the Sum value then finally do a calculate with an inline substitution, all this can be achieved in model builder, if you have version 10... Duncan
... View more
01-17-2011
06:37 AM
|
0
|
0
|
983
|
|
POST
|
Mark, I don't have ArcGIS 10 so I've had to do this in 9.3 python, so the code is a little different. My knowledge of Python ain't great but I realised you are not actually returning a value and what was getting passed to the function was is a string and you were not writing the new string back to the row. So below is some code that worked on a table I knocked up, hope you understand it? Duncan import arcgisscripting
gp =arcgisscripting.create(9.3)
gp.workspace= r"C:\temp"
def renamefld(a):
if a == 1:
return "Natural Forest"
elif a == 2:
return "Planted Forest - Pre-1990"
else:
# Return an ! so we know not to attempt to update row
print "Error with converting subtype to text"
return "!"
# Create update cursor
rows = gp.UpdateCursor("test.dbf")
row = rows.Next()
while row:
# Get row information
id = row.id
type = row.type
# Call function to change type
type = renamefld (id)
# update row object
if type != "!":
row.type = type
rows.updateRow(row)
row = rows.Next()
# release cursor
del row
del rows
... View more
01-16-2011
09:51 AM
|
0
|
0
|
1303
|
|
POST
|
Demetris, I just tried you code on a table using the numeric field ObjectID and it works fine for me, this suggests there is something wrong with you R_Order field, does it contain <Null> values for example? Can you sort by this field in ArcMap? Duncan
... View more
01-15-2011
03:14 AM
|
0
|
0
|
750
|
|
POST
|
Frank, I don't know if I am giving you a red herring here but having looked at you model it's quite complex and I was wonder what order things are running in. You can make a proccesses output a precondition to another and this means "only run this process if the the precondition is successful" and this enforces a sequence to your model. It may be a pure fluke that the order you added the tools to your model is the order than runs well in edit mode? Just an idea and may not actually be the answer to your problem! Duncan
... View more
01-14-2011
05:12 AM
|
0
|
0
|
656
|
|
POST
|
Bad news I'm affraid. Avenue was the programming language of ArcView 3.x and is total different to python. There is no translation program for it. Basically you got to read the Avenue logic understand it and write it from scratch in python which has its own and very different syntax. Good luck!
... View more
01-14-2011
05:00 AM
|
0
|
0
|
722
|
|
POST
|
Demetris, See sample VBA code below on how to get a descending sort order. Duncan Public Sub Test()
Dim pTable As ITable
Set pTable = FindTableInMap("Downstream_Polylines")
Dim pTableSort As ITableSort
Set pTableSort = New esriGeoDatabase.TableSort
With pTableSort
Set .Table = pTable
Set .QueryFilter = Nothing
.Fields = "OBJECTID"
.Ascending("OBJECTID") = True ' TRUE is ascending, if set to FALSE then descending
.Sort Nothing
End With
Dim pCursor As ICursor
Set pCursor = pTableSort.Rows
Dim pRow As IRow
Set pRow = pCursor.NextRow
Do While Not pRow Is Nothing
Debug.Print pRow.Value(0)
Set pRow = pCursor.NextRow
Loop
End Sub
... View more
01-14-2011
02:21 AM
|
0
|
0
|
750
|
|
POST
|
Brent, OK, first thing first, if you run your model from ArcMap and supply those parameters exactly how you've written them does the model execute without a problem? I ask this as you have brackets a spaces in your path names. If you are not getting an error running it as a model then it suggests something is going wrong with the parameters. Also the execute method returns an object of type IGeoProcessorResult. Maybe you should get a hold of that and see what kind of error message it's returning? Have you set you parameters object to IVariantArray? Duncan
... View more
01-13-2011
10:27 AM
|
0
|
0
|
1175
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a week ago | |
| 1 | 04-15-2026 07:35 AM | |
| 1 | 04-14-2026 06:38 AM | |
| 1 | 04-14-2026 04:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|