|
POST
|
Use the TRIM function. In a new column click on the first cell and click on the Insert Function button in the formula bar (fx). Enter TRIM in the search field and select TRIM from the results. Then enter the cell reference or choose the cell selector (grid looking tool to the right of the argument entry box). Then click OK. You can copy and paste that formula to the rest of the cells in that column. But I think you will then have to select the entire contents of that column you just created and copy it. Then go to the next empty column at the top and right click then select "Paste Special" and select "Values" from the choices. Then you can delete the column with the formula in it and what you have left is a column with the trimmed text values. ArcMap probably won't handle a formula in a cell. Hope that helps.
... View more
10-07-2011
12:12 PM
|
0
|
0
|
5708
|
|
POST
|
You might need to rebuild the locator. Right click on the locator and choose "Rebuild". I hope that helps.
... View more
10-07-2011
11:59 AM
|
0
|
0
|
523
|
|
POST
|
Thanks everyone for your help. Thanks for that link Dale, that is what I needed to get what I was calling a return value. I created a derived output string parameter for my script tool and added this line to the end of my script: arcpy.SetParameterAsText(0, fileName). Thanks again.
... View more
08-17-2011
09:02 AM
|
0
|
0
|
1303
|
|
POST
|
Thanks for the quick responses. After looking into the output parameter, I have added my script to the model as a script tool and created an output parameter as a string type. The file name is hard coded into the script, so I don't have any parameters in the script. Do I need to create one for the setParameterAsText? Can you point me to some examples of what the a script with an output parameter looks like and I can figure out how to plug it into the model? Thanks again for the quick replies.
... View more
08-11-2011
02:25 PM
|
0
|
0
|
1303
|
|
POST
|
I have a similar thing that I do in model builder that you could export as a script. When I do parcel updates, I get a new ownership table that I compare to the old one to find new records and changes in fields like acres parcel numbers and physical addresses. 1-Join the new table to the old table based on the common id 2-Make a table view with an expression selecting new records and records that have fields that don't match, also limit the view to show only relevant fields. 3-Create a new table and populate it with the rows of the table query. I first do a join based on the new table to the old table using the common ID field to join them together. I do that with the Add Join tool in the Joins subtoolbox in the Data Management toolbox. I then run the resulting table through the Make Table View tool in the Layers and Table Views subtoolbox of the Data Management toolbox. When I run that tool I specify a query that will select the new records (OldTableCommonID IS NULL) and any changed fields (NewTableField <> OldTableField) all of these connected by the OR logical operator. I also limit the table view to the four fields that I am comparing. I then create a new table with the Create Table tool in the Table subtoolbox of the Data Management toolbox. I base the fields of the new table on the table view created in the previous tool by having the table view be the input for the Template Table Name option in the Make Table tool. I then use the Append tool in the General subtoolbox of the Data Management toolbox to populate the new table using the records from the table view. I then go a step further by adding a field to the new table that would show which field has the change. I populate it by doing the Calculate Field tool in the Fields subtoolbox of the Data Management toolbox. That description is probably more than you needed, but I hope it helps
... View more
08-11-2011
01:48 PM
|
1
|
0
|
2175
|
|
POST
|
Hi, I am trying to set up a model to do a task that I do every month. Part of that model is a stand-alone python script that creates a file name with the date tagged on to the end of it. How do I write my script so that it returns this string and I can use it as input for another geoprocessing tool? I have searched the forums and help, but can't find any examples of this. Any help is much appreciated. Jeff
... View more
08-11-2011
08:59 AM
|
0
|
5
|
2068
|
|
POST
|
You want to do a relate instead of a join. You can right click on the shp file in the table of contents and select Joins and Relates - Relate. In the relate dialog you can specify the field that is common to both the shapefile and the table. Or you could import the shapefile to a file geodatabase feature class and set up a relationship class that would be more permanent. The relate in a map document is only available in that map document, where a relationship class would be available any time you added the feature class to a new map document. Hope that helps, Jeff Ward Summit County GIS
... View more
07-19-2011
12:18 PM
|
0
|
0
|
1247
|
|
IDEA
|
-->
I have been frustrated many times by creating a complex or lengthy sketch to reshape a feature or cut a polygon and end up inadvertently snapping to the wrong vertex to complete the sketch or double clicking accidently and ending the sketch too soon only to see the dreaded dialog that says "The Reshape task could not be completed" and my sketch disappears. Or the same thing for “The Cut Polygon task could not be completed”. I don’t think it would be too difficult to change those dialogs to ask if you would like to modify the sketch with yes and no buttons. If you click yes, the sketch is still there and you can modify it to snap to the correct vertex, or continue with the sketch if you double clicked by accident.
... View more
03-10-2011
08:56 AM
|
26
|
13
|
3768
|
|
POST
|
I don't know if you can do it in a script, but you could have two layers pointing to the same data. One layer has transparent polygons and the other is on top and has hollow polygons with no fill, just outlines and no transparency. Jeff
... View more
02-18-2011
05:34 AM
|
0
|
0
|
476
|