|
POST
|
How can i split the text for the ones like this \pt16.25;{\fArial|b0|i0|c0|p34;15.00m} (they have 2 😉 and the script ive been using is like this arcpy.CalculateField_management("Annos","TEXTS","!TEXTSTRING!.split(';')[1][0:-1]","PYTHON_9.3","") Please help me
... View more
05-26-2013
08:26 AM
|
0
|
0
|
1712
|
|
POST
|
Please which symbol can I use to represent the degree (°) and minute (') symbol in my python scripts, because each time I try to run my script I get this error message for the line containing the 2 symbols mentioned earlier; \line 32, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details Any suggestions?
... View more
05-26-2013
04:41 AM
|
0
|
0
|
1712
|
|
POST
|
Thanks Y'all I got the SQL Expression eventually; arcpy.SelectLayerByAttribute_management("Annos", "ADD_TO_SELECTION",'"TEXTS" LIKE \'%m%\'') Thanks a bunch!!!! Please how can i handle the issue of schema Lock? This schema lock issue is really getting on my nerves.
... View more
05-24-2013
03:25 PM
|
0
|
0
|
1712
|
|
POST
|
Please how do I compose this arcpy script to select any text that has "ha", I tried the script below and that is the error message I got. Thanks >>> arcpy.SelectLayerByAttribute_management("HTNT_Annoss", "NEW_SELECTION",'"TEST" LIKE '%ha%'') Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'ha' is not defined >>>
... View more
05-24-2013
07:41 AM
|
0
|
0
|
1712
|
|
POST
|
I want to use an sql expression like this: "TEXTSTRING" LIKE '%fArial|b0|i0|c0|p34%' to remove all the annotations like that, then delete the values such as this {\fArial|b1|i0|c0|p34;} and leave 426 for the ones that appear like this {\fArial|b1|i0|c0|p34;426} and the same for {\fArial|b0|i0|c0|p34;KAF 8816}, i want to delete {\fArial|b0|i0|c0|p34;} and leave KAF 8816.
... View more
05-24-2013
07:14 AM
|
0
|
0
|
3928
|
|
POST
|
I want to delete all the first set of annotations i.e {\fArial|b0|i0|c0|p34;14.50m} {\fArial|b0|i0|c0|p34;\L0.0203 ha} {\fArial|b0|i0|c0|p34;161° 34'} {\fArial|b0|i0|c0|p34;93° 10'} and for these ones, I want to remove the unwanted characters and keep the ones I need i.e delete the values such as this {\fArial|b1|i0|c0|p34;} and leave 426 & the same for {\fArial|b0|i0|c0|p34;KAF 8816}, i want to delete {\fArial|b0|i0|c0|p34;} and leave KAF 8816, something of this nature.
... View more
05-24-2013
06:40 AM
|
0
|
0
|
3928
|
|
POST
|
I have alot of annotation text attributes imported from AutoCAD, i want to delete all the annotations like the following; {\fArial|b0|i0|c0|p34;14.50m} {\fArial|b0|i0|c0|p34;\L0.0203 ha} {\fArial|b0|i0|c0|p34;161° 34'} {\fArial|b0|i0|c0|p34;93° 10'} and i want to delete the values such as this {\fArial|b1|i0|c0|p34;} and leave 426 for the ones that appear like this {\fArial|b1|i0|c0|p34;426} and the same for {\fArial|b0|i0|c0|p34;KAF 8816}, i want to delete {\fArial|b0|i0|c0|p34;} and leave KAF 8816. Please do you have any suggestions. Thanks
... View more
05-24-2013
05:48 AM
|
0
|
0
|
3928
|
|
POST
|
Thanks a bunch, csny490 & rzufelt your suggestions worked perfectly for me.
... View more
05-24-2013
05:35 AM
|
0
|
0
|
3928
|
|
POST
|
I NEED TO EXTRACT THE FIRST LETTER AND THE MIDDLE LETTER OF A STRING ATTRIBUTE VALUE I.E "FIGURINE" , I WANT TO EXTRACT LETTER "F" & "R" TO FORM "FR". PLEASE HELP ME
... View more
05-23-2013
01:57 PM
|
0
|
20
|
6873
|
|
POST
|
Thanks, what i want is to be able to join point features to form a polyline 2 points each for a polyline segment.
... View more
10-11-2012
05:07 PM
|
0
|
0
|
1103
|
|
POST
|
How can i use a python script to join points to form polylines i.e 4 points to form 4 polylines, i believe it would be an array but i need your suggestions. Thanks
... View more
10-11-2012
03:43 PM
|
0
|
4
|
1981
|
|
POST
|
Thanks i found a solution for my issues See code Below; mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] fc = 'Database Connections/TDPMode.sde/KWAGISMAIN.DBO.Parcels' field = "OBJECTID" field1 = "LGA" field2 = "District" field3 = "Block_No" field4 = "Plot_No" rows = arcpy.SearchCursor(fc) row = rows.next() while row: val = row.getValue(field) val1 = row.getValue(field1) val2 = row.getValue(field2) val3 = row.getValue(field3) val4 = row.getValue(field4) whereClause = '"OBJECTID"' + " = '" + str(val) + "'" outName = "Block_" + str(val3) + "_Plot_" + str(val4) + "_" + str(val2) + "_Area_of_" + str(val1) + "_LGA" + ".pdf" path = "C:/Users/Administrator/Documents/ArcGIS/Default.gdb/" arcpy.SelectLayerByAttribute_management("Parcels", "NEW_SELECTION", whereClause) arcpy.Buffer_analysis ("Parcels", "DataDrivenPage_Buffer", "14 meters", "FULL", "ROUND", "NONE") layer_list = "Lines","Parcels","Access_Road_Graphics","Points","Lines_Split" for layer in layer_list: arcpy.SelectLayerByLocation_management(layer, "COMPLETELY_WITHIN", "DataDrivenPage_Buffer", "", "NEW_SELECTION") exportLayer = "Points", "Lines", "Parcels","Lines_Split","Access_Road_Graphics" for layer in exportLayer: outFC = path + layer + "_New" arcpy.Clip_analysis(layer,"DataDrivenPage_Buffer",outFC) arcpy.SelectLayerByAttribute_management(layer, "CLEAR_SELECTION") mxd = arcpy.mapping.MapDocument("current") lyr = arcpy.mapping.ListLayers(mxd, "Lines_New")[0] for lblClass in lyr.labelClasses: lblClass.SQLQuery = '"ParcelID"' + "=" + str(val) arcpy.RefreshActiveView() arcpy.SelectLayerByAttribute_management("DataDrivenPage_Buffer", "NEW_SELECTION", "OBJECTID = 1") df.zoomToSelectedFeatures() mxd = arcpy.mapping.MapDocument("Current") for df in arcpy.mapping.ListDataFrames(mxd): df.rotation = 0 if df.scale <= 400: df.scale = 500 if df.scale > 400 and df.scale < 1000: df.scale = 1000 else: df.scale = 2000 arcpy.mapping.ExportToPDF(mxd,r"C:\STATE\\Batch\\" + "TDP_For_" + outName) row = rows.next() I think i'm improving.....:D
... View more
09-27-2012
05:56 AM
|
0
|
0
|
2312
|
|
POST
|
Thanks i got the solution for my issues; See code below mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] fc = 'Database Connections/TDPMode.sde/KWAGISMAIN.DBO.Parcels' field = "OBJECTID" field1 = "LGA" field2 = "District" field3 = "Block_No" field4 = "Plot_No" rows = arcpy.SearchCursor(fc) row = rows.next() while row: val = row.getValue(field) val1 = row.getValue(field1) val2 = row.getValue(field2) val3 = row.getValue(field3) val4 = row.getValue(field4) whereClause = '"OBJECTID"' + " = '" + str(val) + "'" outName = "Block_" + str(val3) + "_Plot_" + str(val4) + "_" + str(val2) + "_Area_of_" + str(val1) + "_LGA" + ".pdf" path = "C:/Users/Administrator/Documents/ArcGIS/Default.gdb/" arcpy.SelectLayerByAttribute_management("Parcels", "NEW_SELECTION", whereClause) arcpy.Buffer_analysis ("Parcels", "DataDrivenPage_Buffer", "14 meters", "FULL", "ROUND", "NONE") layer_list = "Lines","Parcels","Access_Road_Graphics","Points","Lines_Split" for layer in layer_list: arcpy.SelectLayerByLocation_management(layer, "COMPLETELY_WITHIN", "DataDrivenPage_Buffer", "", "NEW_SELECTION") exportLayer = "Points", "Lines", "Parcels","Lines_Split","Access_Road_Graphics" for layer in exportLayer: outFC = path + layer + "_New" arcpy.Clip_analysis(layer,"DataDrivenPage_Buffer",outFC) arcpy.SelectLayerByAttribute_management(layer, "CLEAR_SELECTION") mxd = arcpy.mapping.MapDocument("current") lyr = arcpy.mapping.ListLayers(mxd, "Lines_New")[0] for lblClass in lyr.labelClasses: lblClass.SQLQuery = '"ParcelID"' + "=" + str(val) arcpy.RefreshActiveView() arcpy.SelectLayerByAttribute_management("DataDrivenPage_Buffer", "NEW_SELECTION", "OBJECTID = 1") df.zoomToSelectedFeatures() mxd = arcpy.mapping.MapDocument("Current") for df in arcpy.mapping.ListDataFrames(mxd): df.rotation = 0 if df.scale <= 400: df.scale = 500 if df.scale > 400 and df.scale < 1000: df.scale = 1000 else: df.scale = 2000 arcpy.mapping.ExportToPDF(mxd,r"C:\STATE\\Batch\\" + "TDP_For_" + outName) row = rows.next() I think i'm improving....:D
... View more
09-27-2012
05:53 AM
|
0
|
0
|
574
|
|
POST
|
I want to create a few geoprocesses for each of the rows in a feature, so that a row gets worked on at a time then when the operations is finished it moves on to the next row till it gets to the last row, I used the script below but its not working; it creates the buffer for all the features first before moving to the next geoprocessing operation instead of creating the output of the two geoprocesses first then move to the next row. Please what im I doing wrong. Thank you. fc = 'C:/Users/Administrator/Documents/ArcGIS/Default.gdb/Test' field = "OBJECTID" with arcpy.da.SearchCursor(fc, (field)) as cursor: ... for row in cursor: ... arcpy.Buffer_analysis("Test", "DataDrivenPage_Bufferz", "14 meters", "FULL", "ROUND", "NONE") arcpy.Clip_analysis("DataDrivenPage_Bufferz","Test","dd")
... View more
09-21-2012
08:00 PM
|
0
|
2
|
1157
|
|
POST
|
Morning, @ fabl and mdenil im still waiting for any possibility from my last request. Thank you
... View more
09-15-2012
11:43 PM
|
0
|
0
|
2312
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-19-2015 08:49 AM | |
| 1 | 10-15-2013 04:42 AM | |
| 1 | 09-20-2016 03:45 AM | |
| 2 | 09-25-2016 03:50 PM | |
| 1 | 08-25-2012 09:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|